Page MenuHomePhabricator

[DebugInfo] Fix printing values of forms which depend on the DWARF format.
ClosedPublic

Authored by ikudrin on Wed, Apr 29, 7:59 AM.

Details

Summary

The values are 8 bytes long in DWARF64, so they should not be cut to uint32_t on dumping.

Diff Detail

Event Timeline

ikudrin created this revision.Wed, Apr 29, 7:59 AM

If the value to be printed is only 10 digits wide, I think we do not get 6 leading zeros? Is that how we are formatting 64-bit values in general?

If the value to be printed is only 10 digits wide, I think we do not get 6 leading zeros? Is that how we are formatting 64-bit values in general?

Yes, that is how we print such values in most cases. I am going to prepare a separate patch to print DWARF64 values with extended width, based on the suggestion by @dblaikie in D78208.

This revision is now accepted and ready to land.Thu, Apr 30, 7:42 AM
jhenderson added inline comments.Fri, May 1, 1:53 AM
llvm/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp
375–380

It might be worth adding a test case where not all 16 digits are produced, to show that we don't print leading zeroes.

Also, is it worth DWARF32 test cases? Not sure, and maybe not.

ikudrin updated this revision to Diff 262658.Thu, May 7, 8:15 AM
ikudrin marked an inline comment as done.
  • Shortened values in the test.
  • Added DWARF32 test cases for the same forms. They might be useful later to show the difference in dumping DWARF32/64 variants.
This revision was automatically updated to reflect the committed changes.

Reverted a git revision as a follow-up of this in https://github.com/llvm/llvm-project/commit/c5e0967e4cf0f1337bec772949e6cede4c01354b because of:

Newly added test fails:
FAIL: LLVM::DW_OP_call_ref_unexpected.s

http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/28298