GP-2752: Remove TargetObject.addListener() and related

This commit is contained in:
Dan 2022-11-10 13:46:23 -05:00
parent c301dd2c89
commit 50c7217635
78 changed files with 384 additions and 1261 deletions

View file

@ -34,6 +34,7 @@ import ghidra.trace.model.memory.TraceMemoryRegion;
import ghidra.trace.model.program.TraceProgramView;
import ghidra.trace.model.program.TraceProgramViewMemory;
import ghidra.trace.util.MemoryAdapter;
import ghidra.util.LockHold;
import ghidra.util.MathUtilities;
import ghidra.util.exception.CancelledException;
import ghidra.util.exception.NotFoundException;
@ -79,9 +80,11 @@ public abstract class AbstractDBTraceProgramViewMemory
}
}
protected synchronized void computeFullAdddressSet() {
protected void computeFullAdddressSet() {
AddressSet temp = new AddressSet();
forPhysicalSpaces(space -> temp.add(space.getMinAddress(), space.getMaxAddress()));
try (LockHold hold = program.trace.lockRead()) {
forPhysicalSpaces(space -> temp.add(space.getMinAddress(), space.getMaxAddress()));
}
addressSet = temp;
}

View file

@ -24,6 +24,7 @@ import com.google.common.cache.CacheBuilder;
import ghidra.program.model.address.*;
import ghidra.program.model.mem.MemoryBlock;
import ghidra.trace.model.memory.TraceMemoryRegion;
import ghidra.util.LockHold;
public class DBTraceProgramViewMemory extends AbstractDBTraceProgramViewMemory {
@ -74,10 +75,12 @@ public class DBTraceProgramViewMemory extends AbstractDBTraceProgramViewMemory {
}
@Override
protected synchronized void recomputeAddressSet() {
protected void recomputeAddressSet() {
AddressSet temp = new AddressSet();
// TODO: Performance test this
forVisibleRegions(reg -> temp.add(reg.getRange()));
try (LockHold hold = program.trace.lockRead()) {
// TODO: Performance test this
forVisibleRegions(reg -> temp.add(reg.getRange()));
}
addressSet = temp;
}