Class BuildIdSearchLocation
java.lang.Object
ghidra.app.util.bin.format.dwarf.external.BuildIdSearchLocation
- All Implemented Interfaces:
SearchLocation
A
SearchLocation 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
ConstructorsConstructorDescriptionBuildIdSearchLocation(File rootDir) Creates a newBuildIdSearchLocationat the specified location. -
Method Summary
Modifier and TypeMethodDescriptionstatic BuildIdSearchLocationcreate(String locString, SearchLocationCreatorContext context) Creates a newBuildIdSearchLocationinstance using the specified location string.findDebugFile(ExternalDebugInfo debugInfo, TaskMonitor monitor) Searchs for a debug file that fulfills the criteria specified in theExternalDebugInfo.Returns a human formatted string describing this location, used in UI prompts or lists.getName()Returns the name of this instance, which should be a serialized copy of this instance.static booleanisBuildIdSearchLocation(String locString) Returns true if the specified location string specifies a BuildIdSearchLocation.
-
Constructor Details
-
BuildIdSearchLocation
Creates a newBuildIdSearchLocationat the specified location.- Parameters:
rootDir- path to the root directory of the build-id directory (typically ends with "./build-id")
-
-
Method Details
-
isBuildIdSearchLocation
Returns true if the specified location string specifies a BuildIdSearchLocation.- Parameters:
locString- string to test- Returns:
- boolean true if locString specifies a BuildId location
-
create
Creates a newBuildIdSearchLocationinstance using the specified location string.- Parameters:
locString- string, earlier returned fromgetName()context-SearchLocationCreatorContextto allow accessing information outside of the location string that might be needed to create a new instance- Returns:
- new
BuildIdSearchLocationinstance
-
getName
Description copied from interface:SearchLocationReturns the name of this instance, which should be a serialized copy of this instance.- Specified by:
getNamein interfaceSearchLocation- Returns:
- String serialized data of this instance, typically in "something://serialized_data" form
-
getDescriptiveName
Description copied from interface:SearchLocationReturns a human formatted string describing this location, used in UI prompts or lists.- Specified by:
getDescriptiveNamein interfaceSearchLocation- Returns:
- formatted string
-
findDebugFile
public FSRL findDebugFile(ExternalDebugInfo debugInfo, TaskMonitor monitor) throws IOException, CancelledException Description copied from interface:SearchLocationSearchs for a debug file that fulfills the criteria specified in theExternalDebugInfo.- Specified by:
findDebugFilein interfaceSearchLocation- Parameters:
debugInfo- search criteriamonitor-TaskMonitor- Returns:
FSRLof the matching file, ornullif not found- Throws:
IOException- if errorCancelledException- if cancelled
-