Class LocalDirDebugLinkProvider
java.lang.Object
ghidra.app.util.bin.format.dwarf.external.LocalDirDebugLinkProvider
- All Implemented Interfaces:
DebugFileProvider,DebugInfoProvider
Searches for DWARF external debug files specified via a debug-link filename / crc in a directory.
-
Constructor Summary
ConstructorsConstructorDescriptionLocalDirDebugLinkProvider(File searchDir) Creates a newLocalDirDebugLinkProviderat the specified dir. -
Method Summary
Modifier and TypeMethodDescriptionstatic intCalculates the crc32 for the specified file.static LocalDirDebugLinkProvidercreate(String name, DebugInfoProviderCreatorContext context) Creates a newLocalDirDebugLinkProviderinstance 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 LocalDirDebugLinkProvider.
-
Constructor Details
-
LocalDirDebugLinkProvider
Creates a newLocalDirDebugLinkProviderat the specified dir.- Parameters:
searchDir- path to the root directory of where to search
-
-
Method Details
-
matches
Returns true if the specified name string specifies a LocalDirDebugLinkProvider.- Parameters:
name- string to test- Returns:
- boolean true if name specifies a LocalDirDebugLinkProvider name
-
create
public static LocalDirDebugLinkProvider create(String name, DebugInfoProviderCreatorContext context) Creates a newLocalDirDebugLinkProviderinstance 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
LocalDirDebugLinkProviderinstance
-
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 CancelledException, IOException 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:
CancelledException- if cancelledIOException- if error
-
calcCRC
Calculates the crc32 for the specified file.- Parameters:
f-Fileto read- Returns:
- int crc32
- Throws:
IOException- if error reading file
-