[lldb-dev] sharing code between lldb and AddressSanitizer

Dmitry Vyukov dvyukov at google.com
Wed Feb 29 00:50:04 PST 2012

On Tue, Feb 28, 2012 at 10:25 PM, Greg Clayton <gclayton at apple.com> wrote:

> > Ironically the symbolizer works great on gcc-compiled binaries,
> > but fails on clang-compiled binaries.
> > It provides some info but it's dead wrong (point into some
> > random STL source files).
> > objdump -dlS shows
> > correct info for the binaries, and I guess you mostly work with
> > clang-compiled binaries.
> > So are there any known problems? What may I be missing?
> 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.
I've tracked down the problem.
When I build the lookup example as
$ clang++ main.cpp -I../../include -llldb -g -frtti
It works.
However when I build it as:
$ clang++ main.cpp -I../../include -llldb -g -frtti *-fPIE -pie*
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).
So, the problem seems to be in tricky interaction of clang, lldb and -pie.
It's all Linux/amd64 and tip clang.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20120229/5bbbbb99/attachment.html>

More information about the lldb-dev mailing list