Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

add location info to the backtrace #63

Merged
merged 7 commits into from
Sep 17, 2020
Merged

add location info to the backtrace #63

merged 7 commits into from
Sep 17, 2020

Conversation

japaric
Copy link
Member

@japaric japaric commented Sep 16, 2020

closes #17

backtrace

this is works towards #17
for now it extends the backtrace with inlined functions (which were not shown
before)
it doesn't add line info just yet though there is some, no super-precise line
info available
@japaric japaric changed the title start using DWARF info in the unwinder add location info to the backtrace Sep 17, 2020
@japaric japaric marked this pull request as ready for review September 17, 2020 12:16
let subroutine = frames
.last()
.expect("BUG: `addr2line::FrameIter` was empty");
let has_valid_debuginfo = if let Some(function) = subroutine.function.as_ref() {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

without this workaround addr2line was reporting __udivmodsi4 as the first frame of the backtrace.

Copy link
Contributor

@jonas-schievink jonas-schievink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

src/main.rs Outdated Show resolved Hide resolved
src/main.rs Show resolved Hide resolved
src/main.rs Show resolved Hide resolved
@jonas-schievink jonas-schievink merged commit 79460fa into main Sep 17, 2020
@jonas-schievink jonas-schievink deleted the unwind-dwarf branch September 17, 2020 13:17
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decorate backtrace with location information (file+line)
2 participants