GP-6340: Use view when deciding what emu needs to read from target.

This commit is contained in:
Dan
2026-01-15 18:15:37 +00:00
parent 394e7fdcd9
commit 0d33fa3924
4 changed files with 8 additions and 36 deletions

View File

@@ -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.
@@ -162,20 +162,6 @@ public abstract class AbstractPcodeTraceDataAccess implements InternalPcodeTrace
return platform.mapHostToGuest(hostResult);
}
@Override
public AddressSetView intersectUnknown(AddressSetView guestView) {
TraceMemoryOperations ops = getMemoryOps(false);
if (ops == null) {
return guestView;
}
AddressSetView hostView = toOverlay(platform.mapGuestToHost(guestView));
AddressSetView hostKnown = ops.getAddressesWithState(snap, hostView,
s -> s != null && s != TraceMemoryState.UNKNOWN);
AddressSetView hostResult = TraceRegisterUtils.getPhysicalSet(hostView.subtract(hostKnown));
return platform.mapHostToGuest(hostResult);
}
@Override
public int putBytes(Address start, ByteBuffer buf) {
// TODO: Truncate or verify range?

View File

@@ -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.
@@ -76,11 +76,6 @@ public class DefaultPcodeTraceThreadAccess
.union(registers.intersectViewKnown(view, useFullSpans));
}
@Override
public AddressSetView intersectUnknown(AddressSetView view) {
return memory.intersectUnknown(view).union(registers.intersectUnknown(view));
}
@Override
public int putBytes(Address start, ByteBuffer buf) {
if (start.isRegisterAddress()) {

View File

@@ -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.
@@ -73,15 +73,6 @@ public interface PcodeTraceDataAccess {
*/
AddressSetView intersectViewKnown(AddressSetView view, boolean useFullSpans);
/**
* Compute the intersection of the given address set and the set of
* {@link TraceMemoryState#UNKNOWN} memory
*
* @param view the address set
* @return the intersection
*/
AddressSetView intersectUnknown(AddressSetView view);
/**
* Write bytes into the trace
*