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]

Perl script for snapshot ICEs


Title: Perl script for snapshot ICEs

The enclosed perl script is intended to make it easy to provide useful
information from egcs snapshot Internal Compiler Errors.
When run in the snapshot obj directory over build.log it will pull out the
compilation causing the problem, re-run it with -v -save-temps,pull out
the gcc subprocess causing the problem, then start that subprocess under gdb
with a breakpoint at the reported ICE position.
It does a backtrace and list on hitting the breakpoint, then you can display
the local variables that seem relevant.
Tested on AIX 4.2 & HP-UX 10.20. On UnixWare 7.1, gdb 4.17 appeared to be
looping.

Script started on Mon Oct 18 11:59:39 1999
bash-2.02$ perl ice.pl build.log
stage1/xgcc -Bstage1/ -B/usr/local/hppa2.0-hp-hpux10.20/bin/  -DIN_GCC    -W -Wall -O2 -g -O2  -DHAVE_CONFIG_H    -I. -I../../egcs-19991013/gcc -I../../egcs-19991013/gcc/config -I../../egcs-19991013/gcc/../include \

  -DGCC_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.96/include\" -DGPLUSPLUS_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.96/../../../..`echo /usr/local | sed -e 's|^/usr/local||' -e 's|/[^/]*|/..|g'`/include/g++-3\" -DLOCAL_INCLUDE_DIR=\"/usr/local/include\" -DCROSS_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.96/../../../../hppa2.0-hp-hpux10.20/sys-include\" -DTOOL_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.96/../../../../hppa2.0-hp-hpux10.20/include\" \

  -c `echo ../../egcs-19991013/gcc/cccp.c | sed 's,^\./,,'`
../../egcs-19991013/gcc/cccp.c: In function `main':
../../egcs-19991013/gcc/cccp.c:2079: warning: comparison between signed and unsigned
../../egcs-19991013/gcc/cccp.c: In function `timestamp':
../../egcs-19991013/gcc/cccp.c:4134: Internal compiler error in `find_free_reg', at local-alloc.c:1947
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
make[2]: *** [cccp.o] Error 1
make[2]: Leaving directory `/devel/span/rdb/src/egcs-19991013.obj/gcc'


 stage1/cc1 cccp.i -quiet -dumpbase cccp.c -g -O2 -O2 -W -Wall -version -o cccp.s
GNU C version 2.96 19991013 (experimental) (hppa2.0-hp-hpux10.20) compiled by GNU C version egcs-2.91.57 19980901 (egcs-1.1 release).

../../egcs-19991013/gcc/cccp.c: In function `main':
../../egcs-19991013/gcc/cccp.c:2079: warning: comparison between signed and unsigned
../../egcs-19991013/gcc/cccp.c: In function `timestamp':
../../egcs-19991013/gcc/cccp.c:4134: Internal compiler error in `find_free_reg', at local-alloc.c:1947
Please submit a full bug report.
Breakpoint 1 at 0x2c3fc
Breakpoint 2 at 0xe492c: file ../../egcs-19991013/gcc/rtl.c, line 1092.
Breakpoint 3 at 0x2c3fec
Breakpoint 4 at 0x1af860: file ../../egcs-19991013/gcc/local-alloc.c, line 1947.
warning: Unable to find __d_pid symbol in object file.
warning: Suggest linking with /opt/langtools/lib/end.o.
warning: GDB will be unable to track shl_load/shl_unload calls
GNU C version 2.96 19991013 (experimental) (hppa2.0-hp-hpux10.20) compiled by GNU C version egcs-2.91.57 19980901 (egcs-1.1 release).

../../egcs-19991013/gcc/cccp.c: In function `main':
../../egcs-19991013/gcc/cccp.c:2079: warning: comparison between signed and unsigned

Breakpoint 4, find_free_reg (class=GENERAL_REGS, mode=SImode, qty=0,
    accept_call_clobbered=0, just_try_suggested=0, born_index=12, dead_index=2)
    at ../../egcs-19991013/gcc/local-alloc.c:1947
1947        abort ();
#0  find_free_reg (class=GENERAL_REGS, mode=SImode, qty=0,
    accept_call_clobbered=0, just_try_suggested=0, born_index=12, dead_index=2)
    at ../../egcs-19991013/gcc/local-alloc.c:1947
#1  0x1ad678 in block_alloc (b=1) at ../../egcs-19991013/gcc/local-alloc.c:1431
#2  0x1aa4c0 in local_alloc () at ../../egcs-19991013/gcc/local-alloc.c:413
#3  0x324c8 in rest_of_compilation (decl=0x402c6380)
    at ../../egcs-19991013/gcc/toplev.c:4098
#4  0x2a6000 in finish_function (nested=0)
    at ../../egcs-19991013/gcc/c-decl.c:6773
#5  0x28d25c in yyparse () at c-parse.y:314
#6  0x2fccc in compile_file (name=0x40053470 "cccp.i")
    at ../../egcs-19991013/gcc/toplev.c:3181
#7  0x35cfc in main (argc=13, argv=0x7b03a510)
    at ../../egcs-19991013/gcc/toplev.c:5498
1942      static struct {int from, to; } eliminables[] = ELIMINABLE_REGS;
1943    #endif
1944   
1945      /* Validate our parameters.  */
1946      if (born_index < 0 || born_index > dead_index)
1947        abort ();
1948   
1949      /* Don't let a pseudo live in a reg across a function call
1950         if we might get a nonlocal goto.  */
1951      if (current_function_has_nonlocal_label
(gdb) p born_index
$1 = 12
(gdb) p dead_index
$2 = 2
(gdb) c
Continuing.
../../egcs-19991013/gcc/cccp.c: In function `timestamp':
../../egcs-19991013/gcc/cccp.c:4134: Internal compiler error in `find_free_reg', at local-alloc.c:1947
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
Child process unexpectedly missing: No child processes.
[New process -1]

Program terminated with signal ?, Unknown signal.
The program no longer exists.
(gdb) q
bash-2.02$ exit
exit

script done on Mon Oct 18 12:01:01 1999

Worth refining?

Cruddy perl4 perl following


 

ice.pl


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