Class LocalDirDebugInfoDProvider
java.lang.Object
ghidra.app.util.bin.format.dwarf.external.LocalDirDebugInfoDProvider
- All Implemented Interfaces:
DebugFileProvider,DebugFileStorage,DebugInfoProvider
Provides debug files found in a debuginfod-client compatible directory structure.
Provides ability to store files.
Does not try to follow debuginfod's file age-off logic or config values.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLocalDirDebugInfoDProvider(File rootDir) LocalDirDebugInfoDProvider(File rootDir, String name, String descriptiveName) -
Method Summary
Modifier and TypeMethodDescriptionstatic LocalDirDebugInfoDProvidercreate(String name, DebugInfoProviderCreatorContext context) Creates a newBuildIdDebugFileProviderinstance using the specified name string.Returns a human formatted string describing this provider, used in UI prompts or lists.getFile(ExternalDebugInfo debugInfo, TaskMonitor monitor) Searches for a debug file that fulfills the criteria specified in theExternalDebugInfo.static LocalDirDebugInfoDProviderReturns a new LocalDirDebugInfoDProvider that stores files in a Ghidra specific cache directory.getName()Returns the name of this instance, which should be a serialized copy of this instance, typically like "something://serialized_data".getStatus(TaskMonitor monitor) Returns DebugInfoProviderStatus representing this provider's current status.static LocalDirDebugInfoDProviderReturns a new LocalDirDebugInfoDProvider that stores files in the same directory that the debuginfod-find CLI tool would (/home/user/.cache/debuginfod_client/).static booleanReturns true if the specified name string specifies a LocalDirDebugInfoDProvider.voidvoidvoidpurgeAll()putStream(ExternalDebugInfo id, DebugStreamProvider.StreamInfo stream, TaskMonitor monitor) voidsetNeedsMaintCheck(boolean needsInitMaintCheck) toString()
-
Field Details
-
MAX_FILE_AGE_MS
public static final long MAX_FILE_AGE_MS -
GHIDRACACHE_NAME
- See Also:
-
USERHOMECACHE_NAME
- See Also:
-
-
Constructor Details
-
LocalDirDebugInfoDProvider
-
LocalDirDebugInfoDProvider
-
-
Method Details
-
matches
Returns true if the specified name string specifies a LocalDirDebugInfoDProvider.- Parameters:
name- string to test- Returns:
- boolean true if name specifies a LocalDirDebugInfoDProvider
-
create
public static LocalDirDebugInfoDProvider create(String name, DebugInfoProviderCreatorContext context) Creates a newBuildIdDebugFileProviderinstance using the specified name string.- Parameters:
name- string, earlier returned fromgetName()context-DebugInfoProviderCreatorContextto allow accessing information outside of the name string that might be needed to create a new instance- Returns:
- new
BuildIdDebugFileProviderinstance
-
getUserHomeCacheInstance
Returns a new LocalDirDebugInfoDProvider that stores files in the same directory that the debuginfod-find CLI tool would (/home/user/.cache/debuginfod_client/).- Returns:
- a new LocalDirDebugInfoDProvider that stores files in the same directory that the debuginfod-find CLI tool would (/home/user/.cache/debuginfod_client/)
-
getGhidraCacheInstance
Returns a new LocalDirDebugInfoDProvider that stores files in a Ghidra specific cache directory.- Returns:
- a new LocalDirDebugInfoDProvider that stores files in a Ghidra specific cache directory
-
getRootDir
-
getName
Description copied from interface:DebugInfoProviderReturns the name of this instance, which should be a serialized copy of this instance, typically like "something://serialized_data".- Specified by:
getNamein interfaceDebugInfoProvider- Returns:
- the name of this instance, which should be a serialized copy of this instance, typically like "something://serialized_data"
-
getDescriptiveName
Description copied from interface:DebugInfoProviderReturns a human formatted string describing this provider, used in UI prompts or lists.- Specified by:
getDescriptiveNamein interfaceDebugInfoProvider- Returns:
- a human formatted string describing this provider, used in UI prompts or lists
-
getStatus
Description copied from interface:DebugInfoProviderReturns DebugInfoProviderStatus representing this provider's current status.- Specified by:
getStatusin interfaceDebugInfoProvider- Parameters:
monitor-TaskMonitor- Returns:
- DebugInfoProviderStatus representing this provider's current status
-
getDirectory
-
setNeedsMaintCheck
public void setNeedsMaintCheck(boolean needsInitMaintCheck) -
getFile
public File getFile(ExternalDebugInfo debugInfo, TaskMonitor monitor) throws IOException, CancelledException Description copied from interface:DebugFileProviderSearches for a debug file that fulfills the criteria specified in theExternalDebugInfo.- Specified by:
getFilein interfaceDebugFileProvider- Parameters:
debugInfo- search criteriamonitor-TaskMonitor- Returns:
- File of the matching file, or
nullif not found - Throws:
IOException- if errorCancelledException- if cancelled
-
putStream
public File putStream(ExternalDebugInfo id, DebugStreamProvider.StreamInfo stream, TaskMonitor monitor) throws IOException, CancelledException - Specified by:
putStreamin interfaceDebugFileStorage- Throws:
IOExceptionCancelledException
-
toString
-
purgeAll
public void purgeAll() -
performInitMaintIfNeeded
public void performInitMaintIfNeeded() -
performCacheMaintIfNeeded
public void performCacheMaintIfNeeded()
-