Class DBTraceMemoryRegion
- All Implemented Interfaces:
DBTraceObjectInterface,TraceMemoryRegion,TraceObjectInterface,TraceUniqueObject
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final recordprotected classNested classes/interfaces inherited from interface ghidra.trace.database.target.DBTraceObjectInterface
DBTraceObjectInterface.Translator<T> -
Field Summary
Fields inherited from interface ghidra.trace.model.memory.TraceMemoryRegion
KEY_EXECUTABLE, KEY_RANGE, KEY_READABLE, KEY_VOLATILE, KEY_WRITABLEFields 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 TypeMethodDescriptionvoidaddFlags(long snap, Collection<TraceMemoryFlag> flags) Add the given flags, e.g., permissions, to this regionvoidaddFlags(Lifespan lifespan, Collection<TraceMemoryFlag> flags) Add the given flags, e.g., permissions, to this regionvoidclearFlags(long snap, Collection<TraceMemoryFlag> flags) Remove the given flags, e.g., permissions, from this regionvoidclearFlags(Lifespan lifespan, Collection<TraceMemoryFlag> flags) Remove the given flags, e.g., permissions, from this regionvoiddelete()Delete this region from the tracegetFlags(long snap) Get the flags, e.g., permissions, of this regionlonggetLength(long snap) Measure the length, in bytes, of this region's address rangegetMaxAddress(long snap) Get the maximum address of the rangegetMinAddress(long snap) Get the minimum address of the rangegetName(long snap) Get the "short name" of this regionGet the object backing this implementationgetPath()Get the "full name" of this regiongetRange(long snap) Get the virtual memory address range of this regiongetTrace()Get the trace containing this regionbooleanisValid(long snap) Check if the region is valid at the given snapshotprotected static StringkeyForFlag(TraceMemoryFlag flag) voidremove(long snap) Remove this region from the given snap onvoidsetFlags(long snap, Collection<TraceMemoryFlag> flags) Set the flags, e.g., permissions, of this regionvoidsetFlags(Lifespan lifespan, Collection<TraceMemoryFlag> flags) Set the flags, e.g., permissions, of this regionvoidsetLength(long snap, long length) Set the length, in bytes, of this region's address rangevoidsetMaxAddress(long snap, Address max) Set the maximum address of the rangevoidsetMinAddress(long snap, Address min) Set the minimum address of the rangevoidSet the "short name" of this regionvoidSet the "short name" of this regionvoidsetRange(long snap, AddressRange newRange) Set the virtual memory address range of this regionvoidsetRange(Lifespan lifespan, AddressRange newRange) Set the virtual memory address range of this regionTraceChangeRecord<?, ?> translateEvent(TraceChangeRecord<?, ?> rec) Translate an object event into the interface-specific eventprotected voidprotected voidprotected voidupdateViewsLifespanChanged(Lifespan oldLifespan, Lifespan newLifespan) protected voidupdateViewsValueChanged(Lifespan lifespan, String key, Object oldValue, Object newValue) Methods 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, spaceForValueMethods inherited from interface ghidra.trace.model.memory.TraceMemoryRegion
addFlags, clearFlags, isExecute, isRead, isVolatile, isWrite, setExecute, setFlags, setRead, setVolatile, setWrite
-
Constructor Details
-
DBTraceMemoryRegion
-
-
Method Details
-
getTrace
Description copied from interface:TraceMemoryRegionGet the trace containing this region- Specified by:
getTracein interfaceTraceMemoryRegion- Returns:
- the trace
-
getPath
Description copied from interface:TraceMemoryRegionGet the "full name" of this regionThis is a unique key (within any snap) for retrieving the region, and may not be suitable for display on the screen.
- Specified by:
getPathin interfaceTraceMemoryRegion- Returns:
- the path
-
setName
Description copied from interface:TraceMemoryRegionSet the "short name" of this regionThe given name should be suitable for display on the screen.
- Specified by:
setNamein interfaceTraceMemoryRegion- Parameters:
lifespan- the span of timename- the name
-
setName
Description copied from interface:TraceMemoryRegionSet the "short name" of this regionThe given name should be suitable for display on the screen.
- Specified by:
setNamein interfaceTraceMemoryRegion- Parameters:
snap- the snapname- the name
-
getName
Description copied from interface:TraceMemoryRegionGet the "short name" of this regionThis defaults to the "full name," but can be modified via
TraceMemoryRegion.setName(long, String)- Specified by:
getNamein interfaceTraceMemoryRegion- Parameters:
snap- the snap- Returns:
- the name
-
setRange
Description copied from interface:TraceMemoryRegionSet the virtual memory address range of this regionThe addresses in the range should be those the target's CPU would use to access the region, i.e., the virtual memory address if an MMU is involved, or the physical address if no MMU is involved.
- Specified by:
setRangein interfaceTraceMemoryRegion- Parameters:
lifespan- the span of timenewRange- the address range
-
setRange
Description copied from interface:TraceMemoryRegionSet the virtual memory address range of this regionThe addresses in the range should be those the target's CPU would use to access the region, i.e., the virtual memory address if an MMU is involved, or the physical address if no MMU is involved.
- Specified by:
setRangein interfaceTraceMemoryRegion- Parameters:
snap- the snapnewRange- the address range
-
getRange
Description copied from interface:TraceMemoryRegionGet the virtual memory address range of this region- Specified by:
getRangein interfaceTraceMemoryRegion- Parameters:
snap- the snap- Returns:
- the address range
-
setMinAddress
Description copied from interface:TraceMemoryRegionSet the minimum address of the rangeNote that this sets the range from the given snap on to the same range, no matter what changes may have occurred since.
- Specified by:
setMinAddressin interfaceTraceMemoryRegion- Parameters:
snap- the snapmin- the new minimum- See Also:
-
getMinAddress
Description copied from interface:TraceMemoryRegionGet the minimum address of the range- Specified by:
getMinAddressin interfaceTraceMemoryRegion- Parameters:
snap- the snap- Returns:
- the minimum address
- See Also:
-
setMaxAddress
Description copied from interface:TraceMemoryRegionSet the maximum address of the rangeNote that this sets the range from the given snap on to the same range, no matter what changes may have occurred since.
- Specified by:
setMaxAddressin interfaceTraceMemoryRegion- Parameters:
snap- the snapmax- the new minimum- See Also:
-
getMaxAddress
Description copied from interface:TraceMemoryRegionGet the maximum address of the range- Specified by:
getMaxAddressin interfaceTraceMemoryRegion- Parameters:
snap- the snap- Returns:
- the maximum address
- See Also:
-
setLength
Description copied from interface:TraceMemoryRegionSet the length, in bytes, of this region's address rangeThis adjusts the max address of the range so that its length becomes that given. Note that this sets the range from the given snap on to the same range, no matter what changes may have occurred since.
- Specified by:
setLengthin interfaceTraceMemoryRegion- Parameters:
snap- the snaplength- the desired length of the range- Throws:
AddressOverflowException- if extending the range would cause the max address to overflow- See Also:
-
getLength
public long getLength(long snap) Description copied from interface:TraceMemoryRegionMeasure the length, in bytes, of this region's address range- Specified by:
getLengthin interfaceTraceMemoryRegion- Parameters:
snap- the snap- Returns:
- the length
-
keyForFlag
-
setFlags
Description copied from interface:TraceMemoryRegionSet the flags, e.g., permissions, of this region- Specified by:
setFlagsin interfaceTraceMemoryRegion- Parameters:
lifespan- the span of timeflags- the flags
-
addFlags
Description copied from interface:TraceMemoryRegionAdd the given flags, e.g., permissions, to this region- Specified by:
addFlagsin interfaceTraceMemoryRegion- Parameters:
lifespan- the span of timeflags- the flags
-
clearFlags
Description copied from interface:TraceMemoryRegionRemove the given flags, e.g., permissions, from this region- Specified by:
clearFlagsin interfaceTraceMemoryRegion- Parameters:
lifespan- the span of timeflags- the flags
-
setFlags
Description copied from interface:TraceMemoryRegionSet the flags, e.g., permissions, of this region- Specified by:
setFlagsin interfaceTraceMemoryRegion- Parameters:
snap- the snapflags- the flags
-
addFlags
Description copied from interface:TraceMemoryRegionAdd the given flags, e.g., permissions, to this region- Specified by:
addFlagsin interfaceTraceMemoryRegion- Parameters:
snap- the snapflags- the flags
-
clearFlags
Description copied from interface:TraceMemoryRegionRemove the given flags, e.g., permissions, from this region- Specified by:
clearFlagsin interfaceTraceMemoryRegion- Parameters:
snap- the snapflags- the flags
-
getFlags
Description copied from interface:TraceMemoryRegionGet the flags, e.g., permissions, of this region- Specified by:
getFlagsin interfaceTraceMemoryRegion- Parameters:
snap- the snap- Returns:
- the flags
-
delete
public void delete()Description copied from interface:TraceMemoryRegionDelete this region from the trace- Specified by:
deletein interfaceTraceMemoryRegion
-
remove
public void remove(long snap) Description copied from interface:TraceMemoryRegionRemove this region from the given snap on- Specified by:
removein interfaceTraceMemoryRegion- Parameters:
snap-
-
isValid
public boolean isValid(long snap) Description copied from interface:TraceMemoryRegionCheck if the region is valid at the given snapshotIn object mode, a region'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 region object has a canonical parent at the given snapshot. In table mode, it checks that the lifespan contains the snap.
- Specified by:
isValidin interfaceTraceMemoryRegion- Parameters:
snap- the snapshot key- Returns:
- true if valid, false if not
-
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
-
updateViewsAdded
protected void updateViewsAdded() -
updateViewsLifespanChanged
-
updateViewsValueChanged
-
updateViewsDeleted
protected void updateViewsDeleted()
-