Skip to content

CARGO_INCREMENTAL breaks debuginfo #3905

@sophiajt

Description

@sophiajt

In the same project, if I compile with CARGO_INCREMENTAL=1 and run the application through lldb, I get:

$ lldb target/debug/hello
(lldb) target create "target/debug/hello"
Current executable set to 'target/debug/hello' (x86_64).
(lldb) b main
Breakpoint 1: where = hello`main, address = 0x00000001000141d0

Same project without:

$ lldb target/debug/hello
(lldb) target create "target/debug/hello"
Current executable set to 'target/debug/hello' (x86_64).
(lldb) b main
Breakpoint 1: 2 locations.

The latter, I believe, is what we want as it's what you'd get by hand when using rustc. With incremental turned on, we can't easily step into the original source. Instead, we end up stepping through the assembly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions