-
Notifications
You must be signed in to change notification settings - Fork 110
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 .debug_loc/.debug_loclists sections writing #425
Conversation
Mostly based on src/write/range.rs.
}; | ||
// In some cases, existing data may contain begin==end, filtering | ||
// these out. | ||
match loc { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The range.rs has no such logic. The fixtures/self/debug_loc contains entries with such invalid data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, maybe we should add this to range.rs too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this! Just some minor things to fix.
}; | ||
// In some cases, existing data may contain begin==end, filtering | ||
// these out. | ||
match loc { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, maybe we should add this to range.rs too.
Related to this, we also need a better way of handling expressions. Do you have any ideas on what the API for creating expressions should look like? |
@philipc DWARF expressions will likely require different abstractions for reading/writing. It is a stack machine language, so there not much can be done in terms of IR for writing (e.g. non-AST based, perhaps Vec of ops?). As it is now, the read API looks acceptable to some degree from my point of view. |
Mostly based on src/write/range.rs.
In support of #390