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

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 05:19:58 PDT 2020


ikudrin added inline comments.


================
Comment at: llvm/include/llvm/MC/MCObjectFileInfo.h:116
   MCSection *DwarfMacinfoDWOSection = nullptr;
+  MCSection *DwarfMacroDWOSection = nullptr;
 
----------------
It looks like the changes in `MC` files should not be in this patch.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFContext.cpp:302
     if (IsMacro) {
-      StringExtractor = getStringExtractor();
-      // FIXME: Add support for debug_macro.dwo section.
-      Units = compile_units();
+      StringExtractor = SectionType != MacroDwoSection
+                            ? getStringExtractor()
----------------
I would prefer a positive condition rather than negative.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFContext.cpp:305
+                            : getStringDWOExtractor();
+      Units = SectionType != MacroDwoSection ? compile_units() : dwo_units();
     }
----------------
It should be `dwo_compile_units()` to correspond `compile_units()` in the other branch.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFContext.cpp:307-308
     }
-    if (Error Err = Macro->parse(Units, StringExtractor, Data, IsMacro)) {
+    if (Error Err = Macro->parse(Units,StringExtractor,
+                                 Data, IsMacro)) {
       RecoverableErrorHandler(std::move(Err));
----------------
Please, run `clang-format` on that.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp:89-92
+Error DWARFDebugMacro::parse(
+    Optional<DWARFUnitVector::iterator_range> Units,
+    Optional<DataExtractor> StringExtractor, DWARFDataExtractor Data,
+    bool IsMacro) {
----------------
Why the formatting was changed?


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

https://reviews.llvm.org/D78500





More information about the llvm-commits mailing list