-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Include column info in debuginfo #42921
Copy link
Copy link
Closed
Labels
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I think that we should include column info in debuginfo, so that backtraces become more informative.
Often you do multiple function calls on a line, like
ctr = ctr.inc().inc();orlet foo = wrap((), wrap((),())).If one of these function calls generates a panic or something else that causes a backtrace, you can't know immediately which of the function calls actually caused the issue.
Apparently, right now we are setting the column number to zero: ae66285
The reason seems to be that GCC/Clang don't emit column numbers either and apparently GDB had issues with it. See #9641 and #10966. However, the change was from 2013, and maybe GDB support has changed since. Also, maybe if we ask kindly, GDB could consider adding support. AFAIK we already ship our copy of GDB so we might not even have to wait for a release to enable this per default.
Note that this is separate from panic locations, which doesn't use the LLVM debug info system but uses our own system instead. I'm preparing a PR to add line number info for panic's (without the RUST_BACKTRACE input) and want to file it soon. EDIT: #42938
cc @eddyb @michaelwoerister