Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-6391: with an assist

d-millarb9da5273b205
diff --git a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/action/DebuggerTrackLocationTrait.java b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/action/DebuggerTrackLocationTrait.java
index 99ae712879..921e8d9f30 100644
--- a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/action/DebuggerTrackLocationTrait.java
+++ b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/action/DebuggerTrackLocationTrait.java
@@ -225,6 +225,10 @@ public class DebuggerTrackLocationTrait {
return trackedLocation;
}
+ public void clearTrackedLocation() {
+ trackedLocation = null;
+ }
+
public MultiStateDockingAction<LocationTrackingSpec> installAction() {
// TODO: Only those Sleigh expressions applicable to the current thread's registers?
action = DebuggerTrackLocationAction.builder(plugin)
diff --git a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/listing/DebuggerListingProvider.java b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/listing/DebuggerListingProvider.java
index f787eadf33..98d08d5dd1 100644
--- a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/listing/DebuggerListingProvider.java
+++ b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/listing/DebuggerListingProvider.java
@@ -818,7 +818,8 @@ public class DebuggerListingProvider extends CodeViewerProvider {
!gotoProgram.getMemory().contains(location.getAddress())) {
return false;
}
- if (super.goTo(gotoProgram, location)) {
+ if (super.goTo(gotoProgram, location) &&
+ !isEffectivelyDifferent(getLocation(), location)) {
return true;
}
return false;
@@ -938,6 +939,7 @@ public class DebuggerListingProvider extends CodeViewerProvider {
}
else {
trackingLabel.setForeground(Colors.ERROR);
+ trackingTrait.clearTrackedLocation();
}
}