Skip to content

DWARF does not emit DW_TAG_label #140407

Open
@ratmice

Description

@ratmice

In the following rust code it would be nice if this emitted a DW_TAG_label

fn foo() {
    'rs_label: {
        break 'rs_label;
    }
}

In the equivalent C code,

int main() {
  c_label:
    return 0;
}

This will emit a DW_TAG_label

 <2><55>: Abbrev Number: 3 (DW_TAG_label)
    <56>   DW_AT_name        : (indirect string, offset: 0): c_label

Meta

rustc --version --verbose:

rustc 1.88.0-nightly (cb31a009e 2025-04-27)
rustc 1.86.0 (05f9846f8 2025-03-31)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlA-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-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