[PATCH] D73086: [DWARF5] Added support for debug_macro section parsing and dumping in llvm-dwarfdump.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 09:54:52 PST 2020


aprantl added a comment.

In D73086#1869127 <https://reviews.llvm.org/D73086#1869127>, @SouraVX wrote:

> In D73086#1867934 <https://reviews.llvm.org/D73086#1867934>, @aprantl wrote:
>
> > Currently the testing is very self-referential. Should we add a test in assembler (.s) in test/tools/llvm-dwarfdump that hardcodes a properly formatted macro section to make sure we don't add symmetric mistakes (where we implement the same mistake in both the generator and llvm-dwarfdump)?
>
>
> Not sure what you meant here. The generation/emission patch emits/formats the contents of debug_macro correctly, for instance if you try to generate macro section using emission patch in clang. You can dump section contents of debug_macro section using objdump, It will dump contents entirely without any warnings/errors. As one more step for content verification, you use generated binary and can expand macros in LLDB. All these reaffirms that our emission implementation is correct!


If we only test the encoding output by LLVM with the decoding in LLVM, we could have a mistake in both that our testing doesn't catch. It would be good to add a hardcoded assembler, binary, or yaml2obj input (perhaps even one that was generated be another compiler, but manually written is just fine, too) to make sure we can parse a known-to-be-correct reference input.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73086/new/

https://reviews.llvm.org/D73086





More information about the llvm-commits mailing list