From 90f37252466af8b5a64ba2d9032bf090c34c605f Mon Sep 17 00:00:00 2001 From: Dan <46821332+nsadeveloper789@users.noreply.github.com> Date: Thu, 23 May 2024 09:01:30 -0400 Subject: [PATCH] GP-4617: Moving most documentation from connectors to Help. --- .../data/debugger-launchers/local-dbgeng.bat | 13 +- .../data/debugger-launchers/local-ttd.bat | 13 +- .../data/debugger-launchers/local-gdb.sh | 9 +- .../data/debugger-launchers/qemu-gdb.sh | 14 +- .../data/debugger-launchers/raw-gdb.sh | 12 +- .../data/debugger-launchers/remote-gdb.sh | 17 +- .../data/debugger-launchers/ssh-gdb.sh | 19 +- .../data/debugger-launchers/ssh-gdbserver.sh | 18 +- .../data/debugger-launchers/wine-gdb.sh | 19 +- .../data/debugger-launchers/local-lldb.sh | 9 +- .../data/debugger-launchers/remote-lldb.sh | 15 +- .../data/debugger-launchers/raw-python3.sh | 9 +- .../TraceRmiLauncherServicePlugin.html | 359 ++++++++++++++---- .../images/GdbLauncher.png | Bin 17742 -> 14541 bytes .../launcher/AbstractTraceRmiLaunchOffer.java | 3 +- .../launcher/LaunchFailureDialog.java | 8 +- 16 files changed, 360 insertions(+), 177 deletions(-) diff --git a/Ghidra/Debug/Debugger-agent-dbgeng/data/debugger-launchers/local-dbgeng.bat b/Ghidra/Debug/Debugger-agent-dbgeng/data/debugger-launchers/local-dbgeng.bat index 4ce4b27a3a3..171590c9613 100644 --- a/Ghidra/Debug/Debugger-agent-dbgeng/data/debugger-launchers/local-dbgeng.bat +++ b/Ghidra/Debug/Debugger-agent-dbgeng/data/debugger-launchers/local-dbgeng.bat @@ -1,21 +1,20 @@ ::@title dbgeng ::@desc
::@descThis will launch the target on the local machine using dbgeng.dll. Typically, -::@desc Windows systems have this library pre-installed, but it may have limitations, e.g., you -::@desc cannot use .server. For the full capabilities, you must install WinDbg.
-::@descFurthermore, you must have Python 3 installed on your system, and it must have the -::@desc pybag and protobuf packages installed.
+::@desc+::@desc This will launch the target on the local machine using dbgeng.dll. +::@desc For setup instructions, press F1. +::@desc
::@desc ::@menu-group local ::@icon icon.debugger ::@help TraceRmiLauncherServicePlugin#dbgeng -::@env OPT_PYTHON_EXE:str="python" "Path to python" "The path to the Python 3 interpreter. Omit the full path to resolve using the system PATH." +::@env OPT_PYTHON_EXE:str="python" "Python command" "The path to the Python 3 interpreter. Omit the full path to resolve using the system PATH." :: Use env instead of args, because "all args except first" is terrible to implement in batch ::@env OPT_TARGET_IMG:str="" "Image" "The target binary executable image" ::@env OPT_TARGET_ARGS:str="" "Arguments" "Command-line arguments to pass to the target" ::@env OPT_USE_DBGMODEL:bool=true "Use dbgmodel" "Load and use dbgmodel.dll if it is available." -::@env WINDBG_DIR:str="" "Path to dbgeng" "Path to dbgeng and associated DLLS (if not Windows Kits)." +::@env WINDBG_DIR:str="" "Path to dbgeng.dll directory" "Path containing dbgeng and associated DLLS (if not Windows Kits)." @echo off diff --git a/Ghidra/Debug/Debugger-agent-dbgeng/data/debugger-launchers/local-ttd.bat b/Ghidra/Debug/Debugger-agent-dbgeng/data/debugger-launchers/local-ttd.bat index 37cfc06fbb0..693f7c67c88 100644 --- a/Ghidra/Debug/Debugger-agent-dbgeng/data/debugger-launchers/local-ttd.bat +++ b/Ghidra/Debug/Debugger-agent-dbgeng/data/debugger-launchers/local-ttd.bat @@ -1,21 +1,20 @@ ::@title ttd ::@desc ::@descThis will launch the target on the local machine using dbgeng.dll. Typically, -::@desc Windows systems have this library pre-installed, but it may have limitations, e.g., you -::@desc cannot use .server. For the full capabilities, you must install WinDbg.
-::@descFurthermore, you must have Python 3 installed on your system, and it must have the -::@desc pybag and protobuf packages installed.
+::@desc+::@desc This will launch the target on the local machine for time-travel debugging. +::@desc For setup instructions, press F1. +::@desc
::@desc ::@menu-group local ::@icon icon.debugger ::@help TraceRmiLauncherServicePlugin#dbgeng_ttd -::@env OPT_PYTHON_EXE:str="python" "Path to python" "The path to the Python 3 interpreter. Omit the full path to resolve using the system PATH." +::@env OPT_PYTHON_EXE:str="python" "Python command" "The path to the Python 3 interpreter. Omit the full path to resolve using the system PATH." :: Use env instead of args, because "all args except first" is terrible to implement in batch ::@env OPT_TARGET_IMG:str="" "Trace (.run)" "A trace associated with the target binary executable" ::@env OPT_TARGET_ARGS:str="" "Arguments" "Command-line arguments to pass to the target" ::@env OPT_USE_DBGMODEL:bool=true "Use dbgmodel" "Load and use dbgmodel.dll if it is available." -::@env OPT_DBGMODEL_PATH:str="" "Path to dbgeng & \\ttd" "Path to dbgeng and associated DLLS (if not Windows Kits)." +::@env OPT_DBGMODEL_PATH:str="" "Path to dbgeng.dll & \\ttd" "Path containing dbgeng and associated DLLS (if not Windows Kits)." @echo off diff --git a/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/local-gdb.sh b/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/local-gdb.sh index 74a4099743f..9f9f91374a3 100755 --- a/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/local-gdb.sh +++ b/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/local-gdb.sh @@ -17,9 +17,10 @@ #@title gdb #@desc #@descThis will launch the target on the local machine using gdb. GDB must already -#@desc be installed on your system, and it must embed the Python 3 interpreter. You will also -#@desc need protobuf and psutil installed for Python 3.
+#@desc+#@desc This will launch the target on the local machine using gdb. +#@desc For setup instructions, press F1. +#@desc
#@desc #@menu-group local #@icon icon.debugger @@ -27,7 +28,7 @@ #@enum StartCmd:str run start starti #@arg :str "Image" "The target binary executable image" #@args "Arguments" "Command-line arguments to pass to the target" -#@env OPT_GDB_PATH:str="gdb" "Path to gdb" "The path to gdb. Omit the full path to resolve using the system PATH." +#@env OPT_GDB_PATH:str="gdb" "gdb command" "The path to gdb. Omit the full path to resolve using the system PATH." #@env OPT_START_CMD:StartCmd="starti" "Run command" "The gdb command to actually run the target." #@env OPT_EXTRA_TTY:bool=false "Inferior TTY" "Provide a separate terminal emulator for the target." #@tty TTY_TARGET if env:OPT_EXTRA_TTY diff --git a/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/qemu-gdb.sh b/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/qemu-gdb.sh index ed484193579..924a151d0e6 100755 --- a/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/qemu-gdb.sh +++ b/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/qemu-gdb.sh @@ -17,21 +17,21 @@ #@title qemu + gdb #@desc #@descThis will launch the target on the local machine using qemu. Then in a second -#@desc terminal, it will connect gdb to QEMU's GDBstub. -#@desc GDB must already be installed on your system, it must support your target architecture -#@desc (you may install gdb-multiarch), and it must embed the Python 3 interpreter. You -#@desc will also need protobuf installed for Python 3. +#@desc
+#@desc This will launch the target on the local machine using qemu. +#@desc Then in a second terminal, it will connect gdb to QEMU's GDBstub. +#@desc For setup instructions, press F1. +#@desc
#@desc #@menu-group cross #@icon icon.debugger #@help TraceRmiLauncherServicePlugin#gdb_qemu #@arg :str "Image" "The target binary executable image" #@args "Arguments" "Command-line arguments to pass to the target" -#@env GHIDRA_LANG_EXTTOOL_qemu:str="" "Path to qemu" "The path to qemu for the target architecture." +#@env GHIDRA_LANG_EXTTOOL_qemu:str="" "QEMU command" "The path to qemu for the target architecture." #@env QEMU_GDB:int=12345 "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:str="gdb-multiarch" "Path to gdb" "The path to gdb. Omit the full path to resolve using the system PATH." +#@env OPT_GDB_PATH:str="gdb-multiarch" "gdb command" "The path to gdb. Omit the full path to resolve using the system PATH." #@env OPT_EXTRA_TTY:bool=false "QEMU TTY" "Provide a separate terminal emulator for the target." #@tty TTY_TARGET if env:OPT_EXTRA_TTY diff --git a/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/raw-gdb.sh b/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/raw-gdb.sh index 37779af3e3f..5b572354e57 100755 --- a/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/raw-gdb.sh +++ b/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/raw-gdb.sh @@ -18,16 +18,16 @@ #@no-image #@desc #@descThis will start gdb and connect to it. It will not launch -#@desc a target, so you can (must) set up your target manually. -#@desc GDB must already -#@desc be installed on your system, and it must embed the Python 3 interpreter. You will also -#@desc need protobuf and psutil installed for Python 3.
+#@desc+#@desc This will start gdb and connect to it. +#@desc It will not launch a target, so you can (must) set up your target manually. +#@desc For setup instructions, press F1. +#@desc
#@desc #@menu-group raw #@icon icon.debugger #@help TraceRmiLauncherServicePlugin#gdb_raw -#@env OPT_GDB_PATH:str="gdb" "Path to gdb" "The path to gdb. Omit the full path to resolve using the system PATH." +#@env OPT_GDB_PATH:str="gdb" "gdb command" "The path to gdb. Omit the full path to resolve using the system PATH." #@env OPT_ARCH:str="i386:x86-64" "Architecture" "Target architecture" if [ -d ${GHIDRA_HOME}/ghidra/.git ] diff --git a/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/remote-gdb.sh b/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/remote-gdb.sh index 76af6bdcfd2..29d80336abe 100755 --- a/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/remote-gdb.sh +++ b/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/remote-gdb.sh @@ -18,25 +18,20 @@ #@no-image #@desc #@descThis will start gdb on the local system and then use it to connect to the remote system. -#@desc The actual command used is, e.g:
-#@desctarget remote host:port-#@desc
It may be worth testing this manually to ensure everything is configured correctly. -#@desc GDB must be installed on your local system, it must be compatible with the remote system, -#@desc and it must embed the Python 3 interpreter. You will also need protobuf installed -#@desc for Python 3 on the local system. There are no Python requirements for the remote system. -#@desc Please ensure that Ghidra's current program and the target's image match. Otherwise, the -#@desc modules may not map.
+#@desc+#@desc This will start gdb on the local system and then use it to connect to the remote system. +#@desc For setup instructions, press F1. +#@desc
#@desc #@menu-group remote #@icon icon.debugger -#@help TraceRmiLauncherServicePlugin#gdb +#@help TraceRmiLauncherServicePlugin#gdb_remote #@enum TargetType:str remote extended-remote #@env OPT_TARGET_TYPE:TargetType="remote" "Target" "The type of remote target" #@env OPT_HOST:str="localhost" "Host" "The hostname of the target" #@env OPT_PORT:str="9999" "Port" "The host's listening port" #@env OPT_ARCH:str="" "Architecture (optional)" "Target architecture override" -#@env OPT_GDB_PATH:str="gdb" "Path to gdb" "The path to gdb on the local system. Omit the full path to resolve using the system PATH." +#@env OPT_GDB_PATH:str="gdb" "gdb command" "The path to gdb on the local system. Omit the full path to resolve using the system PATH." if [ -d ${GHIDRA_HOME}/ghidra/.git ] then diff --git a/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/ssh-gdb.sh b/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/ssh-gdb.sh index 6ccb89e34b4..9c455de2277 100755 --- a/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/ssh-gdb.sh +++ b/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/ssh-gdb.sh @@ -18,19 +18,10 @@ #@title gdb via ssh #@desc #@descThis will launch the target on a remote machine using gdb via ssh. -#@desc GDB and an SSH server must already be installed and operational on the remote system, and -#@desc GDB must embed the Python 3 interpreter. The remote SSH server must be configured to allow -#@desc remote port forwarding. You will also need to install the following for GDB's embedded -#@desc version of Python:
-#@desc+#@desc This will launch the target on a remote machine using gdb via ssh. +#@desc For setup instructions, press F1. +#@desc
#@desc #@menu-group remote #@icon icon.debugger @@ -41,7 +32,7 @@ #@env OPT_HOST:str="localhost" "[User@]Host" "The hostname or user@host" #@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" "Path to gdb" "The path to gdb on the remote system. Omit the full path to resolve using the system PATH." +#@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_START_CMD:StartCmd="start" "Run command" "The gdb command to actually run the target." target_image="$1" diff --git a/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/ssh-gdbserver.sh b/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/ssh-gdbserver.sh index 4185dac8c0f..cf47498d806 100755 --- a/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/ssh-gdbserver.sh +++ b/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/ssh-gdbserver.sh @@ -18,16 +18,10 @@ #@title gdb + gdbserver via ssh #@desc #@descThis will start gdb on the local system and then use it to connect and launch -#@desc the target in gdbserver on the remote system via ssh. The actual command -#@desc used is, e.g:
-#@desctarget remote | ssh user@host gdbserver - /path/to/image-#@desc
It may be worth testing this manually to ensure everything is configured correctly. An -#@desc SSH server and gdbserver must already be installed and operational on the remote -#@desc system. GDB must be installed on your local system, it must be compatible with the -#@desc gdbserver on the remote system, and it must embed the Python 3 interpreter. You -#@desc will also need protobuf installed for Python 3 on the local system. There are no -#@desc Python requirements for the remote system.
+#@desc+#@desc This will start gdb on the local system and then use it to connect and launch the target in gdbserver on the remote system via ssh. +#@desc For setup instructions, press F1. +#@desc
#@desc #@menu-group remote #@icon icon.debugger @@ -36,9 +30,9 @@ #@args "Arguments" "Command-line arguments to pass to the target" #@env OPT_HOST:str="localhost" "[User@]Host" "The hostname or user@host" #@env OPT_EXTRA_SSH_ARGS:str="" "Extra ssh arguments" "Extra arguments to pass to ssh. Use with care." -#@env OPT_GDBSERVER_PATH:str="gdbserver" "Path to gdbserver (remote)" "The path to gdbserver on the remote system. Omit the full path to resolve using the system PATH." +#@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:str="gdb" "Path to gdb" "The path to gdb on the local system. Omit the full path to resolve using the system PATH." +#@env OPT_GDB_PATH:str="gdb" "gdb command" "The path to gdb on the local system. Omit the full path to resolve using the system PATH." if [ -d ${GHIDRA_HOME}/ghidra/.git ] then diff --git a/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/wine-gdb.sh b/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/wine-gdb.sh index f1eaf81905a..5a37621166e 100755 --- a/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/wine-gdb.sh +++ b/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/wine-gdb.sh @@ -17,19 +17,10 @@ #@title wine + gdb #@desc #@descThis will launch the target on the local machine using gdb and wine. -#@desc GDB and Wine must already be installed on your system, and GDB must embed the Python 3 -#@desc interpreter. You will also need protobuf and psutil installed for Python -#@desc 3.
-#@descThis operates by starting GDB on the Wine executable and passing arguments to launch a -#@desc Windows target. This may prevent GDB from processing the object file, because it is a PE -#@desc file, and most copies of GDB for UNIX will support only ELF. Nevertheless, Ghidra should -#@desc recognize the target and map it, giving you symbols and debug info in the front end, even -#@desc if not in the GDB CLI.
-#@descYou will need to locate the wine executable, not the script, on your system. To -#@desc find it, either dissect the wine script or consult online documentation for your -#@desc distribution of Wine. There are often two executables, one for 32-bit targets and one for -#@desc 64-bit targets. You must select the correct one.
+#@desc+#@desc This will launch the target on the local machine using gdb and wine. +#@desc For setup instructions, press F1. +#@desc
#@desc #@menu-group cross #@icon icon.debugger @@ -37,7 +28,7 @@ #@arg :str "Image" "The target binary executable image" #@args "Arguments" "Command-line arguments to pass to the target" #@env OPT_WINE_PATH:str="/usr/lib/wine/wine64" "Path to wine binary" "The path to the wine executable for your target architecture." -#@env OPT_GDB_PATH:str="gdb" "Path to gdb" "The path to gdb. Omit the full path to resolve using the system PATH." +#@env OPT_GDB_PATH:str="gdb" "gdb command" "The path to gdb. Omit the full path to resolve using the system PATH." #@env OPT_EXTRA_TTY:bool=false "Inferior TTY" "Provide a separate terminal emulator for the target." #@tty TTY_TARGET if env:OPT_EXTRA_TTY diff --git a/Ghidra/Debug/Debugger-agent-lldb/data/debugger-launchers/local-lldb.sh b/Ghidra/Debug/Debugger-agent-lldb/data/debugger-launchers/local-lldb.sh index 3b6f364c577..d94d836d103 100755 --- a/Ghidra/Debug/Debugger-agent-lldb/data/debugger-launchers/local-lldb.sh +++ b/Ghidra/Debug/Debugger-agent-lldb/data/debugger-launchers/local-lldb.sh @@ -17,9 +17,10 @@ #@title lldb #@desc #@descThis will launch the target on the local machine using lldb. LLDB must already -#@desc be installed on your system, and it must embed the Python 3 interpreter. You will also -#@desc need protobuf and psutil installed for Python 3.
+#@desc+#@desc This will launch the target on the local machine using lldb. +#@desc For setup instructions, press F1. +#@desc
#@desc #@menu-group local #@icon icon.debugger @@ -27,7 +28,7 @@ #@enum StartCmd:str "process launch" "process launch --stop-at-entry" #@arg :str "Image" "The target binary executable image" #@args "Arguments" "Command-line arguments to pass to the target" -#@env OPT_LLDB_PATH:str="lldb" "Path to lldb" "The path to lldb. Omit the full path to resolve using the system PATH." +#@env OPT_LLDB_PATH:str="lldb" "lldb command" "The path to lldb. Omit the full path to resolve using the system PATH." #@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 diff --git a/Ghidra/Debug/Debugger-agent-lldb/data/debugger-launchers/remote-lldb.sh b/Ghidra/Debug/Debugger-agent-lldb/data/debugger-launchers/remote-lldb.sh index 84d0b3f94ac..c7ac062620f 100755 --- a/Ghidra/Debug/Debugger-agent-lldb/data/debugger-launchers/remote-lldb.sh +++ b/Ghidra/Debug/Debugger-agent-lldb/data/debugger-launchers/remote-lldb.sh @@ -18,15 +18,10 @@ #@no-image #@desc #@descThis will start lldb on the local system and then use it to connect to the remote system. -#@desc The actual command used is, e.g:
-#@descgdb-remote host:port-#@desc
It may be worth testing this manually to ensure everything is configured correctly. -#@desc LLDB must be installed on your local system, it must be compatible with the remote system, -#@desc and it must embed the Python 3 interpreter. You will also need protobuf installed -#@desc for Python 3 on the local system. There are no Python requirements for the remote system. -#@desc Please ensure that Ghidra's current program and the target's image match. Otherwise, the -#@desc modules may not map.
+#@desc+#@desc This will start lldb on the local system and then use it to connect to the remote system. +#@desc For setup instructions, press F1. +#@desc
#@desc #@menu-group remote #@icon icon.debugger @@ -34,7 +29,7 @@ #@env OPT_HOST:str="localhost" "Host" "The hostname of the target" #@env OPT_PORT:str="9999" "Port" "The host's listening port" #@env OPT_ARCH:str="" "Architecture" "Target architecture override" -#@env OPT_LLDB_PATH:str="lldb" "Path to lldb" "The path to lldb on the local system. Omit the full path to resolve using the system PATH." +#@env OPT_LLDB_PATH:str="lldb" "lldb command" "The path to lldb on the local system. Omit the full path to resolve using the system PATH." if [ -d ${GHIDRA_HOME}/ghidra/.git ] then diff --git a/Ghidra/Debug/Debugger-rmi-trace/data/debugger-launchers/raw-python3.sh b/Ghidra/Debug/Debugger-rmi-trace/data/debugger-launchers/raw-python3.sh index 823881931d6..bdc3eb8ac10 100755 --- a/Ghidra/Debug/Debugger-rmi-trace/data/debugger-launchers/raw-python3.sh +++ b/Ghidra/Debug/Debugger-rmi-trace/data/debugger-launchers/raw-python3.sh @@ -19,14 +19,15 @@ #@no-image #@desc #@descThis will start python, import ghidratrace and connect to it. -#@desc This connector is made for those wanting to explore the TraceRMI API and possibly develop -#@desc a new connector. You will need protobuf installed for Python 3.
+#@desc+#@desc This will start python, import ghidratrace and connect to it for development purposes. +#@desc For setup instructions, press F1. +#@desc
#@desc #@menu-group raw #@icon icon.debugger #@help TraceRmiLauncherServicePlugin#python_raw -#@env OPT_PYTHON_EXE:str="python" "Path to python" "The path to the Python 3 interpreter. Omit the full path to resolve using the system PATH." +#@env OPT_PYTHON_EXE:str="python" "python command" "The path to the Python 3 interpreter. Omit the full path to resolve using the system PATH." #@env OPT_LANG:str="DATA:LE:64:default" "Ghidra Language" "The Ghidra LanguageID for the trace" #@env OPT_COMP:str="pointer64" "Ghidra Compiler" "The Ghidra CompilerSpecID for the trace" diff --git a/Ghidra/Debug/Debugger-rmi-trace/src/main/help/help/topics/TraceRmiLauncherServicePlugin/TraceRmiLauncherServicePlugin.html b/Ghidra/Debug/Debugger-rmi-trace/src/main/help/help/topics/TraceRmiLauncherServicePlugin/TraceRmiLauncherServicePlugin.html index cc90ae864a8..ca64099f65d 100644 --- a/Ghidra/Debug/Debugger-rmi-trace/src/main/help/help/topics/TraceRmiLauncherServicePlugin/TraceRmiLauncherServicePlugin.html +++ b/Ghidra/Debug/Debugger-rmi-trace/src/main/help/help/topics/TraceRmiLauncherServicePlugin/TraceRmiLauncherServicePlugin.html @@ -105,21 +105,57 @@Once running, you are presented with GDB's command-line interface in Ghidra's Terminal. This - is the bona fide GDB command-line interface, so it has all the functionality you would - expect. If you command GDB from this shell, the plugin will keep Ghidra in sync. The terminal - can also be used to interact with the target application when it is running. The plugin - provides an additional set of commands for managing the connection to Ghidra, as well as - controlling trace synchronization. These are all in the "ghidra" command prefix. You - can use tab completion to enumerate the available commands and GDB's "help" command to - examine their documentation.
+You must have GDB installed on the local system, and it must embed the Python 3 interpreter. + If you have access to PyPI, setting up your Python 3 environment is done using Pip. Please note + the version specifier for Protobuf.
+ ++python3 -m pip install psutil protobuf==3.20.3 ++
If you are offline, or would like to use our provided packages, we still use Pip, but with a + more complicated invocation:
+ ++cd /path/to/ghidra_ +version/Ghidra/Debug +python3 -m pip install --no-index -f Debugger-rmi-trace/pypkg/dist -f Debugger-agent-gdb/pypkg/dist psutil protobuf ++
Beware that GDB may embed a different Python interpreter than your system's default. If you + are still getting import errors, check the version that GDB embeds:
+ ++(bash)$ gdb +(gdb) python-interactive +>>> import sys +>>> sys.version ++
Note the version and ensure that you are invoking Pip with that version. Supposing + sys.version indicates 3.10, you should invoke Pip using python3.10 -m + pip.
+ +Once running, you are presented with GDB's command-line interface in Ghidra's Terminal. This + is the bona fide GDB command-line interface, so it has all the functionality you would + expect. If you command GDB from this shell, the plugin will keep Ghidra in sync. The terminal + can also be used to interact with the target application when it is running. The plugin + provides an additional set of commands for managing the connection to Ghidra, as well as + controlling trace synchronization. These are all in the "ghidra" command prefix. You + can use tab completion to enumerate the available commands and GDB's "help" command to + examine their documentation.
+This works the same as the GDB launcher, but runs gdb on a remote system via @@ -152,10 +197,30 @@
You must install GDB and an SSH server onto the target host. Your local SSH client must + support remote port forwarding (-R option) and terminal allocation (-t option), and + the remote server must be configured to permit them.
+ +You will need to manually install the required Python packages on the target host, + comprising our plugin for GDB and its dependencies. Copy all of the Python packages from + Ghidra/Debug/Debugger-rmi-trace/pypkg/dist/ and + Ghidra/Debug/Debugger-agent-gdb/pypkg/dist/ to the remote system. It is easiest to put + them all in one directory, e.g., ~/ghidra-pypgk/. Then install them:
+ ++python3 -m pip install --no-index -f ~/ghidra-pypkg/ ghidragdb ++
Please see GDB Setup for notes about embedded Python interpreter + versions.
This works similarly to the GDB via SSH launcher, but instead of tunneling the Trace RMI - connection, tunnels the RSP (gdbserver) connection. There is actually a fairly elegant method - of doing this straight from within gdb, which is exactly what this launcher does:
+ connection, tunnels the RSP (gdbserver) connection. There is actually a fairly elegant + method of doing this straight from within gdb, which is exactly what this launcher + does:You must have GDB installed on the local system and a compatible version of + gdbserver installed on the target system. You must have an SSH server installed on the + target system. It may be worth testing your setup manually (outside of Ghidra) to ensure + everything is configured correctly. On the local system, follow the steps given in GDB Setup. There are no additional Python requirements on the target + system.
+This launcher orchestrates a QEMU user-mode target and connects to it using our Python - plugin for GDB. You will almost certainly need the "multiarch" build of GDB, and by default, - the launcher will try to use gdb-multiarch. You must also install the appropriate - build of QEMU for your target architecture. Ghidra will inspect the current program and attempt - to map its language to the appropriate QEMU command, but this may fail, or be subtly - incorrect.
+ plugin for GDB. Ghidra will inspect the current program and attempt to map its language to the + appropriate QEMU command, but this may fail, or be subtly incorrect. + +You must acquire a version of QEMU and GDB that support the target architecture. On many + distributions of Linux, you can install gdb-multiarch. Follow the steps given in GDB Setup.
This launchers runs wine in a gdb session on Linux and directs it to a target Windows executable. There are other ways to rig a Windows target in GDB on Linux, but - this is the method we have chosen: You will need to install Wine on your system and locate the - actual wine executable. These are often in some library directory and named - "wine32" or "wine64." To find them, either examine the file list of the - installed package, or dissect the wrapper wine script, usually on your path:
+ this is the method we have chosen. This may prevent GDB from processing the object file, + because it is a PE file, and most copies of GDB for UNIX will support only ELF. Nevertheless, + Ghidra should recognize the target and map it, giving you symbols and debug info in the front + end, even if not in the GDB CLI. + +In addition to the steps given in GDB Setup, you must install Wine + on your system. Prepare for configuration by locating the actual wine executable. + These are often in some library directory and named "wine32" or "wine64." To + find them, either examine the file list of the installed package, or dissect the wrapper + wine script, usually on your path:
On your local system, follow the steps given in GDB Setup. Your + version of GDB must be compatible with the stub (e.g., gdbserver) on the target + system. There are no additional requirements on the target system.
+ +NOTE: The target program image must match that imported in Ghidra, or else things may + not map or synchronize correctly.
+Follow the steps given in GDB Setup.
+This launcher is a Python plugin for LLDB, and so is well suited for debugging user-space targets on a variety of platforms. It is the de facto debugger for macOS. It can be - obtained by installing XCode from the App Store. Though it may require a bit more careful + obtained by installing Xcode from the App Store. Though it may require a bit more careful configuration, it can also be obtained from other repositories like brew.
-Once running, you are presented with LLDB's command-line interface in Ghidra's Terminal. - This is the bona fide LLDB command-line interface, so it has all the functionality you - would expect. If you command LLDB from this shell, the plugin will keep Ghidra in sync. The - terminal can be used to interact with the target application when it is running. The plugin - provides an additional set of commands for managing the connection to Ghidra, as well as - controlling trace synchronization. These are all in the "ghidra" category. You can use - tab completion to enumerate the available commands and LLDB's "help" command to - examine their documentation.
+You must have LLDB installed on the local system, and it must embed the Python 3 + interpreter. If you have access to PyPI, setting up your Python 3 environment is done using + Pip. Please note the version specifier for Protobuf.
+ ++python3 -m pip install psutil protobuf==3.20.3 ++
If you are offline, or would like to use our provided packages, we still use Pip, but with a + more complicated invocation:
+ ++cd /path/to/ghidra_ +version/Ghidra/Debug +python3 -m pip install --no-index -f Debugger-rmi-trace/pypkg/dist -f Debugger-agent-lldb/pypkg/dist psutil protobuf ++
Beware that LLDB may embed a different Python interpreter than your system's default. If you + are still getting import errors, check the version that LLDB embeds:
+ ++(bash)$ lldb +(lldb) script +>>> import sys +>>> sys.version ++
Note the version and ensure that you are invoking Pip with that version. Supposing + sys.version indicates 3.10, you should invoke Pip using python3.10 -m + pip.
Once running, you are presented with LLDB's command-line interface in Ghidra's Terminal. + This is the bona fide LLDB command-line interface, so it has all the functionality you + would expect. If you command LLDB from this shell, the plugin will keep Ghidra in sync. The + terminal can be used to interact with the target application when it is running. The plugin + provides an additional set of commands for managing the connection to Ghidra, as well as + controlling trace synchronization. These are all in the "ghidra" category. You can use + tab completion to enumerate the available commands and LLDB's "help" command to + examine their documentation.
+This launcher can target any TCP-based GDB stub that is compatible with a local copy of @@ -465,6 +607,15 @@
On your local system, follow the steps given in LLDB Setup. Your + version of LLDB must be compatible with the stub (e.g., gdbserver) on the target + system. There are no additional requirements on the target system.
+ +NOTE: The target program image must match that imported in Ghidra, or else things may + not map or synchronize correctly.
+Once running, you are presented with a command-line interface in Ghidra's Terminal. This CLI - accepts your usual WinDbg (kd) commands. You can escape from this CLI and enter a Python 3 REPL - by entering ".exit". This is not an actual kd command, but our implementation - understands this to mean exit the kd REPL. From the Python 3 REPL, you can access the - underlying Python-based API pybag. This is an uncommon need, but may be useful for - diagnostics and/or workarounds. To re-enter the kd REPL, enter "repl()". - Alternatively, if you are trying to quit, but typed ".exit", just type - "quit()" to terminate the session.
+Please note on some system configurations, one of the debugger's dependencies + dbghelp.dll may get loaded from the system directory instead of from the WinDbg + installation, usually because a security product has pre-loaded it into the Python process. You + might work around this by copying the affected DLLs from your WinDbg installation into your + Python installation.
+ +Installing WinDbg is highly recommended. If you wish to forego installing WinDbg, you can + use the DLL provided with Windows, which is substantially less capable, by manually pointing + this connector to C:\Windows\system32. If you do this, some commands, e.g. + .server, will not be available.
+ +If you have access to PyPI, setting up your Python 3 environment is done using Pip. Please + note the version specifier for Protobuf.
+ ++python3 -m pip install pybag protobuf==3.20.3 ++
If you are offline, or would like to use our provided packages, we still use Pip, but with a + more complicated invocation:
+ ++cd /path/to/ghidra_ +version/Ghidra/Debug +python3 -m pip install --no-index -f Debugger-rmi-trace/pypkg/dist -f Debugger-agent-dbgeng/pypkg/dist pybag protobuf ++
If you get an import error regarding distutils, it is due to a transitive + dependency on a buggy version of capstone. Work around it by installing + setuptools.
Once running, you are presented with a command-line interface in Ghidra's Terminal. This CLI + accepts your usual WinDbg (kd) commands. You can escape from this CLI and enter a Python 3 REPL + by entering ".exit". This is not an actual kd command, but our implementation + understands this to mean exit the kd REPL. From the Python 3 REPL, you can access the + underlying Python-based API pybag. This is an uncommon need, but may be useful for + diagnostics and/or workarounds. To re-enter the kd REPL, enter "repl()". + Alternatively, if you are trying to quit, but typed ".exit", just type + "quit()" to terminate the session.
+This is a nascent extension to our launcher for the Windows Debugger. The launcher itself @@ -584,10 +771,36 @@
If you have access to PyPI, setting up your Python 3 environment is done using Pip. Please + note the version specifier for Protobuf.
+ ++python3 -m pip install protobuf==3.20.3 ++
If you are offline, or would like to use our provided packages, we still use Pip, but with a + more complicated invocation:
+ ++cd /path/to/ghidra_ +version/Ghidra/Debug +python3 -m pip install --no-index -f Debugger-rmi-trace/pypkg/dist protobuf ++
sEZFv?>qBo6xwQQ-m?XJKK1Y1TV$C9s=ZTwJ{Ddo1`?
z(d+8s6odh<{gPz0^-PQAzL1!Vr6nUNlUAj<7=Ow1w030gn;#z&>hl>X0s{lPeGD1E
zFMj@{b;8}t<2eWJvZz=lEoC7gA>DFSqj``aKUxoDK9-g~8?YM8mSR@Dh u605wk(DVdu@)h
z#_Cm?<98|2Y)w`&3 9m5$XsXC7y4uz
z6-LTWO+{5IP!z9Pq*>Mwup-8q4eE%@BJ_Z~+l8cpb0y`oc*Qd`r&jK<2lubM#QycX
zf$Hk0(~{K`T|);d<@h+~!^!VpctUq#L~Hda@HuxlXK LBmNwxE%>cEA?Hk=PPMppaM
zn!GOG%FBmYJKSEj_dDkHQb!b{0zan`ye8$M%oj27@7I#_50#pm2WEN(#dWcq3Yzut
z@$sr&PT&VWzr)Q5c3xhM3(T;)3v=HFs2O;8;wPYkl=x8R{I!jZI=e;j$*93K5fPEP
z9%vk0CT@-J)o%C&f6dk9xdS<%?>RS@e86K38X;t2`4udX$N#*lUZWdxh+XH8IiynW
zY-LR7U0-K8!KOqQH?5E4j%-pwLDAW9iM!>rN
z{m%ve?^2bP!ji
NMe)YhHcZ4e5H))emIXX!Qcl>_|D*i9}w7srzZ?S}(Qu_3;$+fy(Y_W5!|%F|@2
zma}i-XYXfYBaDLZpI&~T!6K`pTal#Bdib+VJROk^2YiI}E&K*q2+?P}op$;|GeQ8A
zr*SbeodD&Te?gjFKEG{4U^;@kPP;kOB5KNlTOo(5HHsd=ybrn9t{I8%IlJo(+@N}Z
zu`G%2eentDyA7==w-fGAilhgXjMRVg&S`65f8JSGwCQtBue}}Wi2?3;4ODjHYYv>k
zW3uc8_jOV&wtcdd%UJxO1sBy51$*1vg+XHV39;o;3I8bU?aDrf!?pgROpkCcgt*L1
z^mD)%$1z$6n0l(rzfp4$mmW>m&Zi47kzfbKZI1tcClC-@
zkm^c-{RpVrK!2Br3?7@oB_-Y2+rx-~Ith(OT`ywkF;#^Ag3GlE!61LBQvVrbg`m~~
zHob