This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Debugging with gdb


Ian Lance Taylor wrote:
Russell Shaw <rjshaw@netspace.net.au> writes:

Now just need to find where cc1 is called from within in gcc/gcc.c
(not really trivial).


Don't worry about it.  Run gcc with -v --save-temps, and you will see
precisely how cc1 is run.

See
    http://www.dberlin.org/gccwiki/index.php/DebuggingGCC
    http://gcc.gnu.org/ml/gcc/2004-03/msg01195.html

Ian

Hi, Cc1 runs ok at the command line:

/usr/local/libexec/gcc/avr/3.4.3/cc1 -quiet -v main.c -quiet -dumpbase main.c -dP -mmcu=atmega16 -auxbase main -g -O0 -Wall -Wno-unused -version -o /tmp/cccVrfqY.s

When i try to run the same thing in gdb, it crashes:

  Program received signal SIGSEGV, Segmentation fault.
  0x080f3cd1 in init_emit () at ../../gcc-3.4.3/gcc/emit-rtl.c:5354
  /home/russell/SRC/gcc-3.4.3/gcc/emit-rtl.c:5354:138102:beg:0x80f3cd1
  (gdb)

It crashes in emit-rtl.c here:

  /* Indicate that the virtual registers and stack locations are
     all pointers.  */
  REG_POINTER (stack_pointer_rtx) = 1;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]