<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><div><br></div><div>-- </div><div>Alexey Samsonov, MSK</div><br>