Skip to content

Code location information generated in trans::debuginfo is mostly incorrect #7715

Closed
@michaelwoerister

Description

@michaelwoerister

Especially the file and line information generated for types is rather arbitrary as the span value is just passed to create_type_metadata() from the caller. So the type gets assigned the span of the local variable or argument that happens to be the first to be translated.

This should be easy fix by reading span information from the type definitions in the AST where it makes sense and to omit the span information otherwise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions