<div dir="ltr"><div>To answer your question, I have no idea. I have limited knowledge of DWARF, LLDB and LLVM. I haven't tried to compile llvm, lldb or anything (meaning I only tried in llvm 9 and lldb 9). I been working on my language far to much to be looking at anything else and this isn't really blocking my progress.</div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 2, 2020 at 4:04 PM Adrian Prantl <<a href="mailto:aprantl@apple.com">aprantl@apple.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"><div style="overflow-wrap: break-word;">Does this still reproduce with lldb compiled from the current state of the git repository (ToT)?<div><br></div><div>How do you know that it is LLDB loosing the variable and not clang? Does clang produce a location for the variable when you look at the dwarfdump output?</div><div><br></div><div>-- adrian<br><div><br><blockquote type="cite"><div>On Feb 26, 2020, at 3:31 AM, Levo DeLellis via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:</div><br><div><div dir="ltr"><div>This feels like a bug to me. Yesterday I was asking what the rules were because it felt like things change and break randomly. Now I have a good example. (link to my email yesterday <a href="http://lists.llvm.org/pipermail/lldb-dev/2020-February/015989.html" target="_blank">http://lists.llvm.org/pipermail/lldb-dev/2020-February/015989.html</a>)</div><div><br></div><div>Take this example source file</div><div><br></div>int main() {<br>    int dummy = 25;<br>    short wtf[dummy];<br>    memset(wtf, 0, dummy*sizeof(*wtf));<br>    return 0;<br><div>}</div><br>Now emit the llvm-ir so we can edit it <br><br>clang -g test.c -S -emit-llvm<br><br>Before line 21 write this line<br><br>%z8 = bitcast i16* %8 to i16*<br><br>Change the `metadata i16* %8` to `metadata i16* %z8`. Compile it then debug line 4 `clang -g wtf.ll` `lldb-9 ./a.out` `break set -f test.c -l 4` `r` `frame variable`<br><br>You'll see the array doesn't show up. If you change %z8 back to %8 it will reappear. Is this a bug or can I not use bitcast when I'm trying to do things with llvm.dbg.declare/addr/value?<br><br></div>
_______________________________________________<br>lldb-dev mailing list<br><a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br></div></blockquote></div><br></div></div></blockquote></div>