<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 31, 2014 at 3:16 AM, Robinson, Paul <span dir="ltr"><<a href="mailto:Paul_Robinson@playstation.sony.com" target="_blank">Paul_Robinson@playstation.sony.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">> -----Original Message-----<br>
> From: <a href="mailto:llvm-commits-bounces@cs.uiuc.edu">llvm-commits-bounces@cs.uiuc.edu</a> [mailto:<a href="mailto:llvm-commits-">llvm-commits-</a><br>
</div><div class="im">> <a href="mailto:bounces@cs.uiuc.edu">bounces@cs.uiuc.edu</a>] On Behalf Of Adrian Prantl<br>
> Sent: Thursday, January 30, 2014 12:41 PM<br>
> To: <a href="mailto:reviews%2BD2658%2Bpublic%2B165c5c32e55e8f4a@llvm-reviews.chandlerc.com">reviews+D2658+public+165c5c32e55e8f4a@llvm-reviews.chandlerc.com</a><br>
> Cc: <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> Subject: Re: [PATCH] [RFC] Rewrite the way we generate debug locations<br>
> for variables.<br>
><br>
><br>
</div><div class="im">> On Jan 30, 2014, at 12:07, Alexey Samsonov <<a href="mailto:samsonov@google.com">samsonov@google.com</a>> wrote:<br>
> ><br>
> > BB1:<br>
> > DBG_VALUE: var "x" is in %rax<br>
> > jmp BB3<br>
> > BB2:<br>
> > DBG_VALUE: var "x" is in %rbx<br>
> > jmp BB3<br>
> > BB3:<br>
> > // what DBG_VALUE for "x" should we insert here?<br>
><br>
> This is a great example, showing why we really want to extend the ranges<br>
> instead. The interesting bit here is that we would want to have two<br>
> overlapping location ranges:<br>
> BB1, BB3 var "x" is in $rax<br>
> BB2, BB3 var "x" is in $rbx<br>
<br>
</div>No, no, no. At BB3, the location of "x" is UNKNOWN.<br>
When stopped at BB3, we cannot guarantee that the debugger knows<br>
which block it came from. Therefore the location of "x" is<br>
ambiguous, and therefore we cannot say where it is at all.<br>
--paulr<br></blockquote><div><br></div><div>I agree. Overlapping address ranges mean that the variable is stored in several</div><div>places at the same time, but here we have ambiguity, not redundancy.</div><div>Probably, the example should be clarified, though:</div>
<div>BB1:</div><div> put "x" in %rax</div><div> DBG_VALUE: var "x" is in %rax<br></div><div> clobber %rbx</div><div> jmp BB3</div><div>BB2:</div><div> put "x" in %rbx</div><div> DBG_VALUE: var "x" is in %rbx</div>
<div> clobber %rax</div><div> jmp BB3</div><div>BB3:</div><div> // where is "x"?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im"><br>
> and incidentally the DWARF spec says that: "Address ranges defined by<br>
> normal location list entries may overlap."<br>
> I wonder if debuggers can deal with this, though.<br>
><br>
> thanks,<br>
> Adrian<br>
</div><div class=""><div class="h5">> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div>
</div></div>