Interface TraceMemoryRegion
- All Superinterfaces:
TraceObjectInterface,TraceUniqueObject
- All Known Implementing Classes:
DBTraceMemoryRegion
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields 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 TypeMethodDescriptiondefault voidaddFlags(long snap, TraceMemoryFlag... flags) Add the given flags, e.g., permissions, to this regionvoidaddFlags(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 regiondefault voidclearFlags(long snap, TraceMemoryFlag... flags) Remove the given flags, e.g., permissions, from 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 regiongetPath()Get the "full name" of this regiongetRange(long snap) Get the virtual memory address range of this regiongetTrace()Get the trace containing this regiondefault booleanisExecute(long snap) Check if theTraceMemoryFlag.EXECUTEflag is presentdefault booleanisRead(long snap) Check if theTraceMemoryFlag.READflag is presentbooleanisValid(long snap) Check if the region is valid at the given snapshotdefault booleanisVolatile(long snap) Check if theTraceMemoryFlag.VOLATILEflag is presentdefault booleanisWrite(long snap) Check if theTraceMemoryFlag.WRITEflag is presentvoidremove(long snap) Remove this region from the given snap ondefault voidsetExecute(long snap, boolean execute) Add or clear theTraceMemoryFlag.EXECUTEflagdefault voidsetFlags(long snap, TraceMemoryFlag... flags) Set the flags, e.g., permissions, of this regionvoidsetFlags(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 range) Set the virtual memory address range of this regionvoidsetRange(Lifespan lifespan, AddressRange range) Set the virtual memory address range of this regiondefault voidsetRead(long snap, boolean read) Add or clear theTraceMemoryFlag.READflagdefault voidsetVolatile(long snap, boolean vol) Add or clear theTraceMemoryFlag.VOLATILEflagdefault voidsetWrite(long snap, boolean write) Add or clear theTraceMemoryFlag.WRITEflagMethods inherited from interface ghidra.trace.model.target.iface.TraceObjectInterface
getObjectMethods inherited from interface ghidra.trace.model.TraceUniqueObject
getObjectKey, isDeleted
-
Field Details
-
KEY_RANGE
- See Also:
-
KEY_READABLE
- See Also:
-
KEY_WRITABLE
- See Also:
-
KEY_EXECUTABLE
- See Also:
-
KEY_VOLATILE
- See Also:
-
-
Method Details
-
getTrace
Trace getTrace()Get the trace containing this region- Returns:
- the trace
-
getPath
String getPath()Get 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.
- Returns:
- the path
-
setName
Set the "short name" of this regionThe given name should be suitable for display on the screen.
- Parameters:
lifespan- the span of timename- the name
-
setName
Set the "short name" of this regionThe given name should be suitable for display on the screen.
- Parameters:
snap- the snapname- the name
-
getName
Get the "short name" of this regionThis defaults to the "full name," but can be modified via
setName(long, String)- Parameters:
snap- the snap- Returns:
- the name
-
setRange
Set 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.
- Parameters:
lifespan- the span of timerange- the address range
-
setRange
Set 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.
- Parameters:
snap- the snaprange- the address range- Throws:
TraceOverlappedRegionException- if the specified range would cause this region to overlap another
-
getRange
Get the virtual memory address range of this region- Parameters:
snap- the snap- Returns:
- the address range
-
setMinAddress
Set 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.
- Parameters:
snap- the snapmin- the new minimum- Throws:
TraceOverlappedRegionException- if extending the region would cause it to overlap another- See Also:
-
getMinAddress
Get the minimum address of the range- Parameters:
snap- the snap- Returns:
- the minimum address
- See Also:
-
setMaxAddress
Set 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.
- Parameters:
snap- the snapmax- the new minimum- Throws:
TraceOverlappedRegionException- if extending the region would cause it to overlap another- See Also:
-
getMaxAddress
Get the maximum address of the range- Parameters:
snap- the snap- Returns:
- the maximum address
- See Also:
-
setLength
void setLength(long snap, long length) throws AddressOverflowException, TraceOverlappedRegionException Set 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.
- Parameters:
snap- the snaplength- the desired length of the range- Throws:
AddressOverflowException- if extending the range would cause the max address to overflowTraceOverlappedRegionException- if extending the region would cause it to overlap another- See Also:
-
getLength
long getLength(long snap) Measure the length, in bytes, of this region's address range- Parameters:
snap- the snap- Returns:
- the length
-
setFlags
Set the flags, e.g., permissions, of this region- Parameters:
lifespan- the span of timeflags- the flags
-
setFlags
Set the flags, e.g., permissions, of this region- Parameters:
snap- the snapflags- the flags
-
setFlags
Set the flags, e.g., permissions, of this region- Parameters:
snap- the snapflags- the flags
-
addFlags
Add the given flags, e.g., permissions, to this region- Parameters:
lifespan- the span of timeflags- the flags
-
addFlags
Add the given flags, e.g., permissions, to this region- Parameters:
snap- the snapflags- the flags
-
addFlags
Add the given flags, e.g., permissions, to this region- Parameters:
snap- the snapflags- the flags
-
clearFlags
Remove the given flags, e.g., permissions, from this region- Parameters:
lifespan- the span of timeflags- the flags
-
clearFlags
Remove the given flags, e.g., permissions, from this region- Parameters:
snap- the snapflags- the flags
-
clearFlags
Remove the given flags, e.g., permissions, from this region- Parameters:
snap- the snapflags- the flags
-
getFlags
Get the flags, e.g., permissions, of this region- Parameters:
snap- the snap- Returns:
- the flags
-
setRead
default void setRead(long snap, boolean read) Add or clear theTraceMemoryFlag.READflag- Parameters:
snap- the snapread- true to add, false to clear
-
isRead
default boolean isRead(long snap) Check if theTraceMemoryFlag.READflag is present- Parameters:
snap- the snap- Returns:
- true if present, false if absent
-
setWrite
default void setWrite(long snap, boolean write) Add or clear theTraceMemoryFlag.WRITEflag- Parameters:
snap- the snapwrite- true to add, false to clear
-
isWrite
default boolean isWrite(long snap) Check if theTraceMemoryFlag.WRITEflag is present- Parameters:
snap- the snap- Returns:
- true if present, false if absent
-
setExecute
default void setExecute(long snap, boolean execute) Add or clear theTraceMemoryFlag.EXECUTEflag- Parameters:
snap- the snapexecute- true to add, false to clear
-
isExecute
default boolean isExecute(long snap) Check if theTraceMemoryFlag.EXECUTEflag is present- Parameters:
snap- the snap- Returns:
- true if present, false if absent
-
setVolatile
default void setVolatile(long snap, boolean vol) Add or clear theTraceMemoryFlag.VOLATILEflag- Parameters:
snap- the snapvol- true to add, false to clear
-
isVolatile
default boolean isVolatile(long snap) Check if theTraceMemoryFlag.VOLATILEflag is present- Parameters:
snap- the snap- Returns:
- true if present, false if absent
-
delete
void delete()Delete this region from the trace -
remove
void remove(long snap) Remove this region from the given snap on- Parameters:
snap-
-
isValid
boolean isValid(long snap) Check 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.
- Parameters:
snap- the snapshot key- Returns:
- true if valid, false if not
-