Package ghidra.trace.database.guest
Class DBTracePlatformManager
java.lang.Object
ghidra.trace.database.guest.DBTracePlatformManager
- All Implemented Interfaces:
ErrorHandler,DBTraceManager,TracePlatformManager
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CompilerSpecprotected final Languageprotected final DBHandleprotected final InternalTracePlatformprotected final Map<Language, DBTraceGuestPlatform.DBTraceGuestLanguage> protected final DBCachedObjectStore<DBTraceGuestPlatform.DBTraceGuestLanguage> protected final ReadWriteLockprotected final Map<CompilerSpec, DBTraceGuestPlatform> protected final DBCachedObjectStore<DBTraceGuestPlatform> protected final Collection<TraceGuestPlatform> protected final DBCachedObjectStore<DBTraceGuestPlatformMappedRange> protected final DBTrace -
Constructor Summary
ConstructorsConstructorDescriptionDBTracePlatformManager(DBHandle dbh, OpenMode openMode, ReadWriteLock lock, TaskMonitor monitor, CompilerSpec baseCompilerSpec, DBTrace trace) -
Method Summary
Modifier and TypeMethodDescriptionaddGuestPlatform(CompilerSpec compilerSpec) Add a guest platformassertMine(TracePlatform platform) protected AddressvoidNotification that an IO exception occurred.protected voiddeleteGuestPlatform(DBTraceGuestPlatform platform, TaskMonitor monitor) protected DBTraceGuestPlatformdoAddGuestPlatform(CompilerSpec compilerSpec) protected CompilerSpecgetCompilerByKey(int compilerKey) Get all guest platformsGet a platform representing the trace's base language and compiler specgetLanguageByKey(int key) getLanguageByLanguage(Language language) getOrAddPlatform(CompilerSpec compilerSpec) Get or add a platform for the given compiler specgetOrCreateLanguage(Language language) getPlatform(CompilerSpec compilerSpec) Get the platform for the given compiler specgetPlatformByKey(int key) protected intgetPlatformKeyForCompiler(CompilerSpec compiler) voidinvalidateCache(boolean all) Invalidate this manager's cachesprotected voidprotected voidprotected voidloadPlatforms(OpenMode openMode, TaskMonitor monitor)
-
Field Details
-
dbh
-
lock
-
baseLanguage
-
baseCompilerSpec
-
trace
-
languageStore
-
platformStore
-
platformView
-
languagesByLanguage
-
platformsByCompiler
-
rangeMappingStore
-
hostPlatform
-
-
Constructor Details
-
DBTracePlatformManager
public DBTracePlatformManager(DBHandle dbh, OpenMode openMode, ReadWriteLock lock, TaskMonitor monitor, CompilerSpec baseCompilerSpec, DBTrace trace) throws VersionException, IOException, CancelledException
-
-
Method Details
-
loadLanguages
protected void loadLanguages() -
loadPlatforms
protected void loadPlatforms(OpenMode openMode, TaskMonitor monitor) throws VersionException, CancelledException, IOException -
loadPlatformMappings
protected void loadPlatformMappings() -
getOrCreateLanguage
-
getLanguageByKey
-
getPlatformByKey
-
getPlatformKeyForCompiler
-
getLanguageByLanguage
-
getCompilerByKey
-
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).
-
deleteGuestPlatform
protected void deleteGuestPlatform(DBTraceGuestPlatform platform, TaskMonitor monitor) throws CancelledException - Throws:
CancelledException
-
getHostPlatform
Description copied from interface:TracePlatformManagerGet a platform representing the trace's base language and compiler spec- Specified by:
getHostPlatformin interfaceTracePlatformManager- Returns:
- the host platform
-
doAddGuestPlatform
-
addGuestPlatform
Description copied from interface:TracePlatformManagerAdd a guest platform- Specified by:
addGuestPlatformin interfaceTracePlatformManager- Parameters:
compilerSpec- the compiler spec, which cannot be the base compiler spec- Returns:
- the new platform
-
getPlatform
Description copied from interface:TracePlatformManagerGet the platform for the given compiler spec- Specified by:
getPlatformin interfaceTracePlatformManager- Parameters:
compilerSpec- the compiler spec- Returns:
- the platform, if found, or null
-
getOrAddPlatform
Description copied from interface:TracePlatformManagerGet or add a platform for the given compiler spec- Specified by:
getOrAddPlatformin interfaceTracePlatformManager- Parameters:
compilerSpec- the compiler spec- Returns:
- the new or existing platform
-
getGuestPlatforms
Description copied from interface:TracePlatformManagerGet all guest platforms- Specified by:
getGuestPlatformsin interfaceTracePlatformManager- Returns:
- the collection of platforms
-
assertMine
-
computeNextRegisterMin
-