<div class="gmail_quote">On Mon, Mar 26, 2012 at 9:22 PM, Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com">gclayton@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dmitry,<br>
<br>
Can you attach an example ELF file with DWARF and the main.cpp source file to the bug so that I can take a look? "-pie" is not a valid argument for our current darwin clang++, so this might be a linux specific compiler driver option.<br>

<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>Hi Greg,</div><div><br></div><div>I've attached source and binary:</div><div><a href="http://llvm.org/bugs/show_bug.cgi?id=12355">http://llvm.org/bugs/show_bug.cgi?id=12355</a></div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mar 26, 2012, at 2:16 AM, Dmitry Vyukov wrote:<br>

<br>
> On Wed, Feb 29, 2012 at 12:50 PM, Dmitry Vyukov <<a href="mailto:dvyukov@google.com">dvyukov@google.com</a>> wrote:<br>
> On Tue, Feb 28, 2012 at 10:25 PM, Greg Clayton <<a href="mailto:gclayton@apple.com">gclayton@apple.com</a>> wrote:<br>
> > Ironically the symbolizer works great on gcc-compiled binaries,<br>
> > but fails on clang-compiled binaries.<br>
> > It provides some info but it's dead wrong (point into some<br>
> > random STL source files).<br>
> > objdump -dlS shows<br>
> > correct info for the binaries, and I guess you mostly work with<br>
> > clang-compiled binaries.<br>
> > So are there any known problems? What may I be missing?<br>
><br>
> Not that we know of. Clang binaries work great on MacOSX and symbolicate just fine. If you have any quick examples where address lookups fail, please send me examples off the list.<br>
><br>
><br>
> I've tracked down the problem.<br>
> When I build the lookup example as<br>
> $ clang++ main.cpp -I../../include -llldb -g -frtti<br>
> It works.<br>
> However when I build it as:<br>
> $ clang++ main.cpp -I../../include -llldb -g -frtti -fPIE -pie<br>
> It fails to symbolize itself. While objdump -dSl symbolizes it (shows line numbers inside of functions). If I build a program with gcc with -fPIE -pie, it also able to symbolize itself (with lldb).<br>
> So, the problem seems to be in tricky interaction of clang, lldb and -pie.<br>
> It's all Linux/amd64 and tip clang.<br>
><br>
><br>
> Ping. Any progress on this? It's critical for us, we build everything only with -pie, so this thing renders lldb useless for us. I've filed an issue:<br>
> <a href="http://llvm.org/bugs/show_bug.cgi?id=12355" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=12355</a><br>
><br>
<br>
</div></div></blockquote></div><br>