mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
GP-1161: Including uniques in thread-local state, and renaming things by those terms.
This commit is contained in:
parent
0c56f638a3
commit
237b7c00d1
8 changed files with 53 additions and 49 deletions
|
@ -55,12 +55,12 @@ public class TracePcodeEmulator extends AbstractPcodeEmulator {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected PcodeExecutorState<byte[]> createMemoryState() {
|
||||
protected PcodeExecutorState<byte[]> createSharedState() {
|
||||
return newState(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PcodeExecutorState<byte[]> createRegisterState(PcodeThread<byte[]> emuThread) {
|
||||
protected PcodeExecutorState<byte[]> createLocalState(PcodeThread<byte[]> emuThread) {
|
||||
return newState(trace.getThreadManager().getLiveThreadByPath(snap, emuThread.getName()));
|
||||
}
|
||||
|
||||
|
@ -79,13 +79,13 @@ public class TracePcodeEmulator extends AbstractPcodeEmulator {
|
|||
* @param synthesizeStacks true to synthesize the innermost stack frame of each thread
|
||||
*/
|
||||
public void writeDown(Trace trace, long destSnap, long threadsSnap, boolean synthesizeStacks) {
|
||||
TraceCachedWriteBytesPcodeExecutorState ms =
|
||||
(TraceCachedWriteBytesPcodeExecutorState) getMemoryState();
|
||||
ms.writeCacheDown(trace, destSnap, null, 0);
|
||||
TraceCachedWriteBytesPcodeExecutorState ss =
|
||||
(TraceCachedWriteBytesPcodeExecutorState) getSharedState();
|
||||
ss.writeCacheDown(trace, destSnap, null, 0);
|
||||
TraceThreadManager threadManager = trace.getThreadManager();
|
||||
for (PcodeThread<byte[]> emuThread : threads.values()) {
|
||||
TraceCachedWriteBytesPcodeExecutorState rs =
|
||||
(TraceCachedWriteBytesPcodeExecutorState) emuThread.getState().getRegisterState();
|
||||
TraceCachedWriteBytesPcodeExecutorState ls =
|
||||
(TraceCachedWriteBytesPcodeExecutorState) emuThread.getState().getLocalState();
|
||||
TraceThread traceThread = threadManager.getLiveThreadByPath(
|
||||
threadsSnap, emuThread.getName());
|
||||
if (traceThread == null) {
|
||||
|
@ -93,7 +93,7 @@ public class TracePcodeEmulator extends AbstractPcodeEmulator {
|
|||
"Given trace does not have thread with name/path '" + emuThread.getName() +
|
||||
"' at snap " + destSnap);
|
||||
}
|
||||
rs.writeCacheDown(trace, destSnap, traceThread, 0);
|
||||
ls.writeCacheDown(trace, destSnap, traceThread, 0);
|
||||
if (synthesizeStacks) {
|
||||
TraceStack stack = trace.getStackManager().getStack(traceThread, destSnap, true);
|
||||
stack.getFrame(0, true).setProgramCounter(emuThread.getCounter());
|
||||
|
|
|
@ -385,12 +385,12 @@ public class TraceScheduleTest extends AbstractGhidraHeadlessIntegrationTest {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected PcodeExecutorState<Void> createMemoryState() {
|
||||
protected PcodeExecutorState<Void> createSharedState() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PcodeExecutorState<Void> createRegisterState(PcodeThread<Void> thread) {
|
||||
protected PcodeExecutorState<Void> createLocalState(PcodeThread<Void> thread) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue