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

Parse DW_OP_GNU_parameter_ref, add plumbing for evaluating it. #208

Merged
merged 1 commit into from Jun 24, 2017

Conversation

khuey
Copy link
Contributor

@khuey khuey commented Jun 16, 2017

DW_OP_GNU_parameter_ref is a DWARF extension that allows finding the value of parameters or variables that were optimized out of a function but may vary at the caller. See https://gcc.gnu.org/ml/gcc-patches/2011-06/msg00649.html for an example. There, the optimizer will remove both y and z from the generated assembly. Because z is constant, the debug info can note it has a value of 3. But y varies, so a DW_OP_GNU_parameter_ref is emitted. The Gimli consumer is responsible for determining the caller, finding the right DW_TAG_GNU_call_site, and looking up the DW_TAG_GNU_call_parameter's value to continue with the evaluation.

The parsing semantics of the operand are the same as DW_OP_call4s.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.06%) to 92.977% when pulling 73daf34 on khuey:downstream into f63bac1 on gimli-rs:master.

@fitzgen
Copy link
Member

fitzgen commented Jun 20, 2017

r? @tromey

@philipc
Copy link
Collaborator

philipc commented Jun 23, 2017

Note that this PR needs updating due to changed parse_u32 and Operation::parse signatures, but otherwise LGTM.

@khuey
Copy link
Contributor Author

khuey commented Jun 23, 2017

Rebased.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 93.211% when pulling 48ada86 on khuey:downstream into cf3491a on gimli-rs:master.

@philipc philipc merged commit 350cd3d into gimli-rs:master Jun 24, 2017
@philipc
Copy link
Collaborator

philipc commented Jun 24, 2017

Thanks!

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

4 participants