Interface TraceCodeManager
- All Superinterfaces:
TraceCodeOperations
- All Known Implementing Classes:
DBTraceCodeManager
Listing
This supports a "fluent" interface, which differs from Listing. For example, instead of
Listing.getInstructionContaining(Address), a client would invoke TraceCodeOperations.instructions()
then TraceBaseCodeUnitsView.getContaining(long, Address). Because traces include register
spaces, this chain could be preceded by getCodeSpace(AddressSpace, boolean) or
getCodeRegisterSpace(TraceThread, int, boolean).
To create an instruction, see
TraceInstructionsView.create(Lifespan, Address, TracePlatform, InstructionPrototype, ProcessorContextView, int).
Since clients do not ordinarily have an InstructionPrototype in hand, the more common
method is to invoke the Disassembler on Trace.getProgramView().
To create a data unit, see TraceDefinedDataView.create(Lifespan, Address, DataType, int).
The method chain to create a data unit in memory is TraceCodeOperations.definedData() then
create(...). The method chain to create a data unit on a register is
getCodeRegisterSpace(TraceThread, int, boolean), then
TraceCodeOperations.definedData(), then
TraceDefinedDataView.create(Lifespan, Register, DataType).
-
Method Summary
Modifier and TypeMethodDescriptiongetCodeAdded(long from, long to) Query for the address set where code units have been added between the two given snapsgetCodeRegisterSpace(TraceStackFrame frame, boolean createIfAbsent) Get the code space for registers of the given stack framegetCodeRegisterSpace(TraceThread thread, boolean createIfAbsent) Get the code space for registers of the given thread's innermost framegetCodeRegisterSpace(TraceThread thread, int frameLevel, boolean createIfAbsent) Get the code space for registers of the given thread and framegetCodeRemoved(long from, long to) Query for the address set where code units have been removed between the two given snapsgetCodeSpace(AddressSpace space, boolean createIfAbsent) Get the code space for the memory of the given address spaceMethods inherited from interface ghidra.trace.model.listing.TraceCodeOperations
codeUnits, data, definedData, definedUnits, instructions, undefinedData
-
Method Details
-
getCodeSpace
Get the code space for the memory of the given address space- Parameters:
space- the address spacecreateIfAbsent- true to create the space if it's not already present- Returns:
- the space, of
nullif absent and not created
-
getCodeRegisterSpace
Get the code space for registers of the given thread's innermost frame- Parameters:
thread- the threadcreateIfAbsent- true to create the space if it's not already present- Returns:
- the space, of
nullif absent and not created
-
getCodeRegisterSpace
Get the code space for registers of the given thread and frame- Parameters:
thread- the threadframeLevel- the frame (0 for innermost)createIfAbsent- true to create the space if it's not already present- Returns:
- the space, of
nullif absent and not created
-
getCodeRegisterSpace
Get the code space for registers of the given stack frameNote this is simply a shortcut for
getCodeRegisterSpace(TraceThread, int, boolean), and does not in any way bind the space to the lifetime of the given frame. Nor, if the frame is moved, will this space move with it.- Parameters:
frame- the frame whose space to getcreateIfAbsent- true to create the space if it's not already present- Returns:
- the space, or
nullif absent and not created
-
getCodeAdded
Query for the address set where code units have been added between the two given snaps- Parameters:
from- the beginning snapto- the ending snap- Returns:
- the view of addresses where units have been added
-
getCodeRemoved
Query for the address set where code units have been removed between the two given snaps- Parameters:
from- the beginning snapto- the ending snap- Returns:
- the view of addresses where units have been removed
-