[cfe-dev] Debugging RecursiveASTVisitor

Alexandros Tzannes atzannes at illinois.edu
Tue Aug 13 10:52:09 PDT 2013


Thank you Manuel,
this is what I have been using so far as well, but I'm facing a problem 
that is a bit convoluted and was hoping there is some more "advanced" 
technique  :) More specifically, I think it would help if I could step 
through the code of the RecursiveASTVisitor within a debugger, but 
because most of the code is macro expanded, it doesn't seem like the 
debug symbols (at least the default ones in Debug+Assert) are very 
useful, as they seem to be pointing to the un-expanded version of the 
source files.

Cheers!
Alex

On 08/13/2013 05:54 AM, Manuel Klimek wrote:
> On Mon, Aug 12, 2013 at 8:20 PM, Alexandros Tzannes 
> <atzannes at illinois.edu <mailto:atzannes at illinois.edu>> wrote:
>
>     Hi all,
>     I am trying to debug a strange behavior of the
>     RecursiveASTVisiror, and trying to use gdb with the Debug+Assert
>     binary of clang++. Unfortunately, because so much of the code of
>     RecursiveASTVisitor is macro-expanded and because the debug
>     symbols are trying to relate to the "non-expanded" code navigating
>     an execution with gdb is pretty useless.
>
>     Has anyone encountered this issue in the past and has any advice
>     on how to debug RecursiveASTVisitor?
>
>
> I've so far used:
> llvm::outs() << ...
> plus unit tests...
>
> Cheers,
> /Manuel
>
>
>     Cheers!
>     Alex
>     _______________________________________________
>     cfe-dev mailing list
>     cfe-dev at cs.uiuc.edu <mailto: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/20130813/3a6c345f/attachment.html>


More information about the cfe-dev mailing list