GP-5180: Fix auto memory read without regions (Force Full View)

This commit is contained in:
Dan 2024-12-20 14:25:11 -05:00
parent 7fbf64ea70
commit 71548dd8aa
2 changed files with 12 additions and 4 deletions

View file

@ -976,6 +976,15 @@ public class TraceRmiTarget extends AbstractTarget {
}
protected TraceObject getProcessForSpace(AddressSpace space) {
List<TraceObjectProcess> processes = trace.getObjectManager()
.queryAllInterface(Lifespan.at(getSnap()), TraceObjectProcess.class)
.toList();
if (processes.size() == 1) {
return processes.get(0).getObject();
}
if (processes.isEmpty()) {
return null;
}
for (TraceMemoryRegion region : trace.getMemoryManager()
.getRegionsIntersecting(
Lifespan.at(getSnap()),

View file

@ -25,7 +25,8 @@ import java.math.BigInteger;
import java.nio.ByteBuffer;
import java.util.Set;
import org.junit.*;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import db.Transaction;
@ -731,7 +732,7 @@ public class DebuggerListingProviderTest extends AbstractGhidraHeadedDebuggerInt
runSwing(() -> tb.trace.getProgramView().getMemory().setForceFullView(true));
goToDyn(tb.addr(0x55550000));
goToDyn(tb.addr(0x55550800));
runSwing(() -> listingProvider.setAutoReadMemorySpec(spec));
handleReadMemInvocation(process, tb.range(0x55550000, 0x55550fff));
@ -742,13 +743,11 @@ public class DebuggerListingProviderTest extends AbstractGhidraHeadedDebuggerInt
}
@Test
@Ignore("Until GP-5180")
public void testAutoReadMemoryVisROOnceReadsWithForceFullView() throws Throwable {
runTestAutoReadMemoryReadsWithForceFullView(readVisROOnce);
}
@Test
@Ignore("Until GP-5180")
public void testAutoReadMemoryVisibleReadsWithForceFullView() throws Throwable {
runTestAutoReadMemoryReadsWithForceFullView(readVisible);
}