-
Notifications
You must be signed in to change notification settings - Fork 13.4k
codegen-units ruins debug symbols #39160
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Does this also happen in GDB? |
@michaelwoerister Yep! |
|
I cannot reproduce this with GDB on Linux. Can you tell me more about your setup? OS, RUSTC version, GDB and LLDB versions, etc. |
|
Alright, I found out what the problem is: The OSX linker doesn't like it when there are A possible solution to this is assigning different |
How would that affect setting breakpoints on lines of named source files? |
|
In practice not at all, I guess. We would still be emitting the correct file names for source locations. |
Tagging with A-incr-comp since this affects incremental. |
I waste so much time doing builds of Servo on branches that have codegen-units enabled before realizing that I need to disable it so I can poke around in lldb. Could we please have someone spend some time on fixing this or rust-lang/cargo#3897? |
I'm inclined to just make a PR with the fix I mentioned above (=generate a unique filename for the codegen unit that does not correspond to an actual file). It's (kind of) incorrect with regards to DWARF but it should hurt neither function nor file/line breakpoints, I think, since debuggers and profilers already have to deal with functions coming from files that are not equal to the file the CGU specifies. Any serious concerns, @tromey? |
…debuginfo, r=jdm debuginfo: Generate unique DW_AT_names for compilation units to work around OSX linker bug This should fix issue rust-lang#39160 and does not seem to cause any problems. cc @tromey, @Manishearth r? @jdm
It's certainly much more usable out of the box now. Thanks! |
Update rustc. This brings in rust-lang/rust#39160 which significantly improves the default debugging experience on macOS. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17080) <!-- Reviewable:end -->
This brings in rust-lang/rust#39160 which significantly improves the default debugging experience on macOS. Source-Repo: https://github.com/servo/servo Source-Revision: ad4a5411a9620cee5cd93d5fe1a3dbad02cc0812
This brings in rust-lang/rust#39160 which significantly improves the default debugging experience on macOS. Source-Repo: https://github.com/servo/servo Source-Revision: ad4a5411a9620cee5cd93d5fe1a3dbad02cc0812 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 0c1abc4ad87968a2ebcd0a2f9d80612f0c58cc78
This brings in rust-lang/rust#39160 which significantly improves the default debugging experience on macOS. Source-Repo: https://github.com/servo/servo Source-Revision: ad4a5411a9620cee5cd93d5fe1a3dbad02cc0812
This brings in rust-lang/rust#39160 which significantly improves the default debugging experience on macOS. Source-Repo: https://github.com/servo/servo Source-Revision: ad4a5411a9620cee5cd93d5fe1a3dbad02cc0812
This brings in rust-lang/rust#39160 which significantly improves the default debugging experience on macOS. Source-Repo: https://github.com/servo/servo Source-Revision: ad4a5411a9620cee5cd93d5fe1a3dbad02cc0812
This brings in rust-lang/rust#39160 which significantly improves the default debugging experience on macOS. Source-Repo: https://github.com/servo/servo Source-Revision: ad4a5411a9620cee5cd93d5fe1a3dbad02cc0812 UltraBlame original commit: 2b4844f7a38ef8973b937690fc041ca63c496c2f
This brings in rust-lang/rust#39160 which significantly improves the default debugging experience on macOS. Source-Repo: https://github.com/servo/servo Source-Revision: ad4a5411a9620cee5cd93d5fe1a3dbad02cc0812 UltraBlame original commit: 2b4844f7a38ef8973b937690fc041ca63c496c2f
This brings in rust-lang/rust#39160 which significantly improves the default debugging experience on macOS. Source-Repo: https://github.com/servo/servo Source-Revision: ad4a5411a9620cee5cd93d5fe1a3dbad02cc0812 UltraBlame original commit: 2b4844f7a38ef8973b937690fc041ca63c496c2f
This brings in rust-lang/rust#39160 which significantly improves the default debugging experience on macOS. Source-Repo: https://github.com/servo/servo Source-Revision: ad4a5411a9620cee5cd93d5fe1a3dbad02cc0812
Uh oh!
There was an error while loading. Please reload this page.
With codegen-units=2, we get breakpoints in one module that work fine, and another that do not:
With codegen-units=1, all breakpoints work as expected:
The text was updated successfully, but these errors were encountered: