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 symbol rust_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:
- rustc 1.23.0-nightly (827cb0d 2017-11-26)
- rustc 1.24.1 (d3ae9a9 2018-02-27)
Looks like it got fixed at some point before rustc 1.26.0-nightly (2789b06 2018-03-06), but it is currently broken on stable.
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
nmI can see that there is a symbolrust_panic.llvm.5A8AA348in 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.5A8AA348works, 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.