Class ExternalDebugInfo
java.lang.Object
ghidra.app.util.bin.format.dwarf.external.ExternalDebugInfo
Metadata needed to find an ELF/DWARF external debug file, retrieved from an ELF binary's
".gnu_debuglink" section and/or ".note.gnu.build-id" section.
The debuglink can provide a filename and crc of the external debug file, while the build-id can provide a hash that is converted to a filename that identifies the external debug file.
-
Constructor Summary
ConstructorDescriptionExternalDebugInfo
(String filename, int crc, byte[] hash) Constructor to create anExternalDebugInfo
instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExternalDebugInfo
fromProgram
(Program program) Create a newExternalDebugInfo
from information found in the specified program.int
getCrc()
Return the crc of the external debug file.Return the filename of the external debug file, or null if not specified.byte[]
getHash()
Return the build-id hash digest.boolean
Return true if there is a filenametoString()
-
Constructor Details
-
ExternalDebugInfo
Constructor to create anExternalDebugInfo
instance.- Parameters:
filename
- filename of external debug file, or nullcrc
- crc32 of external debug file, or 0 if no filenamehash
- build-id hash digest found in ".note.gnu.build-id" section, or null if not present
-
-
Method Details
-
fromProgram
Create a newExternalDebugInfo
from information found in the specified program.- Parameters:
program
-Program
to query- Returns:
- new
ExternalDebugInfo
or null if no external debug metadata found in program
-
hasFilename
public boolean hasFilename()Return true if there is a filename- Returns:
- boolean true if filename is available, false if not
-
getFilename
Return the filename of the external debug file, or null if not specified.- Returns:
- String filename of external debug file, or null if not specified
-
getCrc
public int getCrc()Return the crc of the external debug file. Not valid if filename is missing.- Returns:
- int crc32 of external debug file.
-
getHash
public byte[] getHash()Return the build-id hash digest.- Returns:
- byte array containing the build-id hash (usually 20 bytes)
-
toString
-