-
Notifications
You must be signed in to change notification settings - Fork 844
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
Problem of debugging rust applications #2080
Comments
Hi, thanks for reporting this. I believe we do Also this is a weird error, how da hell is this int bigger than 8 bytes? :)
Need to investigate it :) |
Haven't debugged it yet, need to run on GDB 14.x... perhaps our release package has this, heh. |
i've just run into this also 🙃 Descriptioncrash when b on hello_cargo::main then r Steps to reproduce$ cargo new hello_cargo
Gdb session history:
My setup
pwndbg> version
Breakpoint 1, hello_cargo::main () at src/main.rs:2
|
this is what is being attempted |
i think #2094 fixes things but i'm not really sure about the root cause - for some reason we try to query the symbol associated with some whacky addresses like 0xffffffffffffff70 when debugging rust bins and that breaks the regs in the context @disconnect3d thoughts? |
This is indirectly caused by bminor/binutils-gdb@d760ae2 I believe. When in rust mode, I don't know how/whether we want to workaround this. |
@intrigus-lgtm thanks a lot for investigating this! Maybe we can detect those addresses in bugged GDB versions and add |
If gdb exposes whether we are in rust mode, then this should be possible by just always adding i64. No need to detect whether we have a problematic address. |
* when gdb.execute throws an error in symbol.get return "" fixes: #2080 * Update pwndbg/gdblib/symbol.py --------- Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
Hello!
I have problem of debugging rust applications.
The problem with rust was noticed after the build and upgrade of GDB to 14.2.0 version.
The stack trace:
pwndbg> b 2
Breakpoint 1 at 0x8934: file src/main.rs, line 2.
pwndbg> r
Starting program: /target/debug/asm
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Breakpoint 1, asm::main () at src/main.rs:2
19 println!("Hello, world!");
If that is an issue, you can report it on https://github.com/pwndbg/pwndbg/issues
(Please don't forget to search if it hasn't been reported before)
To generate the report and open a browser, you may run
bugreport --run-browser
PS: Pull requests are welcome
Steps to reproduce
Gdb session history:
My setup
Such problems do not exist with C.
Maybe no support for rust, but before everything was fine.
The text was updated successfully, but these errors were encountered: