[llvm-dev] Debugging clang with debugger breakpoints ?

David Blaikie via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 4 12:03:28 PST 2019


Run clang with -### to get the underlying command line (the one that has
the first argument "-cc1") and then run that command under the debugger
instead.

On Mon, Nov 4, 2019 at 12:02 PM Joan Lluch via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi All,
>
> I want to understand some parts of ‘clang' by setting debug breakpoints.
>
> I have successfully done so with “llc” but I found that debugger
> breakpoints do not work for ‘clang’
>
> The apparent cause is that the clang code is run as a child process which
> is created in the ‘Execute' function of ‘Program.inc'. The debugger stops
> fine at breakpoints set on the main thread, but breakpoints do not work for
> any code that is executed as the child process. I am compiling with Xcode
> in case this makes a difference.
>
> Thanks in advance for any help.
>
> John
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191104/fe5156ea/attachment.html>


More information about the llvm-dev mailing list