Package ghidra.pcode.exec.trace.data
Class DefaultPcodeTraceRegistersAccess
java.lang.Object
ghidra.pcode.exec.trace.data.AbstractPcodeTraceDataAccess
ghidra.pcode.exec.trace.data.DefaultPcodeTraceRegistersAccess
- All Implemented Interfaces:
InternalPcodeTraceDataAccess,PcodeTraceDataAccess,PcodeTraceRegistersAccess
public class DefaultPcodeTraceRegistersAccess
extends AbstractPcodeTraceDataAccess
implements PcodeTraceRegistersAccess
The default data-access shim for trace registers
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected TraceMemorySpaceprotected final TraceThreadFields inherited from class ghidra.pcode.exec.trace.data.AbstractPcodeTraceDataAccess
mm, platform, snap, viewport -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefaultPcodeTraceRegistersAccess(TracePlatform platform, long snap, TraceThread thread, int frame, TraceTimeViewport viewport) Construct a shim -
Method Summary
Modifier and TypeMethodDescriptionprotected TraceMemorySpacegetMemoryOps(boolean createIfAbsent) Get the interface for accessing trace memory or registers<T> TracePropertyMapSpace<T> getPropertyOps(String name, Class<T> type, boolean createIfAbsent) voidinitializeThreadContext(PcodeThread<?> thread) Initialize the given p-code thread's context register using register context from the trace at the thread's program counterprotected booleanisRegisterKnown(PcodeThread<?> thread, Register register) Check if a register has aTraceMemoryState.KNOWNvalue for the given threadprotected AddressIf this shim is associated with a (register) overlay space, translate the given address into itprotected AddressRangetoOverlay(AddressRange range) protected AddressSetViewtoOverlay(AddressSetView set) Methods inherited from class ghidra.pcode.exec.trace.data.AbstractPcodeTraceDataAccess
getBytes, getLanguage, getPlatform, getPropertyAccess, getSnap, getViewport, getViewportState, intersectUnknown, intersectViewKnown, putBytes, setState, translateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.pcode.exec.trace.data.PcodeTraceDataAccess
getBytes, getLanguage, getPropertyAccess, getViewportState, intersectUnknown, intersectViewKnown, putBytes, setState, translate
-
Field Details
-
thread
-
frame
protected final int frame -
ms
-
-
Constructor Details
-
DefaultPcodeTraceRegistersAccess
protected DefaultPcodeTraceRegistersAccess(TracePlatform platform, long snap, TraceThread thread, int frame, TraceTimeViewport viewport) Construct a shim- Parameters:
platform- the associated platformsnap- the associated snapthread- the associated thread whose registers to accessframe- the associated frame, or 0 if not applicableviewport- the viewport, set to the same snapshot
-
-
Method Details
-
getMemoryOps
Description copied from class:AbstractPcodeTraceDataAccessGet the interface for accessing trace memory or registers- Specified by:
getMemoryOpsin classAbstractPcodeTraceDataAccess- Parameters:
createIfAbsent- in the case of registers, whether to create the missing space- Returns:
- the operations, or null
-
getPropertyOps
public <T> TracePropertyMapSpace<T> getPropertyOps(String name, Class<T> type, boolean createIfAbsent) - Specified by:
getPropertyOpsin interfaceInternalPcodeTraceDataAccess
-
isRegisterKnown
Check if a register has aTraceMemoryState.KNOWNvalue for the given thread- Parameters:
thread- the threadregister- the register- Returns:
- true if known
-
initializeThreadContext
Description copied from interface:PcodeTraceRegistersAccessInitialize the given p-code thread's context register using register context from the trace at the thread's program counterThis is called during thread construction, after the program counter is initialized from the same trace thread. This will ensure that the instruction decoder starts in the same mode as the disassembler was for the trace.
- Specified by:
initializeThreadContextin interfacePcodeTraceRegistersAccess- Parameters:
thread- the thread to initialize
-
toOverlay
Description copied from class:AbstractPcodeTraceDataAccessIf this shim is associated with a (register) overlay space, translate the given address into it- Specified by:
toOverlayin classAbstractPcodeTraceDataAccess- Parameters:
address- the physical (register) address- Returns:
- the overlay address
-
toOverlay
- Specified by:
toOverlayin classAbstractPcodeTraceDataAccess- Parameters:
range- the physical range- Returns:
- the overlay range
- See Also:
-
toOverlay
- Specified by:
toOverlayin classAbstractPcodeTraceDataAccess- Parameters:
set-- Returns:
- See Also:
-