mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-6340: Use view when deciding what emu needs to read from target.
This commit is contained in:
@@ -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?
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user