[cfe-users] Debugging clang generated code with gdb

Nick Lewycky nlewycky at google.com
Mon Jun 10 16:37:39 PDT 2013


On 10 June 2013 16:34, Kevin <xtrmk3v0r at googlemail.com> wrote:

> Hi!
>
> I would like to know, if executables generated with clang++, can be
> debugged with gdb without any problems or if I have to use the LLDB
> debugger for this purpose. I just want to play around with some new C++11
> features, compile the code for a 64 bit linux system (amd64) and debug the
> compiled code.
>

Clang produced binaries should be debuggable with GDB. All of clang, gcc
and gdb support the same debugging format, DWARF from dwarfstd.org. Older
GDBs may not work well with newer clangs.

There is one substantial known-issue, clang's debug info is extremely poor
when optimizations are enabled. As for unoptimized debug info, if you find
problems please file bugs.

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20130610/e236e039/attachment.html>


More information about the cfe-users mailing list