-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Split DWARF inlining should be disabled by default #106592
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
Comments
This is probably from the standard library. Using |
That has no effect. |
The cause of this issue is an LLVM (mis?)feature called "split dwarf inlining"[0] which is apparently for when you didn't really mean that you want separate debug info and adds back in enough debug info to do stack traces. Disabling that (and using clang correctly disables this by default[1] and rustc should do the same. [0] rust/compiler/rustc_session/src/options.rs Line 1573 in bf7ea0d
[1] https://lists.llvm.org/pipermail/llvm-dev/2019-December/137464.html |
|
…_by_default, r=davidtwco Disable "split dwarf inlining" by default. This matches clang's behavior and makes split-debuginfo behave as expected (i.e. actually split the debug info). Fixes rust-lang#106592
…_by_default, r=davidtwco Disable "split dwarf inlining" by default. This matches clang's behavior and makes split-debuginfo behave as expected (i.e. actually split the debug info). Fixes rust-lang#106592
Step 1 of that is merging rust-lang/cargo#11572 which makes split DWARF work with gdb. After that I'll look at what we need to add to gimli/backtrace. |
I'm trying out
-Csplit-debuginfo=packed
on a large proprietary Rust project. I see that much of the debug info gets moved to the DWP file, but a lot gets left behind in the main executable.e.g.
vs
When using split DWARF with clang the binary's .debug_info section contains compile units with a single DW_TAG_compile_unit/DW_TAG_skeleton_unit (depending on DWARF 4 vs DWARF 5) and nothing else. When using split DWARF with rustc (1.66.0) though, a lot of stuff is left behind in the binary. The size of the .debug_info section in the binary is still roughly 1/3rd the size of the .debug_info section in the .dwp.
One sample of what's left behind:
In general it all seems to be related to inline functions somehow. I assume the contents of debug_str/etc are supporting data for these DIEs.
The text was updated successfully, but these errors were encountered: