Debugging the static analyzer

Hello,

I’m working on implementing a Clang static analyzer checker, but I’m having trouble debugging. The issue is that when inserting breakpoints through Xcode, the only breakpoints that are triggered during a ‘Build and Run’ are those located in the files in Clang executable target ‘Compile Sources’ build phase (i.e. driver.cpp). Breakpoints placed within files in the clangStaticAnalyzerCheckers library are not triggered. The same issue occurs when debugging the Clang executable using lldb through bash.

Configuration info:
I’m configuring the LLVM project for Xcode via the commands:
…/llvm/configure --enable-debug-runtime --enable-keep-symbols --enable-targets=x86_64
cmake -G Xcode …/llvm

Thanks,
Ricky

Clang has a driver and the frontend, they are the same executable but
separate processes. More information here:

http://clang.llvm.org/docs/FAQ.html

To debug Clang, you need to figure out the frontend -cc1 command line
(invoke the driver with -### option in addition to usual ones), or use
a feature in your debugger to attach to child processes.

Dmitri