[cfe-dev] preprocessor hacking

Nikola Smiljanic popizdeh at gmail.com
Sat May 24 23:24:45 PDT 2014


If you invoke clang as a driver (as in clang test.c) it will spawn a new
process for the frontend (that lexes, preprocesses, parses etc.) and a new
process for linker and assembler. To debug the frontend itself (and not the
driver) pass -cc1 (as in clang -cc1 test.c).

Not sure where you'd like to break, but have a look at Lexer.cpp and
Preprocessor.cpp and pick a method. Constructor might be a good place to
start...


On Sun, May 25, 2014 at 3:20 PM, phi clang <phi.clang at gmail.com> wrote:

>
> ​Discovered the -f-no-color-diagnostics
>
> Still have to discover a good function name to setup a break point to get
> the lexer control.
>
> Cheers,
> Phi
>
>
> _______________________________________________
> 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/20140525/cf64e94d/attachment.html>


More information about the cfe-dev mailing list