Skip to content

Function prelude associates with caller's source position #8442

Closed
@jdm

Description

@jdm

With a simple setup like

pub fn f() {
  io::println("foo");
}

pub fn main() {
  f();
}

breaking in main and stepping into f yields odd behaviour in gdb. Specifically, the first step into f shows pub fn main() {, the second shows f();, and the third takes us to the proper io::println("foo");. Disassembling at each step shows the first step takes us inside f into its prelude, so obviously we're not updating the source position correctly when generating the function.

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