From c7e16dd52774f75170f3bf6be41d3aea9f961dcf Mon Sep 17 00:00:00 2001
From: Dan <46821332+nsadeveloper789@users.noreply.github.com>
Date: Wed, 13 May 2026 14:02:44 +0000
Subject: [PATCH] GP-6799: Improve display of breakpiont 'kinds' in the UI.
Also shorter db/protocol encoding.
---
.../src/main/py/src/ghidradbg/commands.py | 4 +-
.../src/main/py/src/ghidragdb/commands.py | 12 +-
.../src/main/py/src/ghidralldb/commands.py | 10 +-
.../src/main/py/src/ghidraxdbg/commands.py | 6 +-
.../ghidra/debug/flatapi/FlatDebuggerAPI.java | 11 +-
.../service/tracermi/TraceRmiTarget.java | 12 +-
.../help/topics/Debugger/Troubleshooting.html | 27 +---
.../DebuggerBreakpointMarkerPlugin.html | 15 +--
.../images/DebuggerPlaceBreakpointDialog.png | Bin 7159 -> 7130 bytes
.../DebuggerBreakpointsPlugin.html | 4 +-
.../images/DebuggerBreakpointsPlugin.png | Bin 30477 -> 29745 bytes
.../images/DebuggerRegistersPlugin.png | Bin 29217 -> 33302 bytes
.../images/DebuggerStackPlugin.png | Bin 10867 -> 11816 bytes
.../images/DebuggerTimePlugin.png | Bin 16126 -> 16576 bytes
.../DebuggerTraceManagerServicePlugin.html | 5 +
.../DebuggerWatchesPlugin.html | 2 +
.../images/DebuggerWatchesPlugin.png | Bin 20247 -> 20858 bytes
.../gui/breakpoint/BreakpointLocationRow.java | 10 --
.../BreakpointsDecompilerMarginProvider.java | 11 +-
.../DebuggerBreakpointMarkerPlugin.java | 104 +++++++--------
.../DebuggerBreakpointsProvider.java | 10 +-
.../DebuggerPlaceBreakpointDialog.java | 56 +++-----
.../gui/breakpoint/LogicalBreakpointRow.java | 2 +-
.../timeline/BreakpointTimelinePanel.java | 18 +--
.../breakpoint/MappedLogicalBreakpoint.java | 3 +-
.../service/breakpoint/ProgramBreakpoint.java | 28 +++-
.../DebuggerEmulationServicePlugin.java | 15 +--
.../core/debug/taint/EmulatorTaintState.java | 13 +-
.../DebuggerMemviewPluginScreenShots.java | 13 +-
.../DebuggerRegistersPluginScreenShots.java | 23 +++-
.../stack/DebuggerStackPluginScreenShots.java | 11 +-
.../VariableValueHoverPluginScreenShots.java | 9 +-
.../DebuggerWatchesPluginScreenShots.java | 9 +-
.../gui/copying/DebuggerCopyPlanTest.java | 13 +-
.../DebuggerEmulationServiceTest.java | 22 ++--
.../core/debug/stack/StackUnwinderTest.java | 18 +--
.../breakpoint/DBTraceBreakpointSpec.java | 2 -
.../model/breakpoint/TraceBreakpointKind.java | 120 ++++++++++++------
.../DBTraceBreakpointManagerTest.java | 18 +--
...ggerBreakpointMarkerPluginScreenShots.java | 16 +--
.../DebuggerBreakpointsPluginScreenShots.java | 19 ++-
.../agent/dbgeng/rmi/DbgEngCommandsTest.java | 13 +-
.../agent/dbgeng/rmi/DbgEngMethodsTest.java | 18 ++-
.../java/agent/gdb/rmi/GdbCommandsTest.java | 17 +--
.../java/agent/gdb/rmi/GdbMethodsTest.java | 32 ++---
.../java/agent/lldb/rmi/LldbCommandsTest.java | 15 +--
.../java/agent/lldb/rmi/LldbMethodsTest.java | 19 +--
...actDebuggerBreakpointMarkerPluginTest.java | 92 ++++++--------
...stractDebuggerBreakpointsProviderTest.java | 10 +-
...DebuggerRmiBreakpointMarkerPluginTest.java | 25 ++--
.../DebuggerRmiBreakpointsProviderTest.java | 8 +-
...tDebuggerLogicalBreakpointServiceTest.java | 27 ++--
...buggerRmiLogicalBreakpointServiceTest.java | 16 +--
.../flatapi/AbstractFlatDebuggerAPITest.java | 4 +-
.../flatapi/DeadFlatDebuggerAPITest.java | 12 +-
.../GhidraClass/Debugger/A3-Breakpoints.html | 21 +--
.../GhidraClass/Debugger/A3-Breakpoints.md | 6 +-
.../images/Breakpoints_EmptyAfterLaunch.png | Bin 16609 -> 16666 bytes
.../images/Breakpoints_PopAfterSRandRand.png | Bin 26664 -> 25357 bytes
.../Breakpoints_SyncedAfterImportLibC.png | Bin 220877 -> 213979 bytes
.../GettingStarted_DisassemblyAfterLaunch.png | Bin 209260 -> 203275 bytes
.../images/GettingStarted_ToolWSpecimen.png | Bin 134933 -> 135033 bytes
62 files changed, 492 insertions(+), 514 deletions(-)
diff --git a/Ghidra/Debug/Debugger-agent-dbgeng/src/main/py/src/ghidradbg/commands.py b/Ghidra/Debug/Debugger-agent-dbgeng/src/main/py/src/ghidradbg/commands.py
index fc35765358..22f812de99 100644
--- a/Ghidra/Debug/Debugger-agent-dbgeng/src/main/py/src/ghidradbg/commands.py
+++ b/Ghidra/Debug/Debugger-agent-dbgeng/src/main/py/src/ghidradbg/commands.py
@@ -1076,10 +1076,10 @@ def put_single_breakpoint(bp, ibobj, nproc: int, ikeys: List[str]) -> None:
if bp.GetType()[0] == DbgEng.DEBUG_BREAKPOINT_DATA:
width, prot = bp.GetDataParameters()
width = str(width)
- prot = {4: 'HW_EXECUTE', 2: 'READ', 1: 'WRITE'}[prot]
+ prot = {4: 'X', 2: 'R', 1: 'W'}[prot]
else:
width = ' '
- prot = 'SW_EXECUTE'
+ prot = 'x'
if address is not None: # Implies execution break
base, addr = mapper.map(nproc, address)
diff --git a/Ghidra/Debug/Debugger-agent-gdb/src/main/py/src/ghidragdb/commands.py b/Ghidra/Debug/Debugger-agent-gdb/src/main/py/src/ghidragdb/commands.py
index 0eddc70ba9..da57d5498b 100644
--- a/Ghidra/Debug/Debugger-agent-gdb/src/main/py/src/ghidragdb/commands.py
+++ b/Ghidra/Debug/Debugger-agent-gdb/src/main/py/src/ghidragdb/commands.py
@@ -1101,22 +1101,22 @@ def put_single_breakpoint(b: gdb.Breakpoint, ibobj: TraceObject,
brkobj.set_value('Enabled', b.enabled)
if b.type == gdb.BP_BREAKPOINT:
brkobj.set_value('Expression', b.location)
- brkobj.set_value('Kinds', 'SW_EXECUTE')
+ brkobj.set_value('Kinds', 'x')
elif b.type == gdb.BP_HARDWARE_BREAKPOINT:
brkobj.set_value('Expression', b.location)
- brkobj.set_value('Kinds', 'HW_EXECUTE')
+ brkobj.set_value('Kinds', 'X')
elif b.type == gdb.BP_WATCHPOINT:
brkobj.set_value('Expression', b.expression)
- brkobj.set_value('Kinds', 'WRITE')
+ brkobj.set_value('Kinds', 'W')
elif b.type == gdb.BP_HARDWARE_WATCHPOINT:
brkobj.set_value('Expression', b.expression)
- brkobj.set_value('Kinds', 'WRITE')
+ brkobj.set_value('Kinds', 'W')
elif b.type == gdb.BP_READ_WATCHPOINT:
brkobj.set_value('Expression', b.expression)
- brkobj.set_value('Kinds', 'READ')
+ brkobj.set_value('Kinds', 'R')
elif b.type == gdb.BP_ACCESS_WATCHPOINT:
brkobj.set_value('Expression', b.expression)
- brkobj.set_value('Kinds', 'READ,WRITE')
+ brkobj.set_value('Kinds', 'RW')
else:
brkobj.set_value('Expression', '(unknown)')
brkobj.set_value('Kinds', '')
diff --git a/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py b/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py
index 49868e3930..9b8dbd5faf 100644
--- a/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py
+++ b/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py
@@ -1536,10 +1536,10 @@ def put_single_breakpoint(b: lldb.SBBreakpoint, proc: lldb.SBProcess) -> None:
bpt_obj = trace.create_object(bpt_path)
if b.IsHardware():
bpt_obj.set_value('Expression', util.get_description(b))
- bpt_obj.set_value('Kinds', 'HW_EXECUTE')
+ bpt_obj.set_value('Kinds', 'X')
else:
bpt_obj.set_value('Expression', util.get_description(b))
- bpt_obj.set_value('Kinds', 'SW_EXECUTE')
+ bpt_obj.set_value('Kinds', 'x')
cmdList = lldb.SBStringList()
if b.GetCommandLineCommands(cmdList):
list = []
@@ -1580,11 +1580,11 @@ def put_single_watchpoint(w: lldb.SBWatchpoint, proc: lldb.SBProcess) -> None:
wpt_obj = trace.create_object(wpt_path)
desc = util.get_description(w, level=0)
wpt_obj.set_value('Expression', desc)
- wpt_obj.set_value('Kinds', 'WRITE')
+ wpt_obj.set_value('Kinds', 'W')
if "type = r" in desc:
- wpt_obj.set_value('Kinds', 'READ')
+ wpt_obj.set_value('Kinds', 'R')
if "type = rw" in desc:
- wpt_obj.set_value('Kinds', 'READ,WRITE')
+ wpt_obj.set_value('Kinds', 'RW')
base, addr = mapper.map(proc, w.GetWatchAddress())
if base != addr.space:
trace.create_overlay_space(base, addr.space)
diff --git a/Ghidra/Debug/Debugger-agent-x64dbg/src/main/py/src/ghidraxdbg/commands.py b/Ghidra/Debug/Debugger-agent-x64dbg/src/main/py/src/ghidraxdbg/commands.py
index 441909881f..51e82b542d 100644
--- a/Ghidra/Debug/Debugger-agent-x64dbg/src/main/py/src/ghidraxdbg/commands.py
+++ b/Ghidra/Debug/Debugger-agent-x64dbg/src/main/py/src/ghidraxdbg/commands.py
@@ -967,12 +967,12 @@ def put_single_breakpoint(bp, bpath, nproc: int, ikeys: List[int]) -> None:
brkobj.set_value('Range', addr.extend(bp.hwSize))
brkobj.set_value('HitCount', bp.hitCount)
if bp.type == BreakpointType.BpNormal:
- brkobj.set_value('Kinds', 'SW_EXECUTE')
+ brkobj.set_value('Kinds', 'x')
if bp.type == BreakpointType.BpHardware:
- prot = {0: 'READ', 1: 'WRITE', 2: 'HW_EXECUTE'}[bp.typeEx]
+ prot = {0: 'R', 1: 'W', 2: 'X'}[bp.typeEx]
brkobj.set_value('Kinds', prot)
if bp.type == BreakpointType.BpMemory:
- prot = {0: 'READ', 1: 'WRITE', 2: 'HW_EXECUTE', 3: 'ACCESS'}[bp.typeEx]
+ prot = {0: 'R', 1: 'W', 2: 'X', 3: 'RW'}[bp.typeEx]
brkobj.set_value('Kinds', prot)
brkobj.insert()
diff --git a/Ghidra/Debug/Debugger-api/src/main/java/ghidra/debug/flatapi/FlatDebuggerAPI.java b/Ghidra/Debug/Debugger-api/src/main/java/ghidra/debug/flatapi/FlatDebuggerAPI.java
index 40b0183c2d..e4f1e4e8e8 100644
--- a/Ghidra/Debug/Debugger-api/src/main/java/ghidra/debug/flatapi/FlatDebuggerAPI.java
+++ b/Ghidra/Debug/Debugger-api/src/main/java/ghidra/debug/flatapi/FlatDebuggerAPI.java
@@ -45,6 +45,7 @@ import ghidra.program.model.lang.*;
import ghidra.program.model.listing.Program;
import ghidra.program.util.ProgramLocation;
import ghidra.trace.model.*;
+import ghidra.trace.model.breakpoint.TraceBreakpointKind.CommonSet;
import ghidra.trace.model.breakpoint.TraceBreakpointKind.TraceBreakpointKindSet;
import ghidra.trace.model.guest.TracePlatform;
import ghidra.trace.model.memory.TraceMemoryOperations;
@@ -2174,7 +2175,7 @@ public interface FlatDebuggerAPI {
*/
default Set The first place to look when you're having trouble is the debugger's terminal. If you do not
see one, check the Window → Terminals menu. If there is not one there, then there
- is no back-end debugger running — unless, perhaps, you are trying to use a Recorder-based
- target. See Plugin Configuration if you suspect this is the
- case.
If you already have the correct set of TraceRmi-based plugins enabled, but there is still no terminal after attempting to launch, then the launcher is sorely mis-configured, or your system @@ -52,9 +51,8 @@
It is possible you have an old Debugger tool still configured for Recorder-based targets. - Recorder-based targets are being replaced by TraceRmi-based targets. Try re-importing the - default Debugger tool.
+It is possible you have an old or misconfigured Debugger tool. Try re-importing the default + Debugger tool.
Alternatively, use File → Configure then click the plug icon near the top right to check your tool configuration. The
@@ -70,23 +68,6 @@
The following should be disabled:
- -It is possible to leave both sets of plugins enabled, but this is by all means NOT - recommended.
-Additional troubleshooting recommendations are given in the Debugger course materials.
diff --git a/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerBreakpointMarkerPlugin/DebuggerBreakpointMarkerPlugin.html b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerBreakpointMarkerPlugin/DebuggerBreakpointMarkerPlugin.html index 13b8fd7d2e..7160e660ae 100644 --- a/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerBreakpointMarkerPlugin/DebuggerBreakpointMarkerPlugin.html +++ b/Ghidra/Debug/Debugger/src/main/help/help/topics/DebuggerBreakpointMarkerPlugin/DebuggerBreakpointMarkerPlugin.html @@ -88,11 +88,10 @@This menu is available on the dynamic listing when the target supports at least one breakpoint kind. This menu is always available on the static listing. It displays set - breakpoint actions for each reasonable combination of kinds supported by the target. In the - static listing, all reasonable combinations are available, regardless of target support; - however, only those kinds supported by the target will be included in the resulting command. - Selecting one of the actions will display a prompt allowing adjustments to the parameters - before issuing the command.
+ breakpoint actions for each kind supported by the target. In the static listing, all kinds are + available, regardless of target support; however, only those kinds supported by the target will + be included in the resulting command. Selecting one of the actions will display a prompt + allowing adjustments to the parameters before issuing the command.
@@ -106,9 +105,9 @@
to 1 — often the required value. For access breakpoints, this defaults to the size of
the data at the cursor.
- oqQy@YLR?^PB+gV<
zq@(B*r97Zd)keyO)IwLs@EaB7rkD9m!sdgFJ7q70((E0l#)X*qX@ANpD*lO={n_un
z{gHR9^(1QZ=CaO96DpR(*~{n8QnCd<5~b0w>Xv3lTmzBjlW|a3lvPSaP=dLz)4a{T
z0ppoID+`lU>K=9iQ;x06VJd1jqW+VaZ&yubralbtd50d>dLP-gYs#%S`08=9^2NQ5
z5|Le~@x4TTp5nKV#nLXcnQZqZbL9b*D^@V(Vzx+-(But{!5ss;Thy)_6SU1pc685U
zNORn#nOECI22$#Slg8$KRJtGe6-SLI6q$Cz6G5Q5#jZel#?$KbL8Nv> ~nLG4*ZtZtFg)V2m33fiyGRR<~ltio!YsGknaT{+IAP%@ICe2Z(^m4etJcm
zUv#de`{zUeq8TT|Vc^lqj+YqbNCx4^>rn97rLakNS(~QPuk}X9FHJW=Vh-0wmAX`j
znR=#c9w1HS-|EQlFP5h!jw$o2+(*ZX6m;H{9WBsY$xHW+9?X(KWXr|8wCYXb0iEd_
zI5HcpOz9B37gZ5dnWi7tdd{p1yYAKcvh}=f!Bl@3EBoPHF6O8I$Xr^kR{;*MN;J?v
zXSJe3xzhH0jqR+k>^C5(b@)C)Vk};O#md5^rGleCgt;?QuYP{AS4uiT$f7s#*kJ;F
zI%$J?W1`&jVEVH7_~f_irX2LbC^{Ws5rwf+`5m?gyJ-of6cc5pR1dC#v1_uc?@U!=
zK5ctqVYjDgM7s4x&>lKNL5Wn`s)7CN3fltr&ly%YpagZRT@sm%n{}=_8y@3!mHm%xpC~nTN~U^e5~&E
zj9*dTr~N2PK=9U+Nq&2B4(yT|(YU`@#!pBnfelW-p1VFICqb;3;%LZgyZBKH;J
BsiK;t@>20