Class ExternalDebugInfo


  • public class ExternalDebugInfo
    extends java.lang.Object
    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 Detail

      • ExternalDebugInfo

        public ExternalDebugInfo​(java.lang.String filename,
                                 int crc,
                                 byte[] hash)
        Constructor to create an ExternalDebugInfo instance.
        Parameters:
        filename - filename of external debug file, or null
        crc - crc32 of external debug file, or 0 if no filename
        hash - build-id hash digest found in ".note.gnu.build-id" section, or null if not present
    • Method Detail

      • hasFilename

        public boolean hasFilename()
        Return true if there is a filename
        Returns:
        boolean true if filename is available, false if not
      • getFilename

        public java.lang.String 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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object