We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile this code with -Copt-level=0:
-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:
print a
error: use of undeclared identifier 'a' error: 1 error parsing expression
Interestingly, the frame variable command shows the expected value: (int) a = 1.
frame variable
(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
The text was updated successfully, but these errors were encountered:
Note: this is very likely an LLDB bug, because an equivalent C++ code exhibits the same behavior.
__attribute__((noinline)) void zzz() {} __attribute__((always_inline)) void inlined_fn() { { int a = 1; zzz(); // #break } } int main() { inlined_fn(); return 0; }
The extra lexical scope in inlined_fn is important - without it, evaluation produces the correct result: (int) $0 = 1
inlined_fn
(int) $0 = 1
GDB works correctly.
Sorry, something went wrong.
That makes me sad :(
:(
So if this is an LLDB bug, then it seems like there's no use in us tracking it. As such, I'm going to close.
No branches or pull requests
Compile this code with
-Copt-level=0
:In LLDB, set a breakpoint on line 8, then run the program.
After breaking, type
print a
'. Result: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
The text was updated successfully, but these errors were encountered: