Skip to content
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

add line to address functionality #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

FlyingCanoe
Copy link

No description provided.

Since headcrabe does depend on std, it is not worth it to keep the fork of addr2line with the no_std attribute.
This commit change the file and line number to make them non optional.

This will prevent certain invalid location from existing, since, for debugger, knowing that a instruction is related to a file
 but not knowing were is not meaningful.

This commit also change the line and column number from u32 to NonZeroU32.

In dwarf line and column number start at 1.
if the line or column number were 0 it would mean that they are not specifies.

Sadly, those change break the testing apparatus of addr2line. As they verify if the create produce the same result as gnu addr2line.
 Which include incomplete location (i.e instruction with know file, but unknown line and column number).

I left fixing this problem as a todo
This method will be necessary for the line to address API that I have in mind.
This commit add a API  to the fork of addr2line, which allow you to retrieve the addresses associate with a source location.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant