mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
GP-4389: Fixes for Trace RMI lldb on macOS
Create local-lldh.sh launch script Upgrade to JNA-5.14 Fix pty IOCTL numbers for macOS Fix compile-spec mapping Improv error report / clean-up after launch failure. Write ERROR state on memory read failures Convert Python exceptions to LLDB command errors
This commit is contained in:
parent
bb8ec1cbe6
commit
973b9a8d4c
50 changed files with 1247 additions and 723 deletions
|
@ -37,6 +37,13 @@ public interface TraceRmiAcceptor {
|
|||
*/
|
||||
TraceRmiConnection accept() throws IOException, CancelledException;
|
||||
|
||||
/**
|
||||
* Check if the acceptor is actually still accepting.
|
||||
*
|
||||
* @return true if not accepting anymore
|
||||
*/
|
||||
boolean isClosed();
|
||||
|
||||
/**
|
||||
* Get the address (and port) where the acceptor is listening
|
||||
*
|
||||
|
|
|
@ -57,16 +57,30 @@ public interface TraceRmiLaunchOffer {
|
|||
* @param exception optional error, if failed
|
||||
*/
|
||||
public record LaunchResult(Program program, Map<String, TerminalSession> sessions,
|
||||
TraceRmiConnection connection, Trace trace, Throwable exception)
|
||||
implements AutoCloseable {
|
||||
TraceRmiAcceptor acceptor, TraceRmiConnection connection, Trace trace,
|
||||
Throwable exception) implements AutoCloseable {
|
||||
public LaunchResult(Program program, Map<String, TerminalSession> sessions,
|
||||
TraceRmiAcceptor acceptor, TraceRmiConnection connection, Trace trace,
|
||||
Throwable exception) {
|
||||
this.program = program;
|
||||
this.sessions = sessions;
|
||||
this.acceptor = acceptor == null || acceptor.isClosed() ? null : acceptor;
|
||||
this.connection = connection;
|
||||
this.trace = trace;
|
||||
this.exception = exception;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws Exception {
|
||||
for (TerminalSession s : sessions.values()) {
|
||||
s.close();
|
||||
}
|
||||
if (connection != null) {
|
||||
connection.close();
|
||||
}
|
||||
if (acceptor != null) {
|
||||
acceptor.cancel();
|
||||
}
|
||||
for (TerminalSession s : sessions.values()) {
|
||||
s.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue