Class DBTraceStack
- All Implemented Interfaces:
DBTraceObjectInterface,TraceStack,TraceObjectInterface,TraceUniqueObject
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface ghidra.trace.database.target.DBTraceObjectInterface
DBTraceObjectInterface.Translator<T> -
Field Summary
Fields 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclearFrameAttributes(long snap, int start, int end, List<TraceStackFrame> frames) protected voidcopyFrameAttributes(long snap, TraceStackFrame from, TraceStackFrame to) voiddelete()Delete this stack and its framesprotected TraceStackFramedoAddStackFrame(long snap, int level) protected TraceStackFramedoGetFrame(long snap, int level) protected Stream<TraceStackFrame> doGetFrames(long snap) intgetDepth(long snap) Get the depth (as recorded) of this stackgetFrame(long snap, int level, boolean ensureDepth) Get the frame at the given levelgetFrames(long snap) Get all (known) frames in this stackGet the object backing this implementationGet the thread whose stack this isbooleanCheck if this stack'sframes are fixed for its lifetimebooleanisValid(long snap) Check if this stack is valid at the given snapvoidremove(long snap) Remove this stack and its frame rom the given snapshot onvoidsetDepth(long snap, int depth, boolean atInner) Set the depth of the stack by adding or deleting frames to or from the specified endprotected voidshiftFrameAttributes(long snap, int from, int to, int count, List<TraceStackFrame> frames) TraceChangeRecord<?, ?> translateEvent(TraceChangeRecord<?, ?> rec) Translate an object event into the interface-specific eventMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.trace.database.target.DBTraceObjectInterface
getObjectKey, isDeleted, spaceForValue
-
Constructor Details
-
DBTraceStack
-
-
Method Details
-
getThread
Description copied from interface:TraceStackGet the thread whose stack this is- Specified by:
getThreadin interfaceTraceStack- Returns:
- the thread
-
getDepth
public int getDepth(long snap) Description copied from interface:TraceStackGet the depth (as recorded) of this stack- Specified by:
getDepthin interfaceTraceStack- Parameters:
snap- the snap- Returns:
- the depth
-
doAddStackFrame
-
copyFrameAttributes
-
shiftFrameAttributes
protected void shiftFrameAttributes(long snap, int from, int to, int count, List<TraceStackFrame> frames) -
clearFrameAttributes
-
setDepth
public void setDepth(long snap, int depth, boolean atInner) Description copied from interface:TraceStackSet the depth of the stack by adding or deleting frames to or from the specified endNote that pushing new frames onto a stack does not adjust the frame level of any frame-associated managers or spaces, e.g., that returned by
TraceMemoryManager.getMemoryRegisterSpace(TraceThread, int, boolean).If the experimental object mode is successful, this method should be deleted.
- Specified by:
setDepthin interfaceTraceStack- Parameters:
snap- the snapdepth- the desired depthatInner- true if frames should be "pushed"
-
doGetFrame
-
getFrame
Description copied from interface:TraceStackGet the frame at the given level- Specified by:
getFramein interfaceTraceStack- Parameters:
snap- the snaplevel- the level, where 0 indicates the inner-most frame.ensureDepth- true to expand the depth to accomodate the requested frame- Returns:
- the frame, or
nullif level exceeds the depth without ensureDepth set
-
doGetFrames
-
getFrames
Description copied from interface:TraceStackGet all (known) frames in this stack- Specified by:
getFramesin interfaceTraceStack- Parameters:
snap- the snap (only relevant in the experimental objects mode. Ordinarily, the frames are fixed over the stack's lifetime)- Returns:
- the list of frames
-
delete
public void delete()Description copied from interface:TraceStackDelete this stack and its frames- Specified by:
deletein interfaceTraceStack
-
remove
public void remove(long snap) Description copied from interface:TraceStackRemove this stack and its frame rom the given snapshot on- Specified by:
removein interfaceTraceStack- Parameters:
snap- the snapshot key
-
isValid
public boolean isValid(long snap) Description copied from interface:TraceStackCheck if this stack is valid at the given snap- Specified by:
isValidin interfaceTraceStack- Parameters:
snap- the snap- Returns:
- true if valid
-
getObject
Description copied from interface:TraceObjectInterfaceGet the object backing this implementation- Specified by:
getObjectin interfaceTraceObjectInterface- Returns:
- the object
-
translateEvent
Description copied from interface:DBTraceObjectInterfaceTranslate an object event into the interface-specific eventBoth the object event and the interface-specific event, if applicable, will be emitted. If multiple events need to be emitted, then this method may emit them directly via its object's trace. If exactly one event needs to be emitted, then this method should return the translated record. If no translation applies, or if the translated event(s) were emitted directly, this method returns
null.- Specified by:
translateEventin interfaceDBTraceObjectInterface- Parameters:
rec- the object event- Returns:
- the interface-specific event to emit, or
null
-
hasFixedFrames
public boolean hasFixedFrames()Description copied from interface:TraceStackCheck if this stack'sframes are fixed for its lifetimeThis is a transitional method, since the experimental objects mode breaks with the normal stack/frame model. Essentially, this returns true if the normal model is being used, and false if the object-based model is being used.
- Specified by:
hasFixedFramesin interfaceTraceStack- Returns:
- true if fixed, false if object-based (dynamic)
-