<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 13, 2017 at 2:06 PM Adrian Prantl <<a href="mailto:aprantl@apple.com">aprantl@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div>On Sep 13, 2017, at 2:01 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:</div><br class="m_6827712019517699053Apple-interchange-newline"><div><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 13, 2017 at 1:58 PM Adrian Prantl via Phabricator <<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">aprantl updated this revision to Diff 115111.<br>
aprantl added a comment.<br>
Herald added a subscriber: javed.absar.<br>
<br>
With this update:<br>
<br>
1. llvm-dwarfdump --all prints only section headers (like `.debug_info contents:`) of non-empty sections.<br>
<br>
2a. llvm-dwarfdump --<debug-info, ...> always prints a section header<br>
2b. On platforms that support DWOs, llvm-dwarfdump --<debug-info ..> also always prints a section header for the corresponding .dwo section.<br></blockquote><div><br>For this one^ (& maybe this'd merge with 2a so it wouldn't need a "supported platforms" check) the thing would be to print the non-dwo header if both sections are empty, otherwise print the headers only for the non-empty ones. I mean I guess that'd be a bit weird if you ask for debug_types on a .dwo file and that file happens to not have type units enabled & it prints the non-dwo name)<br></div></div></div></div></blockquote><div><br></div></div></div><div style="word-wrap:break-word"><div><div>I'm having trouble parsing this. What would you like the behavior for `llvm-dwarfdump --debug-types file.dwo` to be if (1) file.dwo has no .debug_types.dwo section and no .debug_types section, (2) if it has only the .debug_types.dwo section?</div></div></div></blockquote><div><br>My suggestion was:<br><br>1) debug_types<br>2) debug_types.dwo<br><br>but I was acknowledging that (1) could be confusing to users. I mean could detect that it's a .dwo file and so expect debug_types.dwo, but that's probably a pain from a layering perspective.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><br></div><div>-- adrian</div></div></div><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div><div dir="ltr"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<a href="https://reviews.llvm.org/D37771" rel="noreferrer" target="_blank">https://reviews.llvm.org/D37771</a><br>
<br>
Files:<br>
  include/llvm/BinaryFormat/Dwarf.def<br>
  include/llvm/DebugInfo/DIContext.h<br>
  include/llvm/DebugInfo/DWARF/DWARFContext.h<br>
  include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h<br>
  include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h<br>
  include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h<br>
  include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h<br>
  include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h<br>
  lib/DebugInfo/DWARF/DWARFContext.cpp<br>
  test/DebugInfo/Inputs/gmlt.ll<br>
  test/DebugInfo/X86/fission-inline.ll<br>
  test/DebugInfo/X86/fission-no-inlining.ll<br>
  test/DebugInfo/X86/fission-ranges.ll<br>
  test/DebugInfo/X86/generate-odr-hash.ll<br>
  test/DebugInfo/X86/gnu-public-names-gmlt.ll<br>
  test/DebugInfo/X86/live-debug-variables.ll<br>
  test/DebugInfo/X86/split-dwarf-cross-unit-reference.ll<br>
  test/DebugInfo/X86/split-dwarf-multiple-cu-hash.ll<br>
  test/DebugInfo/X86/split-dwarf-omit-empty.ll<br>
  test/DebugInfo/dwarfdump-dump-flags.test<br>
  test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s<br>
  test/MC/ARM/dwarf-asm-no-code.s<br>
  test/MC/ARM/dwarf-asm-nonstandard-section.s<br>
  test/MC/ARM/dwarf-asm-single-section.s<br>
  test/tools/dsymutil/X86/basic-linking-x86.test<br>
  test/tools/llvm-dwp/X86/empty.test<br>
  test/tools/llvm-dwp/X86/simple.test<br>
  tools/llvm-dwarfdump/llvm-dwarfdump.cpp<br>
<br>
</blockquote></div></div>
</div></blockquote></div></div></blockquote></div></div>