This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB 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]

exp/1203: gdb displays wrong stack trace


>Number:         1203
>Category:       exp
>Synopsis:       gdb displays wrong stack trace
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 07 15:18:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Andreas Florath
>Release:        insight+dejagnu-weekly-20030506
>Organization:
>Environment:
config.guess: sparc-sun-solaris2.8
./configure --enable-targets=all
>Description:
gdb shows wrong stack trace:
/opt/gcc321/pkg/insight+dejagnu-20030506/bin/gdb /opt/gcc33/lib/gcc-lib/sparc-sun-solaris2.8/3.3/cc1plus core.1
[...]
(gdb) bt
#0  ggc_alloc (size=85) at ../../gcc-20030428/gcc/ggc-page.c:1001
#1  0x00240b88 in rtx_alloc (code=Cannot access memory at address 0xff3efd40
) at ../../gcc-20030428/gcc/rtl.c:264
Cannot access memory at address 0xff3efd5c

Where as pstack shows:
 00281958 ggc_alloc (55, 0, 0, 550404, 0, 0)
 00129f98 copy_rtx_if_shared (0, 17527728, 0, 33a5c8, 2, 55) + 170
 00129f10 copy_rtx_if_shared (17527710, 17527b60, 0, 1, 33a5c8, 4c) + e8
 00129f10 copy_rtx_if_shared (0, 17527f98, 0, 0, 33a5c8, 3) + e8
 00129f10 copy_rtx_if_shared (0, 175303d8, 0, 0, 33a5c8, 3) + e8
 00129f10 copy_rtx_if_shared (0, 17530810, 0, 0, 33a5c8, 3) + e8
 00129f10 copy_rtx_if_shared (0, 17530c48, 0, 0, 33a5c8, 3) + e8
 00129f10 copy_rtx_if_shared (0, 17531080, 0, 0, 33a5c8, 3) + e8
 00129f10 copy_rtx_if_shared (0, 175314b8, 0, 0, 33a5c8, 3) + e8
[... about 75000 lines more]
 00129f10 copy_rtx_if_shared (0, 33e82498, 0, 0, 33a5c8, 3) + e8
 00129f10 copy_rtx_if_shared (0, 33e828d0, 0, 0, 33a5c8, 3) + e8
 00129f10 copy_rtx_if_shared (0, 33e82d08, 0, 0, 33a5c8, 3) + e8
 00129f10 copy_rtx_if_shared (0, 3, 0, 0, 33a5c8, 3) + e8
 00129f10 copy_rtx_if_shared (0, 2, 362cee40, 0, 33a5c8, 3) + e8
 00129948 unshare_all_rtl (a895e80, 18b2a50, 18b2a50, 18b2a50, 11df4a80, 1906e00) + 6c
 002635f0 rest_of_compilation (a895e80, 40d4d, 3d2000, 3d2400, dbe04, 3b9000) + 478
 000befc4 genrtl_finish_function (a895e80, a895e80, 0, 1906e00, 0, 40d4d) + 68
 000bec60 expand_body (a895e80, a8aca80, a6, 0, 0, 0) + 230
 00094868 yyparse  (3f1c08, ffbee710, 3e5000, 0, 31e000, ffbee71a) + 9bc
 000dc080 c_common_parse_file (0, ff33fa9c, 0, 3d2b38, dc048, 3b9000) + 38
 00262bdc compile_file (32e058, ffbeeb20, 1, 0, 0, 393398) + 34
 00267fa8 do_compile (3ebc00, ffbeead4, 0, 0, 0, 0) + 84
 0026806c toplev_main (15, ffbeead4, ffbeeb2c, 3c8680, 0, 0) + 5c
 0003d20c _start   (0, 0, 0, 0, 0, 0) + 5c

>How-To-Repeat:
Download gcc version 3.3 20030428 (prerelease).
Download pw.cc from 
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10060
and create t.cc file with 
./pw >t.cc 88511
g++ -pipe -ggdb -o t t.cc
gcc will core.  Load the cc1plus and core with the gdb. Enter 'bt'.

If you want, I can send you the cc1plus & core 
(maybe on a CD - because it's about 900M).
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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