Package ghidra.trace.model.thread
Interface TraceThread
- All Superinterfaces:
TraceObjectInterface,TraceUniqueObject
- All Known Implementing Classes:
DBTraceThread
A thread in a trace
This object must be associated with a suitable TraceExecutionStateful. In most
cases, the object should just implement it.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe key that gives the TID, as assigned by the target's platformFields 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 TypeMethodDescriptionvoiddelete()Delete this thread from the tracegetComment(long snap) Get the comment on this threadlonggetKey()Get a key identifying this thread, unique among all threads in this trace for all timegetName(long snap) Get the "short name" of this threadgetPath()Get the "full name" of this threadA convenience to obtain the registers from the containing trace's base languagegetTrace()Get the trace containing this threadbooleanCheck if the module is alive for any of the given spanbooleanisValid(long snap) Check if the thread is valid at the given snapshotvoidremove(long snap) Remove this thread from the given snapshot onvoidsetComment(long snap, String comment) Set a comment on this threadvoidSet the "short name" of this threadvoidSet the "short name" of this threadMethods inherited from interface ghidra.trace.model.target.iface.TraceObjectInterface
getObjectMethods inherited from interface ghidra.trace.model.TraceUniqueObject
getObjectKey, isDeleted
-
Field Details
-
KEY_TID
The key that gives the TID, as assigned by the target's platform- See Also:
-
-
Method Details
-
getTrace
Trace getTrace()Get the trace containing this thread- Returns:
- the trace
-
getKey
long getKey()Get a key identifying this thread, unique among all threads in this trace for all time- Returns:
- the key
-
getPath
String getPath()Get the "full name" of this thread- Returns:
- the path
-
getName
Get the "short name" of this thread- Parameters:
snap- the snap- Returns:
- the name
-
setName
Set the "short name" of this thread- Parameters:
lifespan- the span of timename- the name
-
setName
Set the "short name" of this thread- Parameters:
snap- the starting snapname- the name
-
setComment
Set a comment on this thread- Parameters:
snap- the snapcomment- the comment, possiblynull
-
getComment
Get the comment on this thread- Parameters:
snap- the snap- Returns:
- the comment, possibly
null
-
getRegisters
A convenience to obtain the registers from the containing trace's base language- Returns:
- the list of registers
-
delete
void delete()Delete this thread from the trace -
remove
void remove(long snap) Remove this thread from the given snapshot on- Parameters:
snap- the snapshot key
-
isValid
boolean isValid(long snap) Check if the thread is valid at the given snapshotIn object mode, a thread's life may be disjoint, so checking if the snap occurs between creation and destruction is not quite sufficient. This method encapsulates validity. In object mode, it checks that the thread object has a canonical parent at the given snapshot. In table mode, it checks that the lifespan contains the snap.
- Parameters:
snap- the snapshot key- Returns:
- true if valid, false if not
-
isAlive
Check if the module is alive for any of the given span- Parameters:
span- the span- Returns:
- true if its life intersects the span
-