The Debugger has an updated and simplified launcher system. A nice collection of basic
- launchers for our supported platforms are provided out of the box. For Linux, we provide a
- suite of GDB-based launchers. For macOS, we provide a suite of LLDB-based launchers (though,
- these work on Linux, too). For Windows, we provide a launcher based on the Windows Debugger
- (dbgeng.dll and dbgmodel.dll). Help is available for each in its respective
- sub-topic.
+
A nice collection of basic launchers for our supported platforms are provided out of the
+ box. For Linux, we provide a suite of GDB-based launchers. For macOS, we provide a suite of
+ LLDB-based launchers (though, these work on Linux, too). For Windows, we provide a launcher
+ based on the Windows Debugger (dbgeng.dll and dbgmodel.dll). Help is
+ available for each in its respective sub-topic.
Each launcher automates the creation of a Trace RMI acceptor,
- executes the back-end shell script in a Terminal, then waits for the resulting target trace. In
- contrast to the previous system, the Terminal is the first and most basic interface presented.
- Even if just about everything else goes wrong, the terminal should still be faithfully
- operational:
+ executes the back-end shell script in a Terminal, then waits for the resulting target trace.
+ The Terminal is the first and most basic interface presented. Even if just about everything
+ else goes wrong, the terminal should still operate faithfully:
@@ -35,28 +33,23 @@
the rest of Ghidra's windows. It provides fairly robust VT-100 emulation. Thus, the user
experience from the Terminal is nearly identical to using the same debugger outside of Ghidra.
This terminal-first approach also ensures that you interact with the target application's
- standard I/O. This was not possible in the previous system, as we re-implemented the CLI using
- the back end's execute method. The debugger's (and so also the target's) actual I/O
- streams were hidden away within a GDB/MI wrapper.
+ standard I/O.
-
Each launcher script sets up a — usually Python — environment, launches the
- actual debugger, and provides a sequence of commands for it to load the Trace RMI plugin,
- connect back to Ghidra, launch the actual target process, and start the target trace. At this
- point, the plugin generally takes over, reacting to user and target events, accepting front-end
- requests, and generally keeping Ghidra and the back end synchronized.
+
Each launcher script sets up an environment, launches the actual debugger, and provides a
+ sequence of commands for it to load the Trace RMI plugin, connect back to Ghidra, launch the
+ actual target process, and start the target trace. At this point, the plugin generally takes
+ over, reacting to user and target events, accepting front-end requests, and generally keeping
+ Ghidra and the back end synchronized.
-
The list of launchers can be accessed in either of two places:
- 1) In the Debugger → Configure and Launch ... menu or more conveniently from the
- Launch button in the main toolbar. This is the blue bug
- button near the top center. The Configure and Launch ... menu lists all available
- launchers. Selecting one will prompt for its options then launch. To re-launch quickly, use the
- Launch button. Clicking it will re-launch using the most recent launcher and
- configuration for the current program. If this is the first launch of the given program, the
- button will instead activate its drop-down menu. The drop-down is also accessible by clicking
- the down arrow next to the Launch button. The drop-down lists all launchers that have
- been previously configured for the current program. Clicking one will immediately launch the
- program without prompting. The Configure and Launch ... sub-menu of the drop-down
- functions exactly like in the Debugger menu.
+
The list of launchers can be accessed conveniently from the
+ Launch button's drop-down menu in the main toolbar. This is the blue bug button near the top center. The Launch [program] ... submenus list
+ all available launchers for each open program. There is also an Empty session ...
+ submenu which lists all launchers that can operate without a program. Selecting one will prompt
+ for its options then launch. To quickly re-launch using the most recent configuration, click
+ the Launch button — not its drop-down. The drop-down menu also lists the most
+ recent launch configuration. Clicking it will immediately launch without prompting, unless you
+ hold SHIFT.
The Terminal provides some fairly standard actions. Other keyboard control sequences,
notably CTRL-C, are interpreted by the terminal, rather than Ghidra's action system, to
@@ -134,7 +127,7 @@
In the Debugger tool, click the dropdown ▾ for the debug icon in the global tool
-bar, and select Configure and Launch termmines using… →
-gdb.
+bar, and select Launch termmines … → gdb.
@@ -263,7 +259,7 @@ specimen. This is the engine that backs WinDbg. You may choose an
alternative Minesweeper, since terminal applications are less
representative of Windows executables. Follow the same process as for
Linux, except import termmines.exe and select
-Configure and Launch termmines.exe using… → dbgeng.
+Launch termmines.exe … → dbgeng.
Launching on macOS
@@ -300,19 +296,6 @@ tool. If it is still not there, then you may need to re-import the
default Debugger tool as under the previous heading. If it is still not
there, your installation may be corrupt.
-
-
There is no gdb option in the launch drop-down
-
You may have an older Debugger tool still configured for
-Recorder-based targets. We are transitioning to TraceRmi-based targets.
-Delete your Debugger tool and re-import the default one using the
-instructions above. If it is still not there, it’s possible your
-installation is corrupt. Search for a file called
-local-gdb.sh in your installation. Unlike the previous
-system, Trace RMI will not probe your system for dependencies nor hide
-incompatible launchers. All installed launchers should be present in the
-menus, even though some may not work on your configuration.
-
@@ -329,9 +312,11 @@ you are missing gdb, or you need to tell Ghidra where to
find it.
If it is just missing, then install it and try again. If you need to
tell Ghidra where it is, then in the launcher drop-down, select
-Configure and Launch termmines using… → gdb. DO NOT
-select Re-launch termmines using gdb, since this will
-not allow you to correct the configuration.
+Launch termmines … → gdb. Alternatively, hold
+SHIFT and select Re-launch
+termmines in gdb. If you forget to hold
+SHIFT, it will not prompt you before
+launching.
If it looks like there’s an error about importing python packages,
e.g., “google protobuf,” then you need to install some dependencies.
These are listed in the launcher’s description. For your convenience,
@@ -365,12 +350,13 @@ class="level4">
specimen has a main symbol. NOTE: It is
not sufficient to place a main label in Ghidra. The
original file must have a main symbol.
-
Alternatively, in the menus try Debugger → Configure and
-Launch termmines using → gdb, and select “starti” for
-Run Command. This will break at the system entry point.
-If you have labeled main in Ghidra, then you can place a
-breakpoint there and continue — these features are covered later in the
-course.
+
Alternatively, from the launcher drop-down, hold
+SHIFT and click Re-launch
+termmines in gdb. Try selecting “starti” for Run
+Command, then launch. This will break at the system entry
+point. If you have labeled main in Ghidra, then you can
+place a breakpoint there and continue — these features are covered later
+in the course.
Alternatively, try debugging the target in GDB from a separate
terminal completely outside of Ghidra to see if things work as
expected.
@@ -426,16 +412,16 @@ exercise. Disconnect before proceeding to the next exercise.
Customized Launching
For this specimen, you may occasionally need to provide custom
command-line parameters. By default, Ghidra attempts to launch the
-target without any parameters. In the Debugger menu, or
-the Launch button’s drop-down menu, use
-Configure and Launch termmmines → gdb to adjust your
-configuration. This is where you can specify the image path and
-command-line parameters of your target. Ghidra will remember this
-configuration the next time you launch using the drop-down button from
-the toolbar. Launchers with memorized configurations are presented as
-Re-launch termmines using… options. Using one of those
-entries will re-launch with the saved configuration rather than
-prompting.
+target without any parameters. In the Launch button’s
+drop-down menu, select Launch termmmines … → gdb to
+adjust your configuration. This is where you can specify the image path
+and command-line parameters of your target. Ghidra will save this
+configuration when you launch. Launchers with saved configurations are
+presented as entries in the Re-launch [program] …
+submenu. The most-recently saved entry is also presented at the top of
+the launch menu. Selecting one of those entries will re-launch that
+configuration. To adjust a saved configuration, hold
+SHIFT while selecting its entry.
Exercise: Launch with Command-line Help
@@ -449,18 +435,14 @@ its usage, and as a result, the rest of the UI will be mostly empty.
Attaching is slightly more advanced, but can be useful if the target
is part of a larger system, and it needs to be running in situ.
For this section, we will just run termmines in a separate
-terminal and then attach to it from Ghidra. This used to be required,
-because the older Recorder-based system did not provide target I/O, but
-this limitation is overcome by the new Terminal window
-when using Trace RMI. Note this technique is only possible because the
-target waits for input.
+terminal and then attach to it from Ghidra. Note this technique is only
+possible because the target waits for input.
Run termmines in a terminal outside of Ghidra with the
desired command-line parameters.
In the Ghidra Debugger, use the Launch button
-drop-down and select Configure and Launch termmines using… →
-gdb.
-
Clear the Image field to configure a GDB session
+drop-down and select Empty session … → gdb. The
+Image field should be blank to configure a GDB session
without a target.
Ghidra needs to know the location of gdb and the architecture of the
intended target. The defaults are correct for 64-bit x86 targets using
diff --git a/GhidraDocs/GhidraClass/Debugger/A1-GettingStarted.md b/GhidraDocs/GhidraClass/Debugger/A1-GettingStarted.md
index 3d2968c1a1..650d97ef00 100644
--- a/GhidraDocs/GhidraClass/Debugger/A1-GettingStarted.md
+++ b/GhidraDocs/GhidraClass/Debugger/A1-GettingStarted.md
@@ -58,7 +58,7 @@ There are many ways to do this, but for the sake of simplicity, import and launc

-1. In the Debugger tool, click the dropdown ▾ for the debug  icon in the global tool bar, and select **Configure and Launch termmines using... → gdb**.
+1. In the Debugger tool, click the dropdown ▾ for the debug  icon in the global tool bar, and select **Launch termmines ... → gdb**.

@@ -74,7 +74,7 @@ There are many ways to do this, but for the sake of simplicity, import and launc
On Windows, we will use the Windows Debugger dbgeng.dll to debug the specimen.
This is the engine that backs WinDbg.
You may choose an alternative Minesweeper, since terminal applications are less representative of Windows executables.
-Follow the same process as for Linux, except import `termmines.exe` and select **Configure and Launch termmines.exe using... → dbgeng**.
+Follow the same process as for Linux, except import `termmines.exe` and select **Launch termmines.exe ... → dbgeng**.
## Launching on macOS
@@ -106,16 +106,6 @@ Double-check that you are in the Debugger tool, not the CodeBrowser tool.
If it is still not there, then you may need to re-import the default Debugger tool as under the previous heading.
If it is still not there, your installation may be corrupt.
-### There is no **gdb** option in the launch drop-down
-
-You may have an older Debugger tool still configured for Recorder-based targets.
-We are transitioning to TraceRmi-based targets.
-Delete your Debugger tool and re-import the default one using the instructions above.
-If it is still not there, it's possible your installation is corrupt.
-Search for a file called `local-gdb.sh` in your installation.
-Unlike the previous system, Trace RMI will not probe your system for dependencies nor hide incompatible launchers.
-All installed launchers should be present in the menus, even though some may not work on your configuration.
-
### The launch hangs for several seconds and then I get prompted with a wall of text
Read the wall of text.
@@ -127,8 +117,9 @@ Once you have found the Terminal, check its output *starting at the top* for dia
If you have something like `bash: gdb: command not found`, it is because you are missing `gdb`, or you need to tell Ghidra where to find it.
If it is just missing, then install it and try again.
-If you need to tell Ghidra where it is, then in the launcher drop-down, select **Configure and Launch termmines using... → gdb**.
-DO NOT select **Re-launch termmines using gdb**, since this will not allow you to correct the configuration.
+If you need to tell Ghidra where it is, then in the launcher drop-down, select **Launch termmines ... → gdb**.
+Alternatively, hold **`SHIFT`** and select **Re-launch termmines in gdb**.
+If you forget to hold **`SHIFT`**, it will not prompt you before launching.
If it looks like there's an error about importing python packages, e.g., "google protobuf," then you need to install some dependencies.
These are listed in the launcher's description.
@@ -157,7 +148,8 @@ Check that the specimen has a `main` symbol.
**NOTE**: It is not sufficient to place a `main` label in Ghidra.
The original file must have a `main` symbol.
-Alternatively, in the menus try **Debugger → Configure and Launch termmines using → gdb**, and select "starti" for **Run Command**.
+Alternatively, from the launcher drop-down, hold **`SHIFT`** and click **Re-launch termmines in gdb**.
+Try selecting "starti" for **Run Command**, then launch.
This will break at the system entry point.
If you have labeled `main` in Ghidra, then you can place a breakpoint there and continue — these features are covered later in the course.
@@ -198,11 +190,13 @@ Disconnect before proceeding to the next exercise.
For this specimen, you may occasionally need to provide custom command-line parameters.
By default, Ghidra attempts to launch the target without any parameters.
-In the **Debugger** menu, or the **Launch** button's drop-down menu, use **Configure and Launch termmmines → gdb** to adjust your configuration.
+In the **Launch** button's drop-down menu, select **Launch termmmines ... → gdb** to adjust your configuration.
This is where you can specify the image path and command-line parameters of your target.
-Ghidra will remember this configuration the next time you launch using the drop-down button from the toolbar.
-Launchers with memorized configurations are presented as **Re-launch termmines using...** options.
-Using one of those entries will re-launch with the saved configuration rather than prompting.
+Ghidra will save this configuration when you launch.
+Launchers with saved configurations are presented as entries in the **Re-launch [program] ...** submenu.
+The most-recently saved entry is also presented at the top of the launch menu.
+Selecting one of those entries will re-launch that configuration.
+To adjust a saved configuration, hold **`SHIFT`** while selecting its entry.
## Exercise: Launch with Command-line Help
@@ -214,13 +208,11 @@ When successful, you will see the usage info in the Debugger's **Terminal** wind
Attaching is slightly more advanced, but can be useful if the target is part of a larger system, and it needs to be running *in situ*.
For this section, we will just run `termmines` in a separate terminal and then attach to it from Ghidra.
-This used to be required, because the older Recorder-based system did not provide target I/O, but this limitation is overcome by the new **Terminal** window
-when using Trace RMI.
Note this technique is only possible because the target waits for input.
1. Run `termmines` in a terminal outside of Ghidra with the desired command-line parameters.
-1. In the Ghidra Debugger, use the **Launch** button drop-down and select **Configure and Launch termmines using... → gdb**.
-1. Clear the **Image** field to configure a GDB session without a target.
+1. In the Ghidra Debugger, use the **Launch** button drop-down and select **Empty session ... → gdb**.
+ The **Image** field should be blank to configure a GDB session without a target.
1. Ghidra needs to know the location of gdb and the architecture of the intended target.
The defaults are correct for 64-bit x86 targets using the system's copy of GDB.
1. Click **Launch**.