Class BuildIdDebugFileProvider
java.lang.Object
ghidra.app.util.bin.format.dwarf.external.BuildIdDebugFileProvider
- All Implemented Interfaces:
DebugFileProvider,DebugInfoProvider
A
DebugFileProvider that expects the external debug files to be named using the hexadecimal
value of the hash of the file, and to be arranged in a bucketed directory hierarchy using the
first 2 hexdigits of the hash.
For example, the debug file with hash 6addc39dc19c1b45f9ba70baf7fd81ea6508ea7f would
be stored as "6a/ddc39dc19c1b45f9ba70baf7fd81ea6508ea7f.debug" (under some root directory).
-
Constructor Summary
ConstructorsConstructorDescriptionBuildIdDebugFileProvider(File rootDir) Creates a newBuildIdDebugFileProviderat the specified directory. -
Method Summary
Modifier and TypeMethodDescriptionstatic BuildIdDebugFileProvidercreate(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.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 booleanReturns true if the specified name string specifies a BuildIdDebugFileProvider.
-
Constructor Details
-
BuildIdDebugFileProvider
Creates a newBuildIdDebugFileProviderat the specified directory.- Parameters:
rootDir- path to the root directory of the build-id directory (typically ends with "./build-id")
-
-
Method Details
-
matches
Returns true if the specified name string specifies a BuildIdDebugFileProvider.- Parameters:
name- string to test- Returns:
- boolean true if name specifies a BuildIdDebugFileProvider
-
create
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
-
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
-
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
-