-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Can't set breakpoints on rust_panic. #49013
Comments
Actually, rust_panic is still "mangled" in rustc stable 1.26.0. |
Would be great to get this fixed! |
Odd, we have it marked as Lines 519 to 522 in 0b0d2ed
|
This might be a side effect of ThinLTO which does some mangling of symbols. Maybe a |
Yes |
…c, r=dtolnay std: Don't let `rust_panic` get inlined It's meant for breakpoints, so if it gets inlined we can't set a breakpoint on it easily! Will hopefully help fix at least one aspect of rust-lang#49013
|
FWIW, I disagree with |
It also would be nice to make |
There is also a probe point in the libgcc unwinder that is used to implement the "next over throw" feature. The idea is that if you Related is #21102. I tend to think the Rust gdb scripts should set a breakpoint on an aborting panic, by default, but not on an unwinding panic. I haven't looked into how to accomplish this. |
This seems to be fixed. Using stable (1.43.1) I see
|
I can also see the symbol now. |
When debugging a rust program, it is very useful to be able to set breakpoints on
rust_panic
, however this stopped working at some point. gdb cannot find a rust_panic symbol to break on.Using
nm
I can see that there is a symbolrust_panic.llvm.5A8AA348
in the debug binary I am currently looking at, with the 5A8AA348 part varying from computer to computer (I suppose it's related to the llvm or compiler version).Setting a breakpoint on
rust_panic.llvm.5A8AA348
works, but it's quite awful to have to look for symbols every time a panic needs to be investigated.Tested with:
Looks like it got fixed at some point before rustc 1.26.0-nightly (2789b06 2018-03-06), butit is currently broken on stable.The text was updated successfully, but these errors were encountered: