Class DBTraceModuleManager
- All Implemented Interfaces:
ErrorHandler,DBTraceManager,TraceModuleManager,TraceModuleOperations
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ReadWriteLockprotected final DBTraceObjectManagerprotected final DBTrace -
Constructor Summary
ConstructorsConstructorDescriptionDBTraceModuleManager(DBHandle dbh, OpenMode openMode, ReadWriteLock lock, TaskMonitor monitor, DBTrace trace, DBTraceObjectManager objectManager) -
Method Summary
Modifier and TypeMethodDescriptionaddModule(String modulePath, String moduleName, AddressRange range, Lifespan lifespan) Add a modulevoidNotification that an IO exception occurred.protected TraceModuledoAddModule(String modulePath, String moduleName, AddressRange range, Lifespan lifespan) protected Collection<? extends TraceModule> doGetModulesByPath(String modulePath) protected Collection<? extends TraceSection> doGetSectionsByPath(String sectionPath) Collection<? extends TraceModule> Get all modulesCollection<? extends TraceSection> Get all sectionsgetLoadedModuleByPath(long snap, String modulePath) Get the module loaded at the given snap having the given pathCollection<? extends TraceModule> getLoadedModules(long snap) Get all modules loaded at the given snapgetLoadedSectionByPath(long snap, String sectionPath) Get the section loaded at the given snap having the given pathCollection<? extends TraceModule> getModulesAt(long snap, Address address) Get modules at the given snap and addressCollection<? extends TraceModule> getModulesByPath(String modulePath) Get modules by pathCollection<? extends TraceModule> getModulesIntersecting(Lifespan lifespan, AddressRange range) Get the modules loaded at the given snap intersecting the given address rangeCollection<? extends TraceSection> getSectionsAt(long snap, Address address) Get sections at the given snap and addressCollection<? extends TraceSection> getSectionsByPath(String sectionPath) Get sections by pathCollection<? extends TraceSection> getSectionsIntersecting(Lifespan lifespan, AddressRange range) Get the sections loaded at the given snap intersecting the given address rangevoidinvalidateCache(boolean all) Invalidate this manager's cachesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.trace.model.modules.TraceModuleManager
addLoadedModule
-
Field Details
-
lock
-
trace
-
objectManager
-
-
Constructor Details
-
DBTraceModuleManager
public DBTraceModuleManager(DBHandle dbh, OpenMode openMode, ReadWriteLock lock, TaskMonitor monitor, DBTrace trace, DBTraceObjectManager objectManager) throws VersionException, IOException - Throws:
VersionExceptionIOException
-
-
Method Details
-
dbError
Description copied from interface:ErrorHandlerNotification that an IO exception occurred.- Specified by:
dbErrorin interfaceErrorHandler- Parameters:
e-IOExceptionwhich was cause of error
-
invalidateCache
public void invalidateCache(boolean all) Description copied from interface:DBTraceManagerInvalidate this manager's caches- Specified by:
invalidateCachein interfaceDBTraceManager- Parameters:
all- probably nothing. Check out implementations ofManagerDB.invalidateCache(boolean).
-
addModule
public TraceModule addModule(String modulePath, String moduleName, AddressRange range, Lifespan lifespan) throws DuplicateNameException Description copied from interface:TraceModuleManagerAdd a moduleNote that modules may overlap.
- Specified by:
addModulein interfaceTraceModuleManager- 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
-
doAddModule
protected TraceModule doAddModule(String modulePath, String moduleName, AddressRange range, Lifespan lifespan) throws DuplicateNameException - Throws:
DuplicateNameException
-
doGetModulesByPath
-
getModulesByPath
Description copied from interface:TraceModuleManagerGet 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.
- Specified by:
getModulesByPathin interfaceTraceModuleManager- Parameters:
modulePath- the "full name" of the module- Returns:
- the collection of modules having the given path
-
getLoadedModuleByPath
Description copied from interface:TraceModuleManagerGet the module loaded at the given snap having the given path- Specified by:
getLoadedModuleByPathin interfaceTraceModuleManager- Parameters:
snap- the snap which the module's lifespan must containmodulePath- the module's "full name"- Returns:
- the module, or
nullif no module matches
-
getAllModules
Description copied from interface:TraceModuleOperationsGet all modules- Specified by:
getAllModulesin interfaceTraceModuleOperations- Returns:
- the (possibly empty) collection of modules
-
getLoadedModules
Description copied from interface:TraceModuleOperationsGet all modules loaded at the given snap- Specified by:
getLoadedModulesin interfaceTraceModuleOperations- Parameters:
snap- the snapshot key- Returns:
- the collection of loaded modules
-
getModulesAt
Description copied from interface:TraceModuleOperationsGet modules at the given snap and address- Specified by:
getModulesAtin interfaceTraceModuleOperations- Parameters:
snap- the snapaddress- the address- Returns:
- the (possibly empty) collection of modules
-
getModulesIntersecting
public Collection<? extends TraceModule> getModulesIntersecting(Lifespan lifespan, AddressRange range) Description copied from interface:TraceModuleOperationsGet the modules loaded at the given snap intersecting the given address range- Specified by:
getModulesIntersectingin interfaceTraceModuleOperations- Parameters:
lifespan- the span which the module must intersectrange- the range of memory the module must intersect- Returns:
- the collection of sections
-
getSectionsAt
Description copied from interface:TraceModuleOperationsGet sections at the given snap and address- Specified by:
getSectionsAtin interfaceTraceModuleOperations- Parameters:
snap- the snapaddress- the address- Returns:
- the (possibly empty) collection of sections
-
getSectionsIntersecting
public Collection<? extends TraceSection> getSectionsIntersecting(Lifespan lifespan, AddressRange range) Description copied from interface:TraceModuleOperationsGet the sections loaded at the given snap intersecting the given address range- Specified by:
getSectionsIntersectingin interfaceTraceModuleOperations- Parameters:
lifespan- the span which the section's (module's) lifespan must intersectrange- the range of memory each loaded section must intersect- Returns:
- the collection of sections
-
getAllSections
Description copied from interface:TraceModuleOperationsGet all sections- Specified by:
getAllSectionsin interfaceTraceModuleOperations- Returns:
- the (possibly empty) collection of sections
-
doGetSectionsByPath
-
getSectionsByPath
Description copied from interface:TraceModuleManagerGet 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.
- Specified by:
getSectionsByPathin interfaceTraceModuleManager- Parameters:
sectionPath- the "full name" of the section- Returns:
- the collection of sections having the given path
-
getLoadedSectionByPath
Description copied from interface:TraceModuleManagerGet the section loaded at the given snap having the given path- Specified by:
getLoadedSectionByPathin interfaceTraceModuleManager- 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
-