Parse DW_OP_GNU_parameter_ref, add plumbing for evaluating it. #208
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 bothy
andz
from the generated assembly. Becausez
is constant, the debug info can note it has a value of 3. Buty
varies, so aDW_OP_GNU_parameter_ref
is emitted. The Gimli consumer is responsible for determining the caller, finding the rightDW_TAG_GNU_call_site
, and looking up theDW_TAG_GNU_call_parameter
's value to continue with the evaluation.The parsing semantics of the operand are the same as
DW_OP_call4
s.