-
Notifications
You must be signed in to change notification settings - Fork 516
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
Explain how to use gdb to debug the compiler #443
Comments
microsoft/mimalloc#77 (comment) had a similar issue, where the following command fails:
and while one could use That is, |
So the proper way is to pass the If you pass it |
that particular usage may currently be "broken" (see rust-lang/rust#47645), but maybe we could also fix that by passing some flag to |
My notes, steps and config example of how to debug It also shows how to invoke it through I did not use this to debug Thanks to @jyn514, @the8472 and @saethlin on t-compiler/help > debugging library/core in VS Code?.
You may also want to cross-reference to https://std-dev-guide.rust-lang.org/development/building-and-debugging.html#println-debugging-alloc-and-core. UPDATE: Alternatives (for C++, but unconfirmed for Rust):1.
|
Thank you to @botahamec and @repnop. |
Updated the above notes with potential alternative extensions for GDB in VS Code. Hope this helps you with navigating this space. |
There was a discussion in Zulip about how to attach
gdb
tox.py
.@petrochenkov suggested running
gdb --args ./build/x86_64-pc-windows-gnu/stage1/bin/rustc src/test/ui/name.rs
, I think it would be great to have this explained on rustc-guide because it's a recurring question.The text was updated successfully, but these errors were encountered: