<div dir="ltr">Nothing other than the file name. It's just another object file otherwise (I mean it doesn't have .text, etc)</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 13, 2017 at 2:11 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:08 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:</div><br class="m_574835553278709121Apple-interchange-newline"><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><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" target="_blank">aprantl@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);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_574835553278709121m_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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);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></div></div></div></blockquote><div><br></div></div></div><div style="word-wrap:break-word"><div><div>(How) can I detect that we are dealing with a .dwo file other than looking at the filename?</div></div></div><div style="word-wrap:break-word"><div><div>-- adrian</div></div></div><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);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> <span class="m_574835553278709121Apple-converted-space"> </span>include/llvm/BinaryFormat/Dwarf.def<br> <span class="m_574835553278709121Apple-converted-space"> </span>include/llvm/DebugInfo/DIContext.h<br> <span class="m_574835553278709121Apple-converted-space"> </span>include/llvm/DebugInfo/DWARF/DWARFContext.h<br> <span class="m_574835553278709121Apple-converted-space"> </span>include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h<br> <span class="m_574835553278709121Apple-converted-space"> </span>include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h<br> <span class="m_574835553278709121Apple-converted-space"> </span>include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h<br> <span class="m_574835553278709121Apple-converted-space"> </span>include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h<br> <span class="m_574835553278709121Apple-converted-space"> </span>include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h<br> <span class="m_574835553278709121Apple-converted-space"> </span>lib/DebugInfo/DWARF/DWARFContext.cpp<br> <span class="m_574835553278709121Apple-converted-space"> </span>test/DebugInfo/Inputs/gmlt.ll<br> <span class="m_574835553278709121Apple-converted-space"> </span>test/DebugInfo/X86/fission-inline.ll<br> <span class="m_574835553278709121Apple-converted-space"> </span>test/DebugInfo/X86/fission-no-inlining.ll<br> <span class="m_574835553278709121Apple-converted-space"> </span>test/DebugInfo/X86/fission-ranges.ll<br> <span class="m_574835553278709121Apple-converted-space"> </span>test/DebugInfo/X86/generate-odr-hash.ll<br> <span class="m_574835553278709121Apple-converted-space"> </span>test/DebugInfo/X86/gnu-public-names-gmlt.ll<br> <span class="m_574835553278709121Apple-converted-space"> </span>test/DebugInfo/X86/live-debug-variables.ll<br> <span class="m_574835553278709121Apple-converted-space"> </span>test/DebugInfo/X86/split-dwarf-cross-unit-reference.ll<br> <span class="m_574835553278709121Apple-converted-space"> </span>test/DebugInfo/X86/split-dwarf-multiple-cu-hash.ll<br> <span class="m_574835553278709121Apple-converted-space"> </span>test/DebugInfo/X86/split-dwarf-omit-empty.ll<br> <span class="m_574835553278709121Apple-converted-space"> </span>test/DebugInfo/dwarfdump-dump-flags.test<br> <span class="m_574835553278709121Apple-converted-space"> </span>test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s<br> <span class="m_574835553278709121Apple-converted-space"> </span>test/MC/ARM/dwarf-asm-no-code.s<br> <span class="m_574835553278709121Apple-converted-space"> </span>test/MC/ARM/dwarf-asm-nonstandard-section.s<br> <span class="m_574835553278709121Apple-converted-space"> </span>test/MC/ARM/dwarf-asm-single-section.s<br> <span class="m_574835553278709121Apple-converted-space"> </span>test/tools/dsymutil/X86/basic-linking-x86.test<br> <span class="m_574835553278709121Apple-converted-space"> </span>test/tools/llvm-dwp/X86/empty.test<br> <span class="m_574835553278709121Apple-converted-space"> </span>test/tools/llvm-dwp/X86/simple.test<br> <span class="m_574835553278709121Apple-converted-space"> </span>tools/llvm-dwarfdump/llvm-dwarfdump.cpp</blockquote></div></div></div></blockquote></div></div></blockquote></div></div></div></blockquote></div></div></blockquote></div>