<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 13, 2017, at 2:08 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><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; -webkit-text-stroke-width: 0px;" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Sep 13, 2017 at 2:06 PM Adrian Prantl <<a href="mailto:aprantl@apple.com" class="">aprantl@apple.com</a>> wrote:<br class=""></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;" class=""><div class=""><blockquote type="cite" class=""><div class="">On Sep 13, 2017, at 2:01 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank" class="">dblaikie@gmail.com</a>> wrote:</div><br class="m_6827712019517699053Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Sep 13, 2017 at 1:58 PM Adrian Prantl via Phabricator <<a href="mailto:reviews@reviews.llvm.org" target="_blank" class="">reviews@reviews.llvm.org</a>> wrote:<br class=""></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 class="">aprantl added a comment.<br class="">Herald added a subscriber: javed.absar.<br class=""><br class="">With this update:<br class=""><br class="">1. llvm-dwarfdump --all prints only section headers (like `.debug_info contents:`) of non-empty sections.<br class=""><br class="">2a. llvm-dwarfdump --<debug-info, ...> always prints a section header<br class="">2b. On platforms that support DWOs, llvm-dwarfdump --<debug-info ..> also always prints a section header for the corresponding .dwo section.<br class=""></blockquote><div class=""><br class="">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 class=""></div></div></div></div></blockquote><div class=""><br class=""></div></div></div><div style="word-wrap: break-word;" class=""><div class=""><div class="">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 class=""><br class="">My suggestion was:<br class=""><br class="">1) debug_types<br class="">2) debug_types.dwo<br class=""><br class="">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 class=""></div></div></div></div></blockquote><div><br class=""></div><div>(How) can I detect that we are dealing with a .dwo file other than looking at the filename?</div><div>-- adrian</div><br class=""><blockquote type="cite" class=""><div class=""><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; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_quote"><div class=""> </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;" class=""><div class=""><div class=""><br class=""></div><div class="">-- adrian</div></div></div><div style="word-wrap: break-word;" class=""><div class=""><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""> </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 class=""><br class=""><a href="https://reviews.llvm.org/D37771" rel="noreferrer" target="_blank" class="">https://reviews.llvm.org/D37771</a><br class=""><br class="">Files:<br class=""> <span class="Apple-converted-space"> </span>include/llvm/BinaryFormat/Dwarf.def<br class=""> <span class="Apple-converted-space"> </span>include/llvm/DebugInfo/DIContext.h<br class=""> <span class="Apple-converted-space"> </span>include/llvm/DebugInfo/DWARF/DWARFContext.h<br class=""> <span class="Apple-converted-space"> </span>include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h<br class=""> <span class="Apple-converted-space"> </span>include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h<br class=""> <span class="Apple-converted-space"> </span>include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h<br class=""> <span class="Apple-converted-space"> </span>include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h<br class=""> <span class="Apple-converted-space"> </span>include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h<br class=""> <span class="Apple-converted-space"> </span>lib/DebugInfo/DWARF/DWARFContext.cpp<br class=""> <span class="Apple-converted-space"> </span>test/DebugInfo/Inputs/gmlt.ll<br class=""> <span class="Apple-converted-space"> </span>test/DebugInfo/X86/fission-inline.ll<br class=""> <span class="Apple-converted-space"> </span>test/DebugInfo/X86/fission-no-inlining.ll<br class=""> <span class="Apple-converted-space"> </span>test/DebugInfo/X86/fission-ranges.ll<br class=""> <span class="Apple-converted-space"> </span>test/DebugInfo/X86/generate-odr-hash.ll<br class=""> <span class="Apple-converted-space"> </span>test/DebugInfo/X86/gnu-public-names-gmlt.ll<br class=""> <span class="Apple-converted-space"> </span>test/DebugInfo/X86/live-debug-variables.ll<br class=""> <span class="Apple-converted-space"> </span>test/DebugInfo/X86/split-dwarf-cross-unit-reference.ll<br class=""> <span class="Apple-converted-space"> </span>test/DebugInfo/X86/split-dwarf-multiple-cu-hash.ll<br class=""> <span class="Apple-converted-space"> </span>test/DebugInfo/X86/split-dwarf-omit-empty.ll<br class=""> <span class="Apple-converted-space"> </span>test/DebugInfo/dwarfdump-dump-flags.test<br class=""> <span class="Apple-converted-space"> </span>test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s<br class=""> <span class="Apple-converted-space"> </span>test/MC/ARM/dwarf-asm-no-code.s<br class=""> <span class="Apple-converted-space"> </span>test/MC/ARM/dwarf-asm-nonstandard-section.s<br class=""> <span class="Apple-converted-space"> </span>test/MC/ARM/dwarf-asm-single-section.s<br class=""> <span class="Apple-converted-space"> </span>test/tools/dsymutil/X86/basic-linking-x86.test<br class=""> <span class="Apple-converted-space"> </span>test/tools/llvm-dwp/X86/empty.test<br class=""> <span class="Apple-converted-space"> </span>test/tools/llvm-dwp/X86/simple.test<br class=""> <span class="Apple-converted-space"> </span>tools/llvm-dwarfdump/llvm-dwarfdump.cpp</blockquote></div></div></div></blockquote></div></div></blockquote></div></div></div></blockquote></div><br class=""></body></html>