[cfe-dev] Effectively Debugging Clang

Manuel Klimek klimek at google.com
Wed Oct 1 03:08:36 PDT 2014


Probably not helpful: I'm always booting up a Windows machine and use VS if
I really need to debug clang...

On Wed Oct 01 2014 at 11:25:38 AM Ismail Pazarbasi <
ismail.pazarbasi at gmail.com> wrote:

> You can use Xcode (by generating Xcode project with CMake) or use lldb
> instead of gdb. Kind of weakly-related note; lldb has vim integration
> as well.
>
> On Tue, Sep 30, 2014 at 7:34 PM, Amila Jayasekara
> <thejaka.amila at gmail.com> wrote:
> > Hello,
> >
> > I am having a more general question related to debugging clang.
> >
> > I start gdb (in MacOS) as follows;
> >
> >>ggdb clang++
> > ....
> > ....
> > (ggdb) run -cc1 -std=c++11 -stdlib=libc++
> > -I/Applications/Xcode.app/Contents/Developer/Toolchains/
> XcodeDefault.xctoolchain/usr/lib/c++/v1
> > test1.cpp
> >
> > In most of the time during debugging session I am unable to evaluate and
> > print values of a certain variable. Sometimes my debugger freezes for
> long
> > time, sometime i get a segmentation faults.
> >
> > For example if I execute following on a  QualType variable I get a
> > segmentation fault.
> >
> > (gdb) p FnRetType.getAsString()
> > line 1: 39759 Segmentation fault: 11  ggdb
> > /Users/thejaka/development/crest/pxc/llvm/350/Debug+Asserts/bin/clang++
> >
> > So my question is, what are the techniques you use to effectively debug
> > clang ? and how can I overcome crashes like above ?
> >
> > Your feedback is greatly appreciated.
> >
> > Thank you
> > Regards
> > Thejaka Amila
> >
> >
> >
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> >
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141001/1db9b7fa/attachment.html>


More information about the cfe-dev mailing list