mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-5266: Only track on user click or address change.
This commit is contained in:
@@ -66,7 +66,7 @@ public class DebuggerCoordinates {
|
||||
private static final String KEY_FRAME = "Frame";
|
||||
private static final String KEY_OBJ_PATH = "ObjectPath";
|
||||
|
||||
public static boolean equalsIgnoreRecorderAndView(DebuggerCoordinates a,
|
||||
public static boolean equalsIgnoreTargetAndView(DebuggerCoordinates a,
|
||||
DebuggerCoordinates b) {
|
||||
if (!Objects.equals(a.trace, b.trace)) {
|
||||
return false;
|
||||
@@ -417,6 +417,36 @@ public class DebuggerCoordinates {
|
||||
newFrame, newPath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given coordinates are the same as this but with an extra or differing patch.
|
||||
*
|
||||
* @param that the other coordinates
|
||||
* @return true if the difference is only in the final patch step
|
||||
*/
|
||||
public boolean differsOnlyByPatch(DebuggerCoordinates that) {
|
||||
if (!Objects.equals(this.trace, that.trace)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Objects.equals(this.platform, that.platform)) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(this.thread, that.thread)) {
|
||||
return false;
|
||||
}
|
||||
// Consider defaults
|
||||
if (!Objects.equals(this.getFrame(), that.getFrame())) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(this.getObject(), that.getObject())) {
|
||||
return false;
|
||||
}
|
||||
if (!this.getTime().differsOnlyByPatch(that.getTime())) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public DebuggerCoordinates frame(int newFrame) {
|
||||
if (trace == null) {
|
||||
return NOWHERE;
|
||||
@@ -621,7 +651,11 @@ public class DebuggerCoordinates {
|
||||
if (registerContainer != null) {
|
||||
return registerContainer;
|
||||
}
|
||||
return registerContainer = getObject().findRegisterContainer(getFrame());
|
||||
TraceObject object = getObject();
|
||||
if (object == null) {
|
||||
return null;
|
||||
}
|
||||
return registerContainer = object.findRegisterContainer(getFrame());
|
||||
}
|
||||
|
||||
public synchronized long getViewSnap() {
|
||||
|
||||
Reference in New Issue
Block a user