Subject: toolchain/25981: gdb completely broken on sparc64
To: None <gnats-bugs@gnats.NetBSD.org>
From: Martin Husemann <martin@duskware.de>
List: netbsd-bugs
Date: 06/20/2004 17:11:11
>Number:         25981
>Category:       toolchain
>Synopsis:       gdb completely broken on sparc64
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 20 15:12:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Martin Husemann
>Release:        NetBSD 2.0F
>Organization:
>Environment:
System: NetBSD setting-sun.duskware.de 2.0F NetBSD 2.0F (SETTINGSUN) #0: Sun Jun 20 12:50:15 CEST 2004 martin@night-porter.duskware.de:/usr/src/sys/arch/sparc64/compile/SETTINGSUN sparc64
Architecture: sparc64
Machine: sparc64
>Description:

Something in the not too distant past broke gdb on sparc64.

>How-To-Repeat:

Use any trivial "hello, world" program, compile it with -g or -gstabs and
try to debug it. Notice broken stack backtrace and variable values, like
this example:

(gdb) break main
Breakpoint 1 at 0x100bf0: file test.c, line 5.
(gdb) run
Starting program: /tmp/a.out 

Breakpoint 1, main (argc=Error accessing memory address 0x87f: Invalid argument.
) at test.c:5
5               int b = 12;
(gdb) bt
#0  main (argc=Error accessing memory address 0x87f: Invalid argument.
) at test.c:5
Error accessing memory address 0xffffffffffffc528: Invalid argument.
(gdb) info reg
g0             0x0      0
g1             0x1      1
g2             0x100420 1049632
g3             0x1      1
g4             0xfffffffffff    17592186044415
g5             0x6cb4   27828
g6             0x0      0
g7             0x402076f4       1075869428
o0             0x100be0 1051616
o1             0x81c06000       2176868352
o2             0x0      0
o3             0x0      0
o4             0x0      0
o5             0x0      0
sp             0xffffffffffffbcb1       18446744073709534385
o7             0x40204258       1075855960
l0             0x0      0
l1             0x0      0
l2             0x0      0
l3             0x0      0
l4             0x0      0
l5             0x0      0
l6             0x0      0
l7             0x0      0
i0             0x0      0
i1             0x0      0
i2             0x0      0
i3             0x0      0
i4             0x0      0
i5             0x0      0
fp             0x0      0
i7             0x0      0
pc             0x100bf0 1051632
npc            0x100bf4 1051636
ccr            0x0      0       xcc:NN,NZ,NO,NC, icc:NN,NZ,NO,NC
fsr            0x0      0       0:=, 1:=, 2:=, 3:=, rd:N, tem:0, ns:0, ver:0, ftt:0, qne:0, aexc:0, cexc:0
fprs           0x0      0       fef:0, du:0, dl:0
y              0x0      0
asi            0x0      0
ver            0x0      0       manuf:0, impl:0, mask:0, maxtl:0, maxwin:0
tick           0x0      0
pil            0x0      0
pstate         0x0      0       cle:0, tle:0, mm:tso, red:0, pef:0, am:0, priv:0, ie:0, ag:0
tstate         0x0      0
...

>Fix:
n/a
>Release-Note:
>Audit-Trail:
>Unformatted: