[PATCH] D37771: llvm-dwarfdump: automatically dump both regular and .dwo variant of sections

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 14:26:42 PDT 2017


dblaikie added inline comments.


================
Comment at: lib/DebugInfo/DWARF/DWARFContext.cpp:242-244
+  auto shouldDumpDWO = [&](unsigned DIDT_Section, StringRef Section) {
+    return (DumpType & DIDT_Section) && (ExplicitDWO || !Section.empty());
+  };
----------------
Ah, so one extra wrinkle is that dwo sections can appear in non-dwo files... 

For example when LLVM (& GCC) produce Fission output, they first output a single object file (with all the dwo and non-dwo, and text, etc) then use objcopy to extract the .dwo sections out into a separate file.

So not dumping DWO sections when present, even when not examining a .dwo file, is problematic. But they can silently not have headers (ie: if you ask to dump a types in a .o file, I don't think there's a need to print the types.dwo header if types.dwo is not present) - I think that's OK.

Does that make sense?


https://reviews.llvm.org/D37771





More information about the llvm-commits mailing list