mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-01 02:46:28 +08:00
GP-6112: cmd args for gdb/lldb
This commit is contained in:
+9
-2
@@ -15,9 +15,12 @@
|
||||
*/
|
||||
package ghidra.app.plugin.core.debug.gui.tracermi.launcher;
|
||||
|
||||
import java.awt.Window;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import ghidra.app.plugin.core.terminal.TerminalProvider;
|
||||
@@ -27,7 +30,8 @@ import ghidra.framework.plugintool.AutoConfigState.PathIsFile;
|
||||
import ghidra.test.ToyProgramBuilder;
|
||||
import help.screenshot.GhidraScreenShotGenerator;
|
||||
|
||||
public class TraceRmiLauncherServicePluginScreenShots extends GhidraScreenShotGenerator {
|
||||
// Class name must be <topic>ScreenShots, and topic is "gdb", so yeah, lowercase!
|
||||
public class gdbScreenShots extends GhidraScreenShotGenerator {
|
||||
TraceRmiLauncherServicePlugin servicePlugin;
|
||||
|
||||
protected void captureLauncherByTitle(String title, Map<String, ValStr<?>> args)
|
||||
@@ -47,7 +51,10 @@ public class TraceRmiLauncherServicePluginScreenShots extends GhidraScreenShotGe
|
||||
|
||||
runSwingLater(() -> servicePlugin.configureAndLaunch(offer));
|
||||
|
||||
captureDialog(TraceRmiLaunchDialog.class);
|
||||
TraceRmiLaunchDialog dialog = waitForDialogComponent(TraceRmiLaunchDialog.class);
|
||||
Window window = SwingUtilities.windowForComponent(dialog.getComponent());
|
||||
window.requestFocus();
|
||||
captureDialog(dialog);
|
||||
}
|
||||
|
||||
protected ValStr<PathIsFile> fileArg(String path) {
|
||||
+10
-4
@@ -18,6 +18,7 @@ package ghidraclass.debugger.screenshot;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.Window;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.io.*;
|
||||
import java.nio.charset.Charset;
|
||||
@@ -26,6 +27,8 @@ import java.nio.file.Files;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -277,7 +280,10 @@ public class TutorialDebuggerScreenShots extends GhidraScreenShotGenerator
|
||||
}
|
||||
}));
|
||||
|
||||
captureDialog(TraceRmiLaunchDialog.class);
|
||||
TraceRmiLaunchDialog dialog = waitForDialogComponent(TraceRmiLaunchDialog.class);
|
||||
Window window = SwingUtilities.windowForComponent(dialog.getComponent());
|
||||
window.requestFocus();
|
||||
captureDialog(dialog);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -382,9 +388,9 @@ public class TutorialDebuggerScreenShots extends GhidraScreenShotGenerator
|
||||
Program prog = null;
|
||||
long snap = flatDbg.getCurrentSnap();
|
||||
try (LoadResults<Program> result = ProgramLoader.builder()
|
||||
.source(new File(module.getName(snap)))
|
||||
.project(env.getProject())
|
||||
.monitor(monitor)
|
||||
.source(new File(module.getName(snap)))
|
||||
.project(env.getProject())
|
||||
.monitor(monitor)
|
||||
.load()) {
|
||||
|
||||
result.save(monitor);
|
||||
|
||||
Reference in New Issue
Block a user