Subject: toolchain/23393: gdb does not work for threaded programs on sparc64
To: None <>
From: Martin Husemann <>
List: netbsd-bugs
Date: 11/08/2003 12:35:17
>Number:         23393
>Category:       toolchain
>Synopsis:       gdb does not work for threaded programs on sparc64
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 08 11:36:00 UTC 2003
>Originator:     Martin Husemann
>Release:        NetBSD 1.6ZE
System: NetBSD 1.6ZE NetBSD 1.6ZE (SUNNY) #9: Thu Nov 6 18:16:40 CET 2003 sparc64
Architecture: sparc64
Machine: sparc64

Debugging threaded programs on sparc64 is impossible with the in-tree gdb 5.3.
It can't get at any register values (which is probably the root cause of it
all), doesn't properly map LWPs to threads and basically imedaitely crashes
with a bus error once you try to examine anything.

This used to work better before the new NetBSD thread support went in - while
it couldn't find the proper thread back then, it would at least show valid
register values.

Try to run gdb on a pthreaded program.