mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-994: Improve error reporting when GADP-based models fail to start
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user