diff --git a/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerBreakpointsPlugin/DebuggerBreakpointsPlugin.html b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerBreakpointsPlugin/DebuggerBreakpointsPlugin.html index daa63d1045..813e16dbd2 100644 --- a/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerBreakpointsPlugin/DebuggerBreakpointsPlugin.html +++ b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerBreakpointsPlugin/DebuggerBreakpointsPlugin.html @@ -149,8 +149,11 @@
JZ 0x00401234. Then, the
injection can jump straight to the target:
-goto [0x00401234]; +goto 0x00401234;diff --git a/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerBreakpointsPlugin/images/DebuggerBreakpointsPlugin.png b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerBreakpointsPlugin/images/DebuggerBreakpointsPlugin.png index 77722233b8..5615abc9f6 100644 Binary files a/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerBreakpointsPlugin/images/DebuggerBreakpointsPlugin.png and b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerBreakpointsPlugin/images/DebuggerBreakpointsPlugin.png differ diff --git a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/breakpoint/BreakpointLocationRow.java b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/breakpoint/BreakpointLocationRow.java index c835c5c32a..543972d6ea 100644 --- a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/breakpoint/BreakpointLocationRow.java +++ b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/breakpoint/BreakpointLocationRow.java @@ -25,6 +25,7 @@ import ghidra.pcode.exec.SleighUtils; import ghidra.program.model.address.Address; import ghidra.program.util.ProgramLocation; import ghidra.trace.model.breakpoint.TraceBreakpointLocation; +import ghidra.trace.model.breakpoint.TraceBreakpointSpec; public class BreakpointLocationRow { private final DebuggerBreakpointsProvider provider; @@ -113,6 +114,15 @@ public class BreakpointLocationRow { } } + public String getExpression() { + TraceBreakpointSpec spec = loc.getSpecification(); + if (spec == null) { + // Shouldn't happen, but may in the interim + return ""; + } + return spec.getExpression(getSnap()); + } + public boolean hasSleigh() { return !SleighUtils.UNCONDITIONAL_BREAK.equals(loc.getEmuSleigh(getSnap())); } diff --git a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/breakpoint/DebuggerBreakpointsProvider.java b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/breakpoint/DebuggerBreakpointsProvider.java index c7a90e983b..88d460684b 100644 --- a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/breakpoint/DebuggerBreakpointsProvider.java +++ b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/breakpoint/DebuggerBreakpointsProvider.java @@ -70,8 +70,9 @@ public class DebuggerBreakpointsProvider extends ComponentProviderAdapter protected enum LogicalBreakpointTableColumns implements EnumeratedTableColumn
srand.srand.You goal is to capture the location of all the mines. You will +
Your goal is to capture the location of all the mines. You will
probably want to disable the breakpoints on rand and
srand for now. Devise a strategy using breakpoints and the
control buttons (Step, Resume, etc.) so that you can observe the
diff --git a/GhidraDocs/GhidraClass/Debugger/A3-Breakpoints.md b/GhidraDocs/GhidraClass/Debugger/A3-Breakpoints.md
index a42cc52a02..3e4149b703 100644
--- a/GhidraDocs/GhidraClass/Debugger/A3-Breakpoints.md
+++ b/GhidraDocs/GhidraClass/Debugger/A3-Breakpoints.md
@@ -88,7 +88,7 @@ The State, Address, and Sleigh columns are the same as the top, but for the indi
* The **Trace** column indicates which target contains the location.
The text here should match one of the tabs from the Dynamic Listing panel.
* The **Comment** column is a user-defined comment.
- Its default value is the specification that generated it, e.g., `srand`.
+* The **Expression** column is the expression given when specifying the breakpoint, e.g., `srand`.
### Toggling the Breakpoints
@@ -195,7 +195,7 @@ The advantages of a dynamic session along side static analysis should become mor
### Exercise: Diagram the Mines
-You goal is to capture the location of all the mines.
+Your goal is to capture the location of all the mines.
You will probably want to disable the breakpoints on `rand` and `srand` for now.
Devise a strategy using breakpoints and the control buttons (Step, Resume, etc.) so that you can observe the location of each mine.
Use pen and paper to draw a diagram of the board, and mark the location of each mine as you observe the algorithm placing it.
diff --git a/GhidraDocs/GhidraClass/Debugger/images/Breakpoints_EmptyAfterLaunch.png b/GhidraDocs/GhidraClass/Debugger/images/Breakpoints_EmptyAfterLaunch.png
index 3955c95344..f6a0e1bac2 100644
Binary files a/GhidraDocs/GhidraClass/Debugger/images/Breakpoints_EmptyAfterLaunch.png and b/GhidraDocs/GhidraClass/Debugger/images/Breakpoints_EmptyAfterLaunch.png differ
diff --git a/GhidraDocs/GhidraClass/Debugger/images/Breakpoints_PopAfterSRandRand.png b/GhidraDocs/GhidraClass/Debugger/images/Breakpoints_PopAfterSRandRand.png
index 26f01c8170..7efe94e1d6 100644
Binary files a/GhidraDocs/GhidraClass/Debugger/images/Breakpoints_PopAfterSRandRand.png and b/GhidraDocs/GhidraClass/Debugger/images/Breakpoints_PopAfterSRandRand.png differ
diff --git a/GhidraDocs/GhidraClass/Debugger/images/Breakpoints_SyncedAfterImportLibC.png b/GhidraDocs/GhidraClass/Debugger/images/Breakpoints_SyncedAfterImportLibC.png
index 856c2a4e5e..45a4123f2b 100644
Binary files a/GhidraDocs/GhidraClass/Debugger/images/Breakpoints_SyncedAfterImportLibC.png and b/GhidraDocs/GhidraClass/Debugger/images/Breakpoints_SyncedAfterImportLibC.png differ
diff --git a/GhidraDocs/GhidraClass/Debugger/images/GettingStarted_DisassemblyAfterLaunch.png b/GhidraDocs/GhidraClass/Debugger/images/GettingStarted_DisassemblyAfterLaunch.png
index 252c733b3e..6c75492991 100644
Binary files a/GhidraDocs/GhidraClass/Debugger/images/GettingStarted_DisassemblyAfterLaunch.png and b/GhidraDocs/GhidraClass/Debugger/images/GettingStarted_DisassemblyAfterLaunch.png differ
diff --git a/GhidraDocs/GhidraClass/Debugger/images/GettingStarted_ToolWSpecimen.png b/GhidraDocs/GhidraClass/Debugger/images/GettingStarted_ToolWSpecimen.png
index a5482ea5f6..8f59dccc5f 100644
Binary files a/GhidraDocs/GhidraClass/Debugger/images/GettingStarted_ToolWSpecimen.png and b/GhidraDocs/GhidraClass/Debugger/images/GettingStarted_ToolWSpecimen.png differ