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

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 14:52:58 PDT 2017


probinson added inline comments.


================
Comment at: lib/DebugInfo/DWARF/DWARFContext.cpp:243
+  bool ExplicitDWO =
+      Explicit && sys::path::extension(DObj->getFileName()) == ".dwo";
+  auto shouldDumpDWO = [&](unsigned DIDT_Section, StringRef Section) {
----------------
aprantl wrote:
> probinson wrote:
> > Hmmm now you are attaching a semantic significance to what is just a naming convention.  I don't think that's appropriate.
> > We should not worry about what "kind" of file it is, just whether the sections exist or not.
> Please note that this affects only whether we print *section headers for empty sections*.
> The idea behind this condition is that we want to hide empty .dwo section headers when dumping a non-.dwo file. (With the one wrinkle that the intermediate products of clang that contain both .dwo and non-dwo sections are counted as non-dwo).
Ok, I get that it's just a heuristic for deciding when to suppress headers for empty sections.
If you make it match .dwp as well as .dwo file extensions, I can live with that.


https://reviews.llvm.org/D37771





More information about the llvm-commits mailing list