Interface TraceModuleManager
- All Superinterfaces:
TraceModuleOperations
- All Known Implementing Classes:
DBTraceModuleManager
The manager is not bound to any particular address space and may be used to access information about any memory address. For module and section management, only section information can be space bound.
-
Method Summary
Modifier and TypeMethodDescriptiondefault TraceModuleaddLoadedModule(String modulePath, String moduleName, AddressRange range, long snap) Add a module which is still loadedaddModule(String modulePath, String moduleName, AddressRange range, Lifespan lifespan) Add a modulegetLoadedModuleByPath(long snap, String modulePath) Get the module loaded at the given snap having the given pathgetLoadedSectionByPath(long snap, String sectionPath) Get the section loaded at the given snap having the given pathCollection<? extends TraceModule> getModulesByPath(String modulePath) Get modules by pathCollection<? extends TraceSection> getSectionsByPath(String sectionPath) Get sections by pathMethods inherited from interface ghidra.trace.model.modules.TraceModuleOperations
getAllModules, getAllSections, getLoadedModules, getModulesAt, getModulesIntersecting, getSectionsAt, getSectionsIntersecting
-
Method Details
-
addModule
TraceModule addModule(String modulePath, String moduleName, AddressRange range, Lifespan lifespan) throws DuplicateNameException Add a moduleNote that modules may overlap.
- Parameters:
modulePath- the "full name" of the modulemoduleName- the "short name" of the module, usually its path on the file systemrange- the address range of the module -- min should be the base addresslifespan- the span from load time to unload time- Returns:
- the new module
- Throws:
DuplicateNameException- if another module with the same name already exists for the desired lifespan
-
addLoadedModule
default TraceModule addLoadedModule(String modulePath, String moduleName, AddressRange range, long snap) throws DuplicateNameException Add a module which is still loaded- Parameters:
modulePath- the "full name" of the modulemoduleName- the "short name" of the modulerange- the address range of the module -- min should be the base addresssnap- the snap at which the module was loaded- Returns:
- the new module
- Throws:
DuplicateNameException- if another module with the same name already exists for the desired lifespan
-
getModulesByPath
Get modules by pathNote it is possible the same module was loaded and unloaded multiple times. In that case, each load will have an separate record. It is also possible it was loaded at a different address, or that it's an entirely different module which happens to have the same path.
Note that the "module path" in this case is not necessarily path of the module's image on the target file system, though this name often contains it. Rather, this is typically the full path to the module in the target debugger's object model. Likely, the "short name" is the file system path of the module's image.
- Parameters:
modulePath- the "full name" of the module- Returns:
- the collection of modules having the given path
-
getLoadedModuleByPath
Get the module loaded at the given snap having the given path- Parameters:
snap- the snap which the module's lifespan must containmodulePath- the module's "full name"- Returns:
- the module, or
nullif no module matches
-
getSectionsByPath
Get sections by pathNote because it's possible for a module path to be duplicated (but not within any overlapping snap), it is also possible for a section path to be duplicated.
- Parameters:
sectionPath- the "full name" of the section- Returns:
- the collection of sections having the given path
-
getLoadedSectionByPath
Get the section loaded at the given snap having the given path- Parameters:
snap- the snap which the section's (module's) lifespan must containsectionPath- the section's "full name"- Returns:
- the section, or
nullif no section matches
-