[PATCH] D78500: [DWARF5]:Added support for .debug_macro.dwo section in llvm-dwarfdump

Sourabh Singh Tomar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 19 04:17:39 PDT 2020


SouraVX added inline comments.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFContext.cpp:269
+                                                    : dwo_compile_units(),
                                                 getStringExtractor(), Data)
                             : Macro->parseMacinfo(Data)) {
----------------
ikudrin wrote:
> Passing an extractor for a `.debug_str` section when we parse a `.debug_macro.dwo` does not seem correct. Please, fix and add a test with `DW_MACRO_*_strp` entries in a `.debug_macro.dwo` section.
> Passing an extractor for a .debug_str section when we parse a .debug_macro.dwo does not seem correct.
Yes, StringExtractor is not getting used anywhere except for parsing DW_MACRO_*_strp` form. but the current interface(`parseMacro`) does not distinguish whether we're parsing `.debug_macro` or `.debug_macro.dwo` (except the units part(that is being distiguished)).
Do you think, it's a good idea to make this parameter optional ? Since it's only going to be used in parsing `.debug_macro` section.

> Please, fix and add a test with DW_MACRO_*_strp entries in a .debug_macro.dwo section.
These forms are not allowed in a `DWO` object since these forms involves a direct relocation to the `debug_str` section. And in `LLVM` a relocation cannot be present in a `DWO` object.


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

https://reviews.llvm.org/D78500





More information about the llvm-commits mailing list