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 .debug_loc/.debug_loclists sections writing #425

Merged
merged 5 commits into from
May 3, 2019

Conversation

yurydelendik
Copy link
Contributor

Mostly based on src/write/range.rs.

In support of #390

Mostly based on src/write/range.rs.
};
// In some cases, existing data may contain begin==end, filtering
// these out.
match loc {
Copy link
Contributor Author

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.

Copy link
Collaborator

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.

@yurydelendik yurydelendik changed the title Add .debug_loc/,debug_loclists sections writing Add .debug_loc/.debug_loclists sections writing May 1, 2019
@coveralls
Copy link

coveralls commented May 1, 2019

Coverage Status

Coverage decreased (-0.2%) to 86.383% when pulling 00f10a3 on yurydelendik:debug_loc into d0c6edd on gimli-rs:master.

Copy link
Collaborator

@philipc philipc left a 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 {
Copy link
Collaborator

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.

src/write/loc.rs Show resolved Hide resolved
src/write/section.rs Show resolved Hide resolved
src/write/unit.rs Outdated Show resolved Hide resolved
@philipc philipc merged commit 423431f into gimli-rs:master May 3, 2019
@philipc
Copy link
Collaborator

philipc commented May 3, 2019

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?

@yurydelendik
Copy link
Contributor Author

yurydelendik commented May 3, 2019

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.

@yurydelendik yurydelendik deleted the debug_loc branch May 3, 2019 21:51
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.

None yet

3 participants