<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 8, 2017, at 2:32 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 Fri, Sep 8, 2017 at 2:25 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;">I would like to grow llvm-dwarfdump to become a drop-in replacement for the dwarfdump utility that is currently shipping on Darwin. (You can search the web for "darwin dwarfdump manpage" to see the currently supported feature set.)</blockquote><div class=""><br class="">For anyone looking: <a href="http://www.manpagez.com/man/1/dwarfdump/" class="">http://www.manpagez.com/man/1/dwarfdump/</a> <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;">Doing this means implementing the missing features, such as the ability to print only subsets of DIEs, looking up DIEs by name or address, and the option to produce more diff-friendly output. I'm fairly certain that these additional features will be beneficial on all LLVM-suported platforms.<br class="">To turn it into a drop-in replacement on Darwin, I will also need to re-orgnize the command line interface a bit. In particular (and this is pretty much the only difference)<br class=""><br class="">$ llvm-dwarfdump --debug-dump=info<br class="">$ llvm-dwarfdump --debug-dump=apple-objc<br class=""><br class="">becomes<br class=""><br class="">$ dwarfdump --debug-info<br class="">$ dwarfdump --apple-objc<br class=""><br class="">respectively.<br class="">My question is, how attached are users on other platforms to the current command line interface?</blockquote><div class=""><br class="">I'm not especially attached - though I imagine it's pretty cheap to support both (though I don't personally mind if you want to migrate from one to the other - will just take a bit to relearn the muscle memory).<br class=""></div></div></div></div></blockquote><div><br class=""></div><div>If we're looking for the path of least resistance, we could even support both variants as aliases at the same time, since they don't conflict.</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="">One other thing: If we're moving towards a point where llvm-dwarfdump is not just a tool for LLVM developers but a shipping product, might be worth being a bit more rigorous about testing for it (historically sometimes dwarfdump functionality hasn't been tested - committed along with the LLVM functionality it was implemented to test - or the only testing is with checked in object files, which are a bit hard to maintain). </div></div></div></div></blockquote><div><br class=""></div><div>Fully agreed, and indeed with all recent patches that went into llvm-dwarfdump we are already moving in that direction.</div><br class=""><blockquote type="cite" 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="">Either looking at the DWARF YAML support and maybe fleshing it out a bit/making it more usable, or maybe assembly based tests? Not sure.<br class=""></div></div></div></blockquote><br class=""><div>I'm trying to figure this out right now by looking at <a href="https://reviews.llvm.org/D36993" class="">https://reviews.llvm.org/D36993</a> ...</div><div><br class=""></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"><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;">I could easily create a separate command line parser for Darwin that mimicks Darwin dwarfdump (like llvm-objdump does), or we could just change the command line interface for llvm-dwarfdump. I know that there is also a dwarfdump utility on Linux (based on libdwarf?) that has an entirely different command line interface from both llvm-dwarfdump and Darwin dwarfdump.<br class="">Do people see value in keeping the llvm-dwarfdump command line interface or would changing it to the above format be acceptable?<br class=""><br class="">thanks for your input!<br class="">Adrian</blockquote></div></div></div></blockquote></div><br class=""></body></html>