Skip to content

by-value self arguments are not described properly in debug info #10549

Closed
@michaelwoerister

Description

@michaelwoerister

See comment at: https://github.com/mozilla/rust/blob/3d1f3f4de087ccf7e30b795fbd73e054b4761c4f/src/librustc/middle/trans/debuginfo.rs#L423

The llvm.dbg.declare intrinsic used to describe local variables and arguments always expects an alloca as argument. For by-value self arguments, this is not always the case. See trans::base::copy_args_to_allocas(): https://github.com/mozilla/rust/blob/c0b7972f7d63e4b55098797cb48949b00d3ffee7/src/librustc/middle/trans/base.rs#L1785

For other kinds of arguments, the value is always copied out into local allocas when debug info is enabled. Something like this has should be done for by-value self arguments too.

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