-
Notifications
You must be signed in to change notification settings - Fork 13k
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
GDB should break on panic #21102
Comments
You can set a breakpoint on |
The second issue is #20978. |
Could we put an |
The default SIGTRAP handler aborts the process. |
You could, at panic time, set |
That would be great, given that Rust's backtrace is less complete than lldb's: #24346 |
Triage: no change. |
I think that
like this:
|
You actually don't want to hard-code an Rather, now that GDB actually has real Rust support, you should add an empty, never-inlined function with a well-known name to |
Any thoughts on how to proceed on this? I can set a gdb script to auto run on start, but this is harder for people on my team who use IDEs. I can go submit patches to break on rust_panic by default to both gdb and lldb, or try to add support for doing this by default in each of the IDEs. The int 3 approach could work too - stepping over it isn't very important. Is rust_panic a sufficiently unique name? |
Unsubscribing, because I solved this by making zig (which calls SIGABRT on panic). I'm guessing people still want the issue open so I will leave it that way :) |
It seems the method to set a breakpoint on is now called EDIT: Nvm, it still seems to be EDIT EDIT: Nvm again? It only seems to break if I set a breakpoint on both |
Not much obvious. Why not just int3 when under debugging?
… On 10 Sep 2018, at 19:59, Tobias Bucher ***@***.***> wrote:
It seems the method to set a breakpoint on is now called rust_begin_unwind.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
IMO the proper solution is to simply add |
Would love to see this issue handled somehow. Just ran into it. |
That is how we do it in Zig: |
I wonder if |
just use |
Reminder: if gdb says it does not exist, you're probably using a stripped build |
Is there something wrong with @andrewrk's suggestion that |
I agree with you, it should be default behaviour. I wonder if there is a reason for not using. I read somewhere Windows uses "fastfail" to panic, so it could be something to do with performance. |
…errors Fix test filename for rust-lang#105700 The test is for rust-lang#105700 rather than rust-lang#21102
Expected behavior:
bt
to analyze the stack.Actual behavior:
main.rs
The text was updated successfully, but these errors were encountered: