Package ghidra.trace.model.memory
Interface TraceRegister
- All Superinterfaces:
TraceObjectInterface
- All Known Implementing Classes:
DBTraceObjectRegister
A register
There are two conventions for presenting registers and their values. Both are highly recommended:
- In the
TraceMemoryManager: If this convention is not implemented by the connector, then the trace database itself will try to convert the object-model tree presentation to it, because the only way to annotate data types and references in registers is to instantiate the appropriate register space. See the manager's documentation for how to set these up. NOTE: TheTraceRegisterContainerfor the relevant thread or frame must exist in this convention, even if the tree convention is not presented. - In the
TraceObjectManager: This convention is required when a register is not known to Ghidra's slaspec, which is certainly the case if the connector falls back to theDATAprocessor. It is easiest just to always present the tree. It provides some redundancy in case the memory-manager presentation gets broken, and it allows the user to choose a preferred presentation. In the tree convention, each register is presented with this interface. The name is taken from the object key, the length in bits is given in the attributeKEY_BITLENGTH, and the value is given in the attributeTraceObjectInterface.KEY_VALUE. Alternatively, connectors may present registers as primitive children of the container.
Some connectors may present registers in groups. To support this, there is an explicit
TraceRegisterContainer. Ordinarily, the client would use the schema to detect a
"container" of TraceRegister; however, that is not sufficient with groups. The root
container (per thread or per frame) is marked as the TraceRegisterContainer. The
connector may then organize the registers into groups, each group being a plain
TraceObject, so long as each TraceRegister is a successor to the register
container.
-
Field Summary
FieldsFields inherited from interface ghidra.trace.model.target.iface.TraceObjectInterface
KEY_COMMENT, KEY_DISPLAY, KEY_KIND, KEY_MODIFIED, KEY_ORDER, KEY_SHORT_DISPLAY, KEY_TYPE, KEY_VALUE -
Method Summary
Modifier and TypeMethodDescriptionintgetBitLength(long snap) default intgetByteLength(long snap) getName()getState(long snap) byte[]getValue(long snap) voidsetState(Lifespan lifespan, TraceMemoryState state) voidMethods inherited from interface ghidra.trace.model.target.iface.TraceObjectInterface
getObject
-
Field Details
-
KEY_BITLENGTH
- See Also:
-
KEY_STATE
- See Also:
-
-
Method Details
-
getThread
TraceThread getThread() -
getName
String getName() -
getBitLength
int getBitLength(long snap) -
getByteLength
default int getByteLength(long snap) -
setValue
-
getValue
byte[] getValue(long snap) -
setState
-
getState
-