GP-1411: keying space cache by identity

This commit is contained in:
Dan 2021-10-18 16:33:28 -04:00
parent 3d46c4588c
commit 9d12f6c57a
3 changed files with 49 additions and 29 deletions

View file

@ -35,6 +35,7 @@ import ghidra.util.Msg;
import ghidra.util.database.UndoableTransaction;
import ghidra.util.exception.CancelledException;
import ghidra.util.task.TaskMonitor;
import utilities.util.IDHashed;
interface LogicalBreakpointInternal extends LogicalBreakpoint {
public static class ProgramBreakpoint {
@ -248,33 +249,6 @@ interface LogicalBreakpointInternal extends LogicalBreakpoint {
}
static class TraceBreakpointSet {
private static class IDHashed<T> {
final T obj;
public IDHashed(T obj) {
this.obj = obj;
}
@Override
public String toString() {
return obj.toString();
}
@Override
public int hashCode() {
return System.identityHashCode(obj);
}
@Override
public boolean equals(Object o) {
if (!(o instanceof IDHashed<?>)) {
return false;
}
IDHashed<?> that = (IDHashed<?>) o;
return this.obj.equals(that.obj);
}
}
private final TraceRecorder recorder;
private final Trace trace;
private final Address address;