-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
incorrect DW_AT_location for static #32574
Labels
A-debuginfo
Area: Debugging information in compiled programs (DWARF, PDB, etc.)
C-bug
Category: This is a bug.
P-low
Low priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
sanxiyn
added
the
A-debuginfo
Area: Debugging information in compiled programs (DWARF, PDB, etc.)
label
Mar 29, 2016
Interesting. We are probably setting the static's linkage to private but don't take care of removing debuginfo for it and LLVM doesn't either. |
#33172 has good reproduction instructions. |
Visited in wg-debugging's triage meeting. This still repros in 2022 but since it's just a matter of including more info than necessary, we don't believe this is breaking any debuggers so marking as P-low. |
bors bot
added a commit
to probe-rs/probe-rs
that referenced
this issue
Sep 20, 2022
1232: Stack overflow when expanding "static" section in probe-rs-debugger r=Yatekii a=noppej There was an error in the logic that prevented cetain variable types from being loaded in a deferred/lazy way. This resulted in situations where recursively referenced types (as in a linked list) would loop forever trying to resolve all children of a structured variable. Fixes #1231 Additional fixes: - This also fixes a new issue (exposed by testing of this PR). Recent changes in RUST have removed the intermediate `DW_AT_name` attribute for the `DW_AT_type` of the `data_ptr` child of `&str` variables, resulting in a failure to resolve those variable values during debug. - A [RUST compiler issue](rust-lang/rust#32574) resulted in a reference to a variable being left behind in the debug info, even though the value has been optimized out. This PR updated the error message to be a bit more user friendly. Co-authored-by: JackN <[email protected]>
Noratrieb
added
the
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
label
Apr 5, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-debuginfo
Area: Debugging information in compiled programs (DWARF, PDB, etc.)
C-bug
Category: This is a bug.
P-low
Low priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I'm using rust from the Fedora COPR:
Consider this program:
I compile with
-g
and then examine the DWARF usingreadelf
. I see:Now, this variable is not actually emitted. There's no ELF symbol for it. Given this, it seems strange to emit
DW_AT_linkage_name
andDW_AT_location
, especially considering that the latter is incorrect.The text was updated successfully, but these errors were encountered: