This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Fix handling DW_OP_call_ref in DWARF64 units.
ClosedPublic

Authored by ikudrin on May 6 2020, 9:33 AM.

Details

Summary

DW_OP_call_ref is the only operation that has an operand which depends on the DWARF format. The patch fixes handling that operation in DWARF64 units.

Diff Detail

Event Timeline

ikudrin created this revision.May 6 2020, 9:33 AM
aprantl added inline comments.May 6 2020, 9:53 AM
llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
135

This comment is correct now, but without verification, this is bound to break eventually. Would it be possible to just pass the correct value here, or, alternatively, make the format optional and pass an llvm::None value here and then produce an error in DWARFExpression if no format was specified when one is needed?

ikudrin updated this revision to Diff 262616.May 7 2020, 5:03 AM
ikudrin marked an inline comment as done.
  • The DWARF format was made optional in DWARFExpression.
  • Added a test to check that DW_OP_call_ref is not supported in location lists. That checks the code path when the DWARF format for DWARFExpression is not specified.

@aprantl, how do you find this variant?

aprantl accepted this revision.May 7 2020, 9:55 AM

Looks good!

This revision is now accepted and ready to land.May 7 2020, 9:55 AM
This revision was automatically updated to reflect the committed changes.