This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: debugging gcc/cc1
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Johnny Huynh <huynh at ugrad dot cs dot ualberta dot ca>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 26 May 2004 13:42:00 -0700
- Subject: Re: debugging gcc/cc1
- References: <Pine.LNX.4.56.0405261421500.20553@csu510.cs.ualberta.ca>
Johnny Huynh <huynh@ugrad.cs.ualberta.ca> writes:
> This must have been asked before, but my google and mailing list searches
> havent gotten me anything too useful...
>
> I have written an extra pass that is causes a seg fault in my gcc
> cross-compiler, but no core file is generated (presumably from the sig
> handler) and I don't know how to attach gdb to my cross-compiler.
>
> I've tried using the output provided by "gcc -v -save-temps ..." and then
> invoke cc1 from inside gdb, but thats not immediately working, and its
> a pain to have to copy and paste huge chunks of text everytime I want to
> trace my new changes.
Copying and pasting those huge chunks of text is what I do. I've
occasionally thought about adding a gcc driver switch that would
inject "gdb --args" at the beginning of the cc1 command line, but
never actually done it.
You can get a core dump by passing -dH to the compiler. I'm not sure
what you mean by "tips on how to trace my new changes".
zw