<br><br><div class="gmail_quote">On Thu, Jul 5, 2012 at 12:05 AM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@apple.com" target="_blank">echristo@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><div class="h5"><br><div><div>On Jul 4, 2012, at 1:13 AM, Alexey Samsonov wrote:</div><br><blockquote type="cite"><br><br><div class="gmail_quote">On Wed, Jul 4, 2012 at 1:44 AM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@apple.com" target="_blank">echristo@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div><br>
On Jun 29, 2012, at 10:24 AM, Alexey Samsonov <<a href="mailto:samsonov@google.com" target="_blank">samsonov@google.com</a>> wrote:<br>
<br>
> Hi!<br>
><br>
> DwarfDebug class can generate the same (inlined) DIVariable twice:<br>
> 1) when trying to find abstract debug variable for a concrete inlined instance<br>
> 2) when explicitly collecting info for variables that were optimized out.<br>
><br>
> Duplicated DIEs for variables confuses e.g. gdb (it shows two identical function arguments).<br>
> I've attached the proposed little patch and a testcase. Please take a look.<br>
><br>
> (more context - <a href="http://llvm.org/bugs/show_bug.cgi?id=13202" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=13202</a>)<br>
<br>
</div></div>Looks ok, but please:<br>
<br>
a) Add a comment as to what's going on and point to the other use of cleanseInlinedVariable,<br></blockquote><div><br></div><div>Added a comment.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



b) Run it on a testsuite like gdb or lldb as well (or if you have let me know how it went).<br>
<br></blockquote><div><br></div><div>I've checked in debuginfo-tests and run them as well with make check-all. It passed except for one test:</div><div><div>/home/samsonov/llvm-project/llvm2/tools/clang/test/debuginfo-tests/forward-declare-class.cpp:9:11: error: expected string not found in input</div>


<div>// CHECK: type = struct A {</div><div>          ^</div><div>/home/samsonov/llvm-project/llvm2/build/tools/clang/test/debuginfo-tests/Output/forward-declare-class.cpp.gdb.output:1:1: note: scanning from here</div><div>


type = class A {</div><div>^</div><div>--</div></div><div>"type = class A" seems to be a correct line, comment in the test case tells that this test is a workaround for gdb bug. Is it possible</div><div>that I have the gdb version with this bug fixed?</div>


<div><br></div><div>Or did you mean the tests from LNT-based test-suite infrastructure?</div></div></blockquote><br></div></div></div><div>None of the above :) I meant actually running the gdb test suite with clang before and after the patch.</div>
</div></blockquote><div><br></div><div>Oh, got it. Patched Clang passes two extra tests on my machine (and passes all checks in gdb.opt/inline-locals.exp)</div><div><br></div><div><div>$ diff gdb.sum.1 gdb.sum.2</div><div>
1c1</div><div>< Test Run By samsonov on Thu Jul  5 13:03:15 2012</div><div>---</div><div>> Test Run By samsonov on Thu Jul  5 14:10:19 2012</div><div>14276c14276</div><div>< FAIL: gdb.opt/inline-locals.exp: info args above bar (2)</div>
<div>---</div><div>> PASS: gdb.opt/inline-locals.exp: info args above bar (2)</div><div>14284c14284</div><div>< FAIL: gdb.opt/inline-locals.exp: info args above bar (3)</div><div>---</div><div>> PASS: gdb.opt/inline-locals.exp: info args above bar (3)</div>
<div>19803,19804c19803,19804</div><div>< # of expected passes<span class="Apple-tab-span" style="white-space:pre">               </span>12566</div><div>< # of unexpected failures<span class="Apple-tab-span" style="white-space:pre">   </span>3426</div>
<div>---</div><div>> # of expected passes<span class="Apple-tab-span" style="white-space:pre">           </span>12568</div><div>> # of unexpected failures<span class="Apple-tab-span" style="white-space:pre">   </span>3424</div>
</div><div><br></div></div>-- <br><div>Alexey Samsonov, MSK</div><br>