Skip to content

DWARF doesn't distinguish struct, tuple, and tuple struct #32918

@tromey

Description

@tromey

Currently the DWARF generated by rustc doesn't distinguish a struct, a tuple, or a tuple struct. They are all represented by DW_TAG_structure_type.

In gdb I handle this by examining the type name and assume that if it starts with "(" then it is a tuple. A tuple struct is detected by seeing if the first field is named "__0". Neither of these methods are really very good -- they work ok with today's debuginfo but are not really in the spirit of DWARF.

This requires a DWARF addition. In the short term it would be possible to pick an extension value in the DW_AT user space (this must be done carefully to avoid clashing with other known extensions).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)C-bugCategory: This is a bug.P-lowLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions