Class DBTraceModule
- All Implemented Interfaces:
DBTraceObjectInterface,TraceModule,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.modules.TraceModule
KEY_MODULE_NAME, KEY_RANGEFields 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 TypeMethodDescriptionaddSection(long snap, String sectionPath, String sectionName, AddressRange range) Add a section to this modulevoiddelete()Delete this module and its sections from the traceCollection<? extends TraceSection> Collect all sections contained within this module at any timegetBase(long snap) Get the base address of the modulelonggetLength(long snap) Get the length of the range of the modulegetMaxAddress(long snap) Get the maximum address of the modulegetName(long snap) Get the "short name" of this moduleGet the object backing this implementationgetPath()Get the "full name" of this modulegetRange(long snap) Get the address range of the modulegetSectionByName(long snap, String sectionName) Get the section in this module having the given short nameCollection<? extends TraceSection> getSections(long snap) Collect all sections contained within this module at the given snapgetTrace()Get the trace containing this modulebooleanCheck if the module is alive for any of the given spanbooleanisValid(long snap) Check if the module is valid at the given snapshotvoidremove(long snap) Remove this module from the given snap onvoidSet the base (usually minimum) address of the modulevoidsetLength(long snap, long length) Set the length of the range of the modulevoidsetMaxAddress(long snap, Address max) Set the maximum address of the modulevoidSet the "short name" of this modulevoidSet the "short name" of this modulevoidsetRange(long snap, AddressRange range) Set the address range of the modulevoidsetRange(Lifespan lifespan, AddressRange range) Set the address range of the moduleTraceChangeRecord<?, ?> 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, spaceForValueMethods inherited from interface ghidra.trace.model.modules.TraceModule
addSection
-
Constructor Details
-
DBTraceModule
-
-
Method Details
-
getTrace
Description copied from interface:TraceModuleGet the trace containing this module- Specified by:
getTracein interfaceTraceModule- Returns:
- the trace
-
addSection
public TraceSection addSection(long snap, String sectionPath, String sectionName, AddressRange range) throws DuplicateNameException Description copied from interface:TraceModuleAdd a section to this moduleNote while rare, it is permissible for sections to overlap. Module and section records are more informational and provide a means of recording module load and unload events, while noting the sections of which the debugger was aware. Typically each section, meeting certain criteria set by the target, is mapped into a memory region. Those regions cannot overlap. Furthermore, any overlapped mappings to static modules, which are usually derived from sections stored here, must agree on the address adjustment.
- Specified by:
addSectionin interfaceTraceModule- Parameters:
snap- the "load" snap of the modulesectionPath- the "full name" of the sectionsectionName- the "short name" of the sectionrange- the range of memory into which the section is loaded- Returns:
- the new section
- Throws:
DuplicateNameException- if a section with the given name already exists in this module
-
getPath
Description copied from interface:TraceModuleGet the "full name" of this moduleThis is a unique key (within any snap) for retrieving the module, and may not be suitable for display on the screen. This is not likely the file system path of the module's image. Rather, it's typically the path of the module in the target debugger's object model.
- Specified by:
getPathin interfaceTraceModule- Returns:
- the path
-
setName
Description copied from interface:TraceModuleSet the "short name" of this moduleThe given name is typically the file system path of the module's image, which is considered suitable for display on the screen.
- Specified by:
setNamein interfaceTraceModule- Parameters:
lifespan- the span of timename- the name
-
setName
Description copied from interface:TraceModuleSet the "short name" of this moduleThe given name is typically the file system path of the module's image, which is considered suitable for display on the screen.
- Specified by:
setNamein interfaceTraceModule- Parameters:
snap- the snapname- the name
-
getName
Description copied from interface:TraceModuleGet the "short name" of this moduleThis defaults to the "full name," but can be modified via
TraceModule.setName(long, String)- Specified by:
getNamein interfaceTraceModule- Parameters:
snap- the snap- Returns:
- the name
-
setRange
Description copied from interface:TraceModuleSet the address range of the moduleTypically, the minimum address in this range is the module's base address. If sections are given, this range should enclose all sections mapped into memory.
- Specified by:
setRangein interfaceTraceModule- Parameters:
lifespan- the span of timerange- the address range.
-
setRange
Description copied from interface:TraceModuleSet the address range of the moduleTypically, the minimum address in this range is the module's base address. If sections are given, this range should enclose all sections mapped into memory.
- Specified by:
setRangein interfaceTraceModule- Parameters:
snap- the snaprange- the address range.
-
getRange
Description copied from interface:TraceModuleGet the address range of the module- Specified by:
getRangein interfaceTraceModule- Parameters:
snap- the snap- Returns:
- the address range
- See Also:
-
setBase
Description copied from interface:TraceModuleSet the base (usually minimum) address of the moduleIf not given by the target's debugger, the model or the recorder should endeavor to compute it from whatever information is provided. In general, this should be the virtual memory address mapped to file offset 0 of the module's image.
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:
setBasein interfaceTraceModule- Parameters:
snap- the snapbase- the base address
-
getBase
Description copied from interface:TraceModuleGet the base address of the module- Specified by:
getBasein interfaceTraceModule- Parameters:
snap- the snap- Returns:
- the base address
-
setMaxAddress
Description copied from interface:TraceModuleSet the maximum address of the moduleNote 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 interfaceTraceModule- Parameters:
snap- the snapmax- the maximum address- See Also:
-
getMaxAddress
Description copied from interface:TraceModuleGet the maximum address of the module- Specified by:
getMaxAddressin interfaceTraceModule- Parameters:
snap- the snap- Returns:
- the maximum address
- See Also:
-
setLength
Description copied from interface:TraceModuleSet the length of the range of the moduleThis 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 interfaceTraceModule- Parameters:
snap- the snaplength- the length- Throws:
AddressOverflowException- if the length would cause the max address to overflow- See Also:
-
getLength
public long getLength(long snap) Description copied from interface:TraceModuleGet the length of the range of the module- Specified by:
getLengthin interfaceTraceModule- Parameters:
snap- the snap- Returns:
- the length
- See Also:
-
getSections
Description copied from interface:TraceModuleCollect all sections contained within this module at the given snap- Specified by:
getSectionsin interfaceTraceModule- Parameters:
snap- the snap- Returns:
- the collection of sections
-
getAllSections
Description copied from interface:TraceModuleCollect all sections contained within this module at any time- Specified by:
getAllSectionsin interfaceTraceModule- Returns:
- the collection of sections
-
getSectionByName
Description copied from interface:TraceModuleGet the section in this module having the given short name- Specified by:
getSectionByNamein interfaceTraceModule- Parameters:
snap- the snapsectionName- the name- Returns:
- the section, or
nullif no section has the given name
-
delete
public void delete()Description copied from interface:TraceModuleDelete this module and its sections from the trace- Specified by:
deletein interfaceTraceModule
-
remove
public void remove(long snap) Description copied from interface:TraceModuleRemove this module from the given snap on- Specified by:
removein interfaceTraceModule- Parameters:
snap- the snap
-
isValid
public boolean isValid(long snap) Description copied from interface:TraceModuleCheck if the module is valid at the given snapshot- Specified by:
isValidin interfaceTraceModule- Parameters:
snap- the snapshot key- Returns:
- true if valid, false if not
-
isAlive
Description copied from interface:TraceModuleCheck if the module is alive for any of the given span- Specified by:
isAlivein interfaceTraceModule- Parameters:
span- the span- Returns:
- true if its life intersects the span
-
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
-