Ghidra is a software reverse engineering (SRE) framework
GP-1706: Fixed mixed breakpoint cannot be toggled in dynamic listing
Dan8870e5879258
diff --git a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/breakpoint/DebuggerBreakpointMarkerPlugin.java b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/breakpoint/DebuggerBreakpointMarkerPlugin.javaindex f3825cb243..26f0b21478 100644--- a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/breakpoint/DebuggerBreakpointMarkerPlugin.java+++ b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/breakpoint/DebuggerBreakpointMarkerPlugin.java@@ -965,7 +965,7 @@ public class DebuggerBreakpointMarkerPlugin extends Plugin*/Trace trace = getTraceFromContext(context);boolean mapped = breakpointService.anyMapped(bs, trace);- Enablement toggled = en.getToggled(mapped);+ Enablement toggled = en.getToggled(mapped && trace == null);if (toggled.enabled) {breakpointService.enableAll(bs, trace).exceptionally(ex -> {breakpointError(title, "Could not enable breakpoints", ex);diff --git a/Ghidra/Debug/Debugger/src/test/java/ghidra/app/plugin/core/debug/gui/breakpoint/DebuggerBreakpointMarkerPluginTest.java b/Ghidra/Debug/Debugger/src/test/java/ghidra/app/plugin/core/debug/gui/breakpoint/DebuggerBreakpointMarkerPluginTest.javaindex b89d3618ac..7684bd6c5c 100644--- a/Ghidra/Debug/Debugger/src/test/java/ghidra/app/plugin/core/debug/gui/breakpoint/DebuggerBreakpointMarkerPluginTest.java+++ b/Ghidra/Debug/Debugger/src/test/java/ghidra/app/plugin/core/debug/gui/breakpoint/DebuggerBreakpointMarkerPluginTest.java@@ -498,6 +498,20 @@ public class DebuggerBreakpointMarkerPluginTest extends AbstractGhidraHeadedDebudynamicCtx(trace, addr(trace, 0x55550123)), true);waitForPass(() -> assertEquals(Enablement.ENABLED, lb.computeEnablementForTrace(trace)));++ lb.disable();+ waitForPass(() -> assertEquals(Enablement.DISABLED, lb.computeEnablementForTrace(trace)));++ performAction(breakpointMarkerPlugin.actionToggleBreakpoint,+ dynamicCtx(trace, addr(trace, 0x55550123)), true);++ waitForPass(+ () -> assertEquals(Enablement.ENABLED_DISABLED, lb.computeEnablementForTrace(trace)));++ performAction(breakpointMarkerPlugin.actionToggleBreakpoint,+ dynamicCtx(trace, addr(trace, 0x55550123)), true);++ waitForPass(() -> assertEquals(Enablement.DISABLED, lb.computeEnablementForTrace(trace)));}protected void testActionSetBreakpointProgram(DockingAction action,