mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-994: Improve error reporting when GADP-based models fail to start
This commit is contained in:
parent
7a92882ba3
commit
b4d2cb75ba
14 changed files with 80 additions and 16 deletions
|
@ -25,6 +25,7 @@ import java.util.concurrent.ExecutionException;
|
|||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||
|
||||
import agent.gdb.gadp.impl.GdbGadpServerImpl;
|
||||
import ghidra.async.AsyncUtils;
|
||||
import ghidra.dbg.agent.AgentWindow;
|
||||
import ghidra.util.Msg;
|
||||
|
||||
|
@ -54,7 +55,8 @@ public interface GdbGadpServer extends AutoCloseable {
|
|||
|
||||
try (GdbGadpServer server = newInstance(bindTo)) {
|
||||
server.startGDB(gdbCmd, gdbArgs.toArray(new String[] {})).exceptionally(e -> {
|
||||
Msg.error(this, "Error starting GDB/GADP", e);
|
||||
e = AsyncUtils.unwrapThrowable(e);
|
||||
Msg.error(this, "Error starting GDB/GADP: " + e);
|
||||
System.exit(-1);
|
||||
return null;
|
||||
});
|
||||
|
|
|
@ -68,8 +68,6 @@ public class LinuxPtySessionLeader {
|
|||
LIB_POSIX.execv(subArgs.get(0), subArgs.toArray(new String[0]));
|
||||
}
|
||||
catch (Throwable t) {
|
||||
System.err.println("Error with ptyPath = '" + ptyPath + "', and subArgs = " + subArgs);
|
||||
t.printStackTrace();
|
||||
if (bk != -1) {
|
||||
try {
|
||||
int bkt = bk;
|
||||
|
@ -80,7 +78,8 @@ public class LinuxPtySessionLeader {
|
|||
System.exit(-1);
|
||||
}
|
||||
}
|
||||
throw t;
|
||||
System.err.println("Could not execute " + subArgs.get(0) + ": " + t.getMessage());
|
||||
System.exit(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue