This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

Debugging the GCC compiler proper 'cc1'


Hi all,

Plese include mailto:kcmahadev@zilogindia.com, mailto:kkiran@zilogindia.com
while replying.

Thanks

here the problem goes.
Any help is welcome.

Thanks
With best regards,

\/ \/   Mahadev K. Cholachagudda
O . O   mailto:kcmahadev@zilogindia.com
 ( )



The compiler for m68k-coff on sun machine has
been built successfully.

It has been build with -g option.

Now when running the gdb with cc1
compiler we are not able to go into
yyparse function.

The following procedure is followed while running the gdb.
**************************************************************
>gdb /somepath/build_m68k/gcc/cc1
GNU gdb 4.17
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.5"...

(gdb) b main
Breakpoint 1 at 0x38de4: file ../../src/gcc/toplev.c, line 4755.

(gdb) b yyparse
Breakpoint 2 at 0x16aaf4: file /opt/gnu/share/bison.simple, line 225.

(gdb) run test.c
Starting program: /somepath/build_m68k/gcc/cc1 test.c
.cshrc file execution

Breakpoint 1, main (argc=2, argv=0xffbef55c) at ../../src/gcc/toplev.c:4755
4755      char *filename = 0;
(gdb) continue
Continuing.

Breakpoint 2, yyparse () at /opt/gnu/share/bison.simple:225
225       int yychar1 = 0;              /*  look

**************************************************************
As can be seen from the above description,
when breakpoint is set in yyparse()
it is neither set at c-parse.y file nor in the
corresponding bison generated file c-parse.c

It is getting set at location bison.simple.

What is the reason for this behaviour and
Are we missing something here.

We are able to find the various reductions the
parser is undergoing by giving -dy option for cc1.

How to debug the gcc code as it passes
through the various reductions in the LALR
parser genrated by the bison?



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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