<div dir="ltr"><div>I quite like the look of this in principle too, and I see no reason it couldn't be added as an option in llvm-objdump. Have you experimented with this on a Windows command prompt (PowerShell and cmd)? My experience with unicode characters in those has shown that unicode characters don't always work particularly well.</div><div><br></div><div>I don't think that should be a blocker on this feature mind you, but if it is problematic, we might just want to fall back to standard ASCII characters ('|', '+', '-' etc).</div><div><br></div><div>I'll take a look at the patch in due course.</div><div><br></div><div>James<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 26 Nov 2019 at 18:39, Evgenii Stepanov via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I like this a lot! I think the dwarf expression syntax is spot-on.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 26, 2019 at 9:12 AM Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Oliver,<br>
<br>
This is really cool. I absolutely support this for llvm-objdump. As<br>
far as output I don't have any strong opinions other than it might be<br>
good to separate out the "drawing" code as much as possible from the<br>
variable collection and range code to make it a little easier, but<br>
that's about it from here.<br>
<br>
Thanks for the work, can't wait to use it.<br>
<br>
-eric<br>
<br>
On Tue, Nov 26, 2019 at 8:50 AM Oliver Stannard via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Hi llvm-dev,<br>
><br>
> I've uploaded a prototype patch at <a href="https://reviews.llvm.org/D70720" rel="noreferrer" target="_blank">https://reviews.llvm.org/D70720</a> which adds a new feature to llvm-objdump: displaying the location (in registers/memory/etc) of source-level variables alongside the disassembly display. I've put a demo of the output at <a href="https://reviews.llvm.org/M2" rel="noreferrer" target="_blank">https://reviews.llvm.org/M2</a>.<br>
><br>
> I have two use-cases in mind for this:<br>
> * Users reading the disassembly of compiled code. It will be quicker/easier to do this if the disassembly shows which value is in each register and stack slot, rather than the user having to reverse-engineer this by hand.<br>
> * Compiler developers, who can use it to understand the debug info emitted by the compiler, and spot missing or incorrect debug info. In fact, I've already spotted one LLVM bug while writing this patch: in the function `baz` in M2, the debug info claims that variable `a` is in `r0` between PC addresses 0x14 and 0x8, which isn't true.<br>
><br>
> My questions for the LLVM community are:<br>
> * Is this an acceptable change for llvm-objdump, or is this adding too much complexity to be worth it?<br>
> * The patch currently uses unicode box-drawing characters, is this OK? If not, what would people rather see? A plain ASCII version of this, or some completely different format?<br>
> * The patch displays DWARF expressions in an ad-hoc syntax, which is a mix of C and ARM assembly (square brackets for memory access). Is there an existing syntax which would be better for this? I think it's important that the common cases like "load 4 bytes from memory at SP+4" are displayed concisely.<br>
><br>
> Oliver<br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>