Skip to content

Can't set breakpoints on rust_panic. #49013

Closed
@nical

Description

@nical

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions