mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
Merge remote-tracking branch
'origin/GP-4788_Dan_fixTraceOverlayAddressComparison--SQUASHED' (#6735)
This commit is contained in:
commit
21d0c5438a
8 changed files with 88 additions and 42 deletions
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -1146,8 +1146,7 @@ public class DebuggerRegistersProvider extends ComponentProviderAdapter
|
|||
if (mem == null) {
|
||||
return result;
|
||||
}
|
||||
AddressSpace regSpace =
|
||||
thread.getTrace().getBaseLanguage().getAddressFactory().getRegisterSpace();
|
||||
AddressSpace regSpace = thread.getTrace().getBaseAddressFactory().getRegisterSpace();
|
||||
AddressSet everKnown = new AddressSet();
|
||||
for (Entry<TraceAddressSnapRange, TraceMemoryState> entry : mem.getMostRecentStates(
|
||||
thread.getTrace().getTimeManager().getMaxSnap(),
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -184,7 +184,7 @@ public class TraceEventListener extends AnnotatedDebuggerAttributeListener {
|
|||
long snap = recorder.getSnap();
|
||||
String path = object.getJoinedPath(".");
|
||||
recorder.parTx.execute("Memory invalidated: " + path, () -> {
|
||||
AddressSet set = trace.getBaseLanguage().getAddressFactory().getAddressSet();
|
||||
AddressSet set = trace.getBaseAddressFactory().getAddressSet();
|
||||
memoryManager.setState(snap, set, TraceMemoryState.UNKNOWN);
|
||||
}, path);
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -1803,4 +1803,31 @@ public class DebuggerListingProviderTest extends AbstractGhidraHeadedDebuggerTes
|
|||
waitForSwing();
|
||||
assertFalse(listingPanel.isHoverShowing());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWithOverlaySpaces() throws Throwable {
|
||||
createAndOpenTrace("DATA:BE:64:default");
|
||||
AddressSpace ram = tb.trace.getBaseAddressFactory().getDefaultAddressSpace();
|
||||
|
||||
AddressSpace ram0;
|
||||
AddressSpace ram1;
|
||||
try (Transaction tx = tb.startTransaction()) {
|
||||
DBTraceMemoryManager mm = tb.trace.getMemoryManager();
|
||||
ram0 = mm.createOverlayAddressSpace("ram0", ram);
|
||||
ram1 = mm.createOverlayAddressSpace("ram1", ram);
|
||||
|
||||
mm.createRegion("Memory[0]", 0, tb.range(ram1, 0, 0x1000),
|
||||
Set.of(TraceMemoryFlag.READ, TraceMemoryFlag.EXECUTE));
|
||||
mm.createRegion("Memory[1]", 0, tb.range(ram0, 0x1000, 0x2000),
|
||||
Set.of(TraceMemoryFlag.READ, TraceMemoryFlag.WRITE));
|
||||
}
|
||||
waitForDomainObject(tb.trace);
|
||||
|
||||
traceManager.activateTrace(tb.trace);
|
||||
waitForSwing();
|
||||
|
||||
assertEquals(ram0.getAddress(0x1002), listingProvider.getListingPanel()
|
||||
.getListingModel()
|
||||
.getAddressAfter(ram0.getAddress(0x1001)));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue