GP-6112: cmd args for gdb/lldb
@@ -31,6 +31,7 @@
|
||||
#@arg :file "Image" "The target binary executable image"
|
||||
#@env OPT_TARGET_ARGS:str="" "Arguments" "Command-line arguments to pass to the target"
|
||||
#@env OPT_GDB_PATH:file="gdb" "gdb command" "The path to gdb. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_GDB_ARGS:str="" "gdb cmd args" "Arguments passed to gdb (versus the target)"
|
||||
#@env OPT_START_CMD:StartCmd="starti" "Run command" "The gdb command to actually run the target."
|
||||
#@env OPT_ARCH:str="auto" "Architecture" "Target architecture"
|
||||
#@env OPT_ENDIAN:Endian="auto" "Endian" "Target byte order"
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#@arg :file "Image" "The target binary executable image, empty for no target"
|
||||
#@args "Arguments" "Command-line arguments to pass to the target"
|
||||
#@env OPT_GDB_PATH:file="gdb" "gdb command" "The path to gdb. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_GDB_ARGS:str="" "gdb cmd args" "Arguments passed to gdb (versus the target)"
|
||||
#@env OPT_START_CMD:StartCmd="starti" "Run command" "The gdb command to actually run the target."
|
||||
#@env OPT_ARCH:str="i386:x86-64" "Architecture" "Target architecture"
|
||||
#@env OPT_ENDIAN:Endian="auto" "Endian" "Target byte order"
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#@enum Endian:str auto big little
|
||||
#@arg :file "Trace Dir" "The target trace directory (e.g. .local/share/rr/trace)"
|
||||
#@env OPT_RR_PATH:file="rr" "rr command" "The path to rr. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_RR_ARGS:str="" "rr cmd args" "Arguments passed to rr (versus the target)"
|
||||
#@env OPT_ARCH:str="i386:x86-64" "Architecture" "Target architecture"
|
||||
#@env OPT_ENDIAN:Endian="auto" "Endian" "Target byte order"
|
||||
#@env OPT_EXTRA_TTY:bool=false "Inferior TTY" "Provide a separate terminal emulator for the target."
|
||||
@@ -62,5 +63,5 @@ set confirm on
|
||||
set pagination on
|
||||
' > $RRINIT
|
||||
|
||||
"$OPT_RR_PATH" replay -x $RRINIT "$target_trace"
|
||||
"$OPT_RR_PATH" $OPT_RR_ARGS replay -x $RRINIT "$target_trace"
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#@env QEMU_GDB:int=1234 "QEMU Port" "Port for gdb connection to qemu"
|
||||
#@env OPT_EXTRA_QEMU_ARGS:str="" "Extra qemu arguments" "Extra arguments to pass to qemu. Use with care."
|
||||
#@env OPT_GDB_PATH:file="gdb-multiarch" "gdb command" "The path to gdb. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_GDB_ARGS:str="" "gdb cmd args" "Arguments passed to gdb (versus the target)"
|
||||
#@env OPT_ARCH:str="auto" "Architecture" "Target architecture"
|
||||
#@env OPT_ENDIAN:Endian="auto" "Endian" "Target byte order"
|
||||
#@env OPT_EXTRA_TTY:bool=false "QEMU TTY" "Provide a separate terminal emulator for the target."
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#@env QEMU_GDB:int=1234 "QEMU Port" "Port for gdb connection to qemu"
|
||||
#@env OPT_EXTRA_QEMU_ARGS:str="" "Extra qemu arguments" "Extra arguments to pass to qemu. Use with care."
|
||||
#@env OPT_GDB_PATH:file="gdb-multiarch" "gdb command" "The path to gdb. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_GDB_ARGS:str="" "gdb cmd args" "Arguments passed to gdb (versus the target)"
|
||||
#@env OPT_ARCH:str="auto" "Architecture" "Target architecture"
|
||||
#@env OPT_ENDIAN:Endian="auto" "Endian" "Target byte order"
|
||||
#@env OPT_EXTRA_TTY:bool=false "QEMU TTY" "Provide a separate terminal emulator for qemu."
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#@env QEMU_GDB:int=1234 "QEMU Port" "Port for gdb connection to qemu"
|
||||
#@env OPT_EXTRA_QEMU_ARGS:str="" "Extra qemu arguments" "Extra arguments to pass to qemu. Use with care."
|
||||
#@env OPT_GDB_PATH:file="gdb-multiarch" "gdb command" "The path to gdb. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_GDB_ARGS:str="" "gdb cmd args" "Arguments passed to gdb (versus the target)"
|
||||
#@env OPT_ARCH:str="auto" "Architecture" "Target architecture"
|
||||
#@env OPT_ENDIAN:Endian="auto" "Endian" "Target byte order"
|
||||
#@env OPT_EXTRA_TTY:bool=false "QEMU TTY" "Provide a separate terminal emulator for qemu."
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#@env OPT_HOST:str="localhost" "Host" "The hostname of the target"
|
||||
#@env OPT_PORT:int=9999 "Port" "The host's listening port"
|
||||
#@env OPT_GDB_PATH:file="gdb" "gdb command" "The path to gdb on the local system. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_GDB_ARGS:str="" "gdb cmd args" "Arguments passed to gdb (versus the target)"
|
||||
#@env OPT_ARCH:str="auto" "Architecture" "Target architecture override"
|
||||
#@env OPT_ENDIAN:Endian="auto" "Endian" "Target byte order"
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#@env OPT_HOST:str="localhost" "Host" "The hostname of the target"
|
||||
#@env OPT_PORT:int=9999 "Port" "The host's listening port"
|
||||
#@env OPT_GDB_PATH:file="gdb" "gdb command" "The path to gdb on the local system. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_GDB_ARGS:str="" "gdb cmd args" "Arguments passed to gdb (versus the target)"
|
||||
#@env OPT_ARCH:str="auto" "Architecture" "Target architecture override"
|
||||
#@env OPT_ENDIAN:Endian="auto" "Endian" "Target byte order"
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#@env OPT_REMOTE_PORT:int=12345 "Remote Trace RMI Port" "A free port on the remote end to receive and forward the Trace RMI connection."
|
||||
#@env OPT_EXTRA_SSH_ARGS:str="" "Extra ssh arguments" "Extra arguments to pass to ssh. Use with care."
|
||||
#@env OPT_GDB_PATH:str="gdb" "gdb command" "The path to gdb on the remote system. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_GDB_ARGS:str="" "gdb cmd args" "Arguments passed to gdb (versus the target)"
|
||||
#@env OPT_START_CMD:StartCmd="starti" "Run command" "The gdb command to actually run the target."
|
||||
#@env OPT_ARCH:str="i386:x86-64" "Architecture" "Target architecture"
|
||||
#@env OPT_ENDIAN:Endian="auto" "Endian" "Target byte order"
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#@env OPT_REMOTE_PORT:int=12345 "Remote Trace RMI Port" "A free port on the remote end to receive and forward the Trace RMI connection."
|
||||
#@env OPT_EXTRA_SSH_ARGS:str="" "Extra ssh arguments" "Extra arguments to pass to ssh. Use with care."
|
||||
#@env OPT_GDB_PATH:str="gdb" "gdb command" "The path to gdb on the remote system. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_GDB_ARGS:str="" "gdb cmd args" "Arguments passed to gdb (versus the target)"
|
||||
#@env OPT_START_CMD:StartCmd="starti" "Run command" "The gdb command to actually run the target."
|
||||
#@env OPT_ARCH:str="i386:x86-64" "Architecture" "Target architecture"
|
||||
#@env OPT_ENDIAN:Endian="auto" "Endian" "Target byte order"
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#@env OPT_GDBSERVER_PATH:str="gdbserver" "gdbserver command (remote)" "The path to gdbserver on the remote system. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_EXTRA_GDBSERVER_ARGS:str="" "Extra gdbserver arguments" "Extra arguments to pass to gdbserver. Use with care."
|
||||
#@env OPT_GDB_PATH:file="gdb" "gdb command" "The path to gdb on the local system. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_GDB_ARGS:str="" "gdb cmd args" "Arguments passed to gdb (versus the target)"
|
||||
#@env OPT_ARCH:str="auto" "Architecture" "Target architecture"
|
||||
#@env OPT_ENDIAN:Endian="auto" "Endian" "Target byte order"
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#@env OPT_GDBSERVER_PATH:str="gdbserver" "gdbserver command (remote)" "The path to gdbserver on the remote system. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_EXTRA_GDBSERVER_ARGS:str="" "Extra gdbserver arguments" "Extra arguments to pass to gdbserver. Use with care."
|
||||
#@env OPT_GDB_PATH:file="gdb" "gdb command" "The path to gdb on the local system. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_GDB_ARGS:str="" "gdb cmd args" "Arguments passed to gdb (versus the target)"
|
||||
#@env OPT_ARCH:str="auto" "Architecture" "Target architecture"
|
||||
#@env OPT_ENDIAN:Endian="auto" "Endian" "Target byte order"
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#@args "Arguments" "Command-line arguments to pass to the target"
|
||||
#@env OPT_WINE_PATH:file="/usr/lib/wine/wine64" "Path to wine binary" "The path to the wine executable for your target architecture."
|
||||
#@env OPT_GDB_PATH:file="gdb" "gdb command" "The path to gdb. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_GDB_ARGS:str="" "gdb cmd args" "Arguments passed to gdb (versus the target)"
|
||||
#@env OPT_ARCH:str="i386:x86-64" "Architecture" "Target architecture"
|
||||
#@env OPT_ENDIAN:Endian="auto" "Endian" "Target byte order"
|
||||
#@env OPT_EXTRA_TTY:bool=false "Inferior TTY" "Provide a separate terminal emulator for the target."
|
||||
|
||||
@@ -26,6 +26,7 @@ function Add-Gdb-Init-Args {
|
||||
$ArgList.Value+=("-ex", "`"python if not 'ghidragdb' in locals(): exit(253)`"")
|
||||
$ArgList.Value+=("-ex", "`"set architecture $Env:OPT_ARCH`"")
|
||||
$ArgList.Value+=("-ex", "`"set endian $Env:OPT_ENDIAN`"")
|
||||
$ArgList.Value+=($Env:OPT_GDB_ARGS)
|
||||
}
|
||||
|
||||
function Add-Gdb-Image-And-Args {
|
||||
|
||||
@@ -24,6 +24,7 @@ add-gdb-init-args() {
|
||||
args+=(-ex "python if not 'ghidragdb' in locals(): exit(253)")
|
||||
args+=(-ex "set architecture $OPT_ARCH")
|
||||
args+=(-ex "set endian $OPT_ENDIAN")
|
||||
args+=($OPT_GDB_ARGS)
|
||||
}
|
||||
|
||||
add-gdb-image-and-args() {
|
||||
|
||||
@@ -102,6 +102,9 @@ python3 -m pip install --no-index -f Debugger-rmi-trace/pypkg/dist -f Debugger-a
|
||||
<LI><B><TT>gdb</TT> command</B>: This is the command or path to GDB. We recommend version 13
|
||||
or later. We require version 8 or later.</LI>
|
||||
|
||||
<LI><B><TT>gdb</TT> cmd args</B>: Arguments passed directly to GDB (versus the target).
|
||||
Note: these arguments may override user arguments passed to the cmd.</LI>
|
||||
|
||||
<LI><B>Run command</B>: This is the GDB command to actually launch the target. In most cases
|
||||
this should be "<TT>starti,</TT>" since this will assure you an initial break and a chance to
|
||||
enable your breakpoints.</LI>
|
||||
|
||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 18 KiB |
@@ -30,6 +30,7 @@
|
||||
#@env OPT_PORT:str="9999" "Port" "The host's listening port"
|
||||
#@env OPT_ARCH:str="" "Architecture" "Target architecture override"
|
||||
#@env OPT_LLDB_PATH:file="lldb" "lldb command" "The path to lldb on the local system. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_LLDB_ARGS:str="" "lldb cmd args" "Arguments passed to lldb (versus the target)"
|
||||
#@env OPT_EXTRA_CMDS:str="" "Additional commands" "Follow-up lldb commands."
|
||||
|
||||
. ..\support\lldbsetuputils.ps1
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#@env OPT_PORT:str="9999" "Port" "The host's listening port"
|
||||
#@env OPT_ARCH:str="" "Architecture" "Target architecture override"
|
||||
#@env OPT_LLDB_PATH:file="lldb" "lldb command" "The path to lldb on the local system. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_LLDB_ARGS:str="" "lldb cmd args" "Arguments passed to lldb (versus the target)"
|
||||
#@env OPT_EXTRA_CMDS:str="" "Additional commands" "Follow-up lldb commands."
|
||||
|
||||
. ../support/lldbsetuputils.sh
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#@env OPT_PORT:str="9999" "Port" "The host's listening port"
|
||||
#@env OPT_ARCH:str="" "Architecture" "Target architecture override"
|
||||
#@env OPT_LLDB_PATH:file="lldb" "lldb command" "The path to lldb on the local system. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_LLDB_ARGS:str="" "lldb cmd args" "Arguments passed to lldb (versus the target)"
|
||||
#@env OPT_START_CMD:StartCmd="process launch" "Run command" "The lldb command to actually run the target."
|
||||
|
||||
. ..\support\lldbsetuputils.ps1
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#@env OPT_PORT:str="9999" "Port" "The host's listening port"
|
||||
#@env OPT_ARCH:str="" "Architecture" "Target architecture override"
|
||||
#@env OPT_LLDB_PATH:file="lldb" "lldb command" "The path to lldb on the local system. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_LLDB_ARGS:str="" "lldb cmd args" "Arguments passed to lldb (versus the target)"
|
||||
#@env OPT_START_CMD:StartCmd="process launch" "Run command" "The lldb command to actually run the target."
|
||||
|
||||
. ../support/lldbsetuputils.sh
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#@env OPT_HOST:str="localhost" "Host" "The hostname of the target"
|
||||
#@env OPT_ARCH:str="" "Architecture" "Target architecture override"
|
||||
#@env OPT_LLDB_PATH:file="lldb" "lldb command" "The path to lldb on the local system. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_LLDB_ARGS:str="" "lldb cmd args" "Arguments passed to lldb (versus the target)"
|
||||
|
||||
. ..\support\lldbsetuputils.ps1
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#@env OPT_HOST:str="localhost" "Host" "The hostname of the target"
|
||||
#@env OPT_ARCH:str="" "Architecture" "Target architecture override"
|
||||
#@env OPT_LLDB_PATH:file="lldb" "lldb command" "The path to lldb on the local system. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_LLDB_ARGS:str="" "lldb cmd args" "Arguments passed to lldb (versus the target)"
|
||||
|
||||
. ../support/lldbsetuputils.sh
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#@arg :file "Image" "The target binary executable image"
|
||||
#@env OPT_TARGET_ARGS:str="" "Arguments" "Command-line arguments to pass to the target"
|
||||
#@env OPT_LLDB_PATH:file="lldb" "lldb command" "The path to lldb. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_LLDB_ARGS:str="" "lldb cmd args" "Arguments passed to lldb (versus the target)"
|
||||
#@env OPT_START_CMD:StartCmd="process launch" "Run command" "The lldb command to actually run the target."
|
||||
|
||||
. ..\support\lldbsetuputils.ps1
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#@arg :file "Image" "The target binary executable image"
|
||||
#@args "Arguments" "Command-line arguments to pass to the target"
|
||||
#@env OPT_LLDB_PATH:file="lldb" "lldb command" "The path to lldb. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_LLDB_ARGS:str="" "lldb cmd args" "Arguments passed to lldb (versus the target)"
|
||||
#@env OPT_START_CMD:StartCmd="process launch" "Run command" "The lldb command to actually run the target."
|
||||
#@env OPT_EXTRA_TTY:bool=false "Target TTY" "Provide a separate terminal emulator for the target."
|
||||
#@tty TTY_TARGET if env:OPT_EXTRA_TTY
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#@env OPT_PORT:str="9999" "Port" "The host's listening port"
|
||||
#@env OPT_ARCH:str="" "Architecture" "Target architecture override"
|
||||
#@env OPT_LLDB_PATH:file="lldb" "lldb command" "The path to lldb on the local system. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_LLDB_ARGS:str="" "lldb cmd args" "Arguments passed to lldb (versus the target)"
|
||||
|
||||
. ..\support\lldbsetuputils.ps1
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#@env OPT_PORT:str="9999" "Port" "The host's listening port"
|
||||
#@env OPT_ARCH:str="" "Architecture" "Target architecture override"
|
||||
#@env OPT_LLDB_PATH:file="lldb" "lldb command" "The path to lldb on the local system. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_LLDB_ARGS:str="" "lldb cmd args" "Arguments passed to lldb (versus the target)"
|
||||
|
||||
. ../support/lldbsetuputils.sh
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#@env OPT_REMOTE_PORT:int=12345 "Remote Trace RMI Port" "A free port on the remote end to receive and forward the Trace RMI connection."
|
||||
#@env OPT_EXTRA_SSH_ARGS:str="" "Extra ssh arguments" "Extra arguments to pass to ssh. Use with care."
|
||||
#@env OPT_LLDB_PATH:str="lldb" "lldb command" "The path to lldb on the remote system. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_LLDB_ARGS:str="" "lldb cmd args" "Arguments passed to lldb (versus the target)"
|
||||
#@env OPT_START_CMD:StartCmd="process launch" "Run command" "The lldb command to actually run the target."
|
||||
#@env OPT_ARCH:str="x86_64" "Architecture" "Target architecture"
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#@env OPT_REMOTE_PORT:int=12345 "Remote Trace RMI Port" "A free port on the remote end to receive and forward the Trace RMI connection."
|
||||
#@env OPT_EXTRA_SSH_ARGS:str="" "Extra ssh arguments" "Extra arguments to pass to ssh. Use with care."
|
||||
#@env OPT_LLDB_PATH:str="lldb" "lldb command" "The path to lldb on the remote system. Omit the full path to resolve using the system PATH."
|
||||
#@env OPT_LLDB_ARGS:str="" "lldb cmd args" "Arguments passed to lldb (versus the target)"
|
||||
#@env OPT_START_CMD:StartCmd="process launch" "Run command" "The lldb command to actually run the target."
|
||||
#@env OPT_ARCH:str="x86_64" "Architecture" "Target architecture"
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ function Add-Lldb-Init-Args {
|
||||
if ("$Env:OPT_ARCH" -ne "") {
|
||||
$ArgList.Value+=("-o", "`"settings set target.default-arch $Env:OPT_ARCH`"")
|
||||
}
|
||||
$ArgList.Value+=($Env:OPT_LLDB_ARGS)
|
||||
}
|
||||
|
||||
function Add-Lldb-Image-And-Args {
|
||||
|
||||
@@ -19,10 +19,10 @@ add-lldb-init-args() {
|
||||
args+=(-o "version")
|
||||
args+=(-o "script import os, ghidralldb")
|
||||
args+=(-o "script if not 'ghidralldb' in locals(): os._exit(253)")
|
||||
|
||||
if [ -n "$OPT_ARCH" ]; then
|
||||
args+=(-o "settings set target.default-arch $OPT_ARCH")
|
||||
fi
|
||||
args+=($OPT_LLDB_ARGS)
|
||||
}
|
||||
|
||||
add-lldb-image-and-args() {
|
||||
|
||||
@@ -94,6 +94,9 @@ python3 -m pip install --no-index -f Debugger-rmi-trace/pypkg/dist -f Debugger-a
|
||||
<LI><B><TT>lldb</TT> command</B>: This is the command or path to LLDB. We recommend version
|
||||
15 or later.</LI>
|
||||
|
||||
<LI><B><TT>lldb</TT> cmd args</B>: Arguments passed directly to LLDB (versus the target).
|
||||
Note: these arguments may override user arguments passed to the cmd.</LI>
|
||||
|
||||
<LI><B>Run command</B>: This is the LLDB command to actually launch the target. In most cases
|
||||
this should include "<TT>--stop-at-entry</TT>", since this will assure you an initial break
|
||||
and a chance to enable your breakpoints.</LI>
|
||||
|
||||
@@ -101,8 +101,10 @@ import ghidra.util.task.TaskMonitor;
|
||||
public class DebuggerEmulationServicePlugin extends Plugin implements DebuggerEmulationService {
|
||||
protected static final int MAX_CACHE_SIZE = 5;
|
||||
|
||||
private static final AutoConfigState.ClassHandler<DebuggerEmulationServicePlugin> CONFIG_STATE_HANDLER =
|
||||
AutoConfigState.wireHandler(DebuggerEmulationServicePlugin.class, MethodHandles.lookup());
|
||||
private static final AutoConfigState.ClassHandler<
|
||||
DebuggerEmulationServicePlugin> CONFIG_STATE_HANDLER =
|
||||
AutoConfigState.wireHandler(DebuggerEmulationServicePlugin.class,
|
||||
MethodHandles.lookup());
|
||||
|
||||
public interface EmulateProgramAction {
|
||||
String NAME = "Emulate Program in new Trace";
|
||||
@@ -299,7 +301,7 @@ public class DebuggerEmulationServicePlugin extends Plugin implements DebuggerEm
|
||||
}
|
||||
|
||||
@AutoConfigStateField
|
||||
private String defaultEmulator;
|
||||
private String defaultEmulator = DefaultEmulatorFactory.TITLE;
|
||||
protected EmulatorFactory emulatorFactory =
|
||||
new DefaultEmulatorFactory();
|
||||
|
||||
|
||||
@@ -25,12 +25,13 @@ import ghidra.pcode.exec.trace.TraceEmulationIntegration.Writer;
|
||||
* The Debugger's default emulator factory
|
||||
*/
|
||||
public class DefaultEmulatorFactory implements EmulatorFactory {
|
||||
public static final String TITLE = "Default Concrete P-code Emulator";
|
||||
// TODO: Config options:
|
||||
// 1) userop library
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return "Default Concrete P-code Emulator";
|
||||
return TITLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -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) {
|
||||
@@ -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);
|
||||
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 24 KiB |