Skip to content

Inlining breaks LLDB expression evaluator #35487

Closed
@vadimcn

Description

@vadimcn

Compile this code with -Copt-level=0:

#[inline(never)]
fn zzz() {}

#[inline(always)]
fn inlined_fn() {
    let a = 1;
    zzz(); // #break
}

fn main() {
    inlined_fn();
}

In LLDB, set a breakpoint on line 8, then run the program.
After breaking, type print a'. Result:

error: use of undeclared identifier 'a'
error: 1 error parsing expression

Interestingly, the frame variable command shows the expected value: (int) a = 1.

Meta:
LLDB version: lldb-360.1.25 (OSX XCode 8)
Rustc version: rustc 1.10.0 (cfcb716 2016-07-03) x86_64-apple-darwin

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