Skip to content
New issue

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

LLDB cannot show backtrace at rust_begin_unwind #8543

Closed
lilyball opened this issue Aug 15, 2013 · 2 comments
Closed

LLDB cannot show backtrace at rust_begin_unwind #8543

lilyball opened this issue Aug 15, 2013 · 2 comments
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)

Comments

@lilyball
Copy link
Contributor

When using LLDB to debug rust, breaking on rust_begin_unwind only provides the following backtrace:

* thread #2: tid = 0xef8f7, 0x00000001027a2efe librustrt.dylib`rust_begin_unwind(token=839147) + 14 at rust_builtin.cpp:563, stop reason = breakpoint 1.1
    frame #0: 0x00000001027a2efe librustrt.dylib`rust_begin_unwind(token=839147) + 14 at rust_builtin.cpp:563
    frame #1: 0x0000000100093678 libstd-6c65cf4b443341b1-0.8-pre.dylib`rt::task::__extensions__::meth_25045::begin_unwind::_7c12263797ed078::_0$x2e8$x2dpre + 72

GDB is able to show the full stack.

I believe LLDB uses a different method of generating a backtrace than GDB, one that is considered much safer, but is also more sensitive. However I don't know the details.

Unfortunately, this is going to become a big issue for anyone using Rust on OS X, as the upcoming version of the developer tools (Xcode 5) is dropping GDB (and GCC) entirely.

@lilyball
Copy link
Contributor Author

GDB says frame #2 looks like

#2  0xb6a825ef in upcall_call_shim_on_c_stack (args=0xb42fddf8, fn_ptr=0xb7c5ab50) at src/rt/rust_upcall.cpp:42

It's possible that the issue is purely with this function, rather than being a more general issue with debug info.

@alexcrichton
Copy link
Member

Closing, I believe that the experience with rust_fail is greatly improved. I also haven't recently run into this at all (and I've been using lldb heavily)

Feel free to reopen if it's still here!

flip1995 pushed a commit to flip1995/rust that referenced this issue Mar 24, 2022
`unnecessary_lazy_eval` show suggestions on multiline lint

Closes rust-lang#8393

changelog: [`unnecessary_lazy_eval`] now shows suggestions for long-line lints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)
Projects
None yet
Development

No branches or pull requests

2 participants