mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
Merge remote-tracking branch 'origin/GP-3997_Dan_lessObtrusiveCommandFailures--SQUASHED'
This commit is contained in:
commit
68d209347c
15 changed files with 337 additions and 120 deletions
|
@ -394,11 +394,11 @@ public abstract class AbstractTraceRmiLaunchOffer implements TraceRmiLaunchOffer
|
|||
* Obtain the launcher args
|
||||
*
|
||||
* <p>
|
||||
* This should either call {@link #promptLauncherArgs(Map))} or
|
||||
* {@link #loadLastLauncherArgs(Map, boolean))}. Note if choosing the latter, the user will not
|
||||
* be prompted to confirm.
|
||||
* This should either call {@link #promptLauncherArgs(LaunchConfigurator, Throwable)} or
|
||||
* {@link #loadLastLauncherArgs(boolean)}. Note if choosing the latter, the user will not be
|
||||
* prompted to confirm.
|
||||
*
|
||||
* @param params the parameters of the model's launcher
|
||||
* @param prompt true to prompt the user, false to use saved arguments
|
||||
* @param configurator the rules for configuring the launcher
|
||||
* @param lastExc if retrying, the last exception to display as an error message
|
||||
* @return the chosen arguments, or null if the user cancels at the prompt
|
||||
|
@ -543,19 +543,24 @@ public abstract class AbstractTraceRmiLaunchOffer implements TraceRmiLaunchOffer
|
|||
|
||||
try {
|
||||
monitor.setMessage("Listening for connection");
|
||||
monitor.increment();
|
||||
acceptor = service.acceptOne(new InetSocketAddress("127.0.0.1", 0));
|
||||
monitor.setMessage("Launching back-end");
|
||||
monitor.increment();
|
||||
launchBackEnd(monitor, sessions, args, acceptor.getAddress());
|
||||
monitor.setMessage("Waiting for connection");
|
||||
monitor.increment();
|
||||
acceptor.setTimeout(getTimeoutMillis());
|
||||
connection = acceptor.accept();
|
||||
connection.registerTerminals(sessions.values());
|
||||
monitor.setMessage("Waiting for trace");
|
||||
monitor.increment();
|
||||
trace = connection.waitForTrace(getTimeoutMillis());
|
||||
traceManager.openTrace(trace);
|
||||
traceManager.activate(traceManager.resolveTrace(trace),
|
||||
ActivationCause.START_RECORDING);
|
||||
monitor.setMessage("Waiting for module mapping");
|
||||
monitor.increment();
|
||||
try {
|
||||
listenForMapping(mappingService, connection, trace).get(getTimeoutMillis(),
|
||||
TimeUnit.MILLISECONDS);
|
||||
|
|
|
@ -183,12 +183,22 @@ public class TraceRmiLauncherServicePlugin extends Plugin
|
|||
.toList();
|
||||
}
|
||||
|
||||
protected void executeTask(Task task) {
|
||||
ProgressService progressService = tool.getService(ProgressService.class);
|
||||
if (progressService != null) {
|
||||
progressService.execute(task);
|
||||
}
|
||||
else {
|
||||
tool.execute(task);
|
||||
}
|
||||
}
|
||||
|
||||
protected void relaunch(TraceRmiLaunchOffer offer) {
|
||||
tool.execute(new ReLaunchTask(offer));
|
||||
executeTask(new ReLaunchTask(offer));
|
||||
}
|
||||
|
||||
protected void configureAndLaunch(TraceRmiLaunchOffer offer) {
|
||||
tool.execute(new ConfigureAndLaunchTask(offer));
|
||||
executeTask(new ConfigureAndLaunchTask(offer));
|
||||
}
|
||||
|
||||
protected String[] constructLaunchMenuPrefix() {
|
||||
|
|
|
@ -31,6 +31,7 @@ import ghidra.framework.plugintool.*;
|
|||
import ghidra.framework.plugintool.AutoService.Wiring;
|
||||
import ghidra.framework.plugintool.annotation.AutoServiceConsumed;
|
||||
import ghidra.framework.plugintool.util.PluginStatus;
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.Swing;
|
||||
import ghidra.util.datastruct.ListenerSet;
|
||||
import ghidra.util.task.ConsoleTaskMonitor;
|
||||
|
@ -63,6 +64,11 @@ public class TraceRmiPlugin extends Plugin implements InternalTraceRmiService {
|
|||
public void close() {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reportError(Throwable e) {
|
||||
Msg.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
@AutoServiceConsumed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue