[LLVMdev] debugging llvm from clang using gdb

Reid Kleckner rnk at google.com
Tue May 21 05:35:38 PDT 2013

Are you debugging the driver process or the -cc1 process?  To get the -cc1
process, unfortunately you have to go through the dance of passing -### to
get the -cc1 line and then run that in gdb (or write one manually).
 Alternatively in gdb you can say "set follow-fork child" (or something,
check the docs) to automatically follow into the -cc1 child.

On Tue, May 21, 2013 at 8:00 AM, reed kotler <rkotler at mips.com> wrote:

> I've always debugged the backend llc by running it as a separate
> executable.
> I'm seeing a bug that only happens when I run the compiler from clang.
> How do you debug this from gdb?
> I can put a breakpoint but it never stops when I say "run ...."
> Tia.
> Reed
> ______________________________**_________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/**mailman/listinfo/llvmdev<http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130521/627f106d/attachment.html>

More information about the llvm-dev mailing list