Skip to content

Documentation and examples for various forms of split debug info #796

@VorpalBlade

Description

@VorpalBlade

From what I can tell there are at least three types of split debug info:

  1. Loose .dwo files
  2. Packed .dwp files
  3. Split after linking, using .gnu_debuglink and/or .note.gnu.build-id. This is commonly used with debuginfod for example. (Is there a DWARF 5 version of these attributes?)

Then how this works is different between DWARF 4 (GNU extensions) and DWARF 5 (in the standard).

However, the docs for how to properly handle this when parsing debug info with gimli are lacking and the types are confusing

  • There is DwarfPackage, presumably only relevant to case 2 above.
  • There is:
    • DW_AT_dwo_name (DW_AT_GNU_dwo_name)
    • DW_AT_GNU_dwo_id (but I don't see any such ID in DWARF 5 in Rust built skeleton units, not even for case 2).
    • Dwarf::set_sup etc. But I don't see any examples of how these are supposed to be used. Is all I need to do to handle case 3 to call set_sup?

It would be good to have better docs, or an example, that show how to handle all of these cases. For example, since at least case 1 & 2 are not relocated, is there are need to relocate address info?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions