Subject: bin/4591: gdb on pmax: cannot handle shared libraries
To: None <gnats-bugs@gnats.netbsd.org>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: netbsd-bugs
Date: 11/27/1997 18:04:42
>Number:         4591
>Category:       bin
>Synopsis:       gdb on pmax: cannot handle shared libraries
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 27 18:20:03 1997
>Last-Modified:
>Originator:     Jonathan Stone
>Organization:
	
>Release:        NetBSD-1.3_ALPHA supped on Nov 26
>Environment:
	
System: NetBSD Reno.DSG.Stanford.EDU 1.3_ALPHA NetBSD 1.3_ALPHA (GENERIC) #0: Sat Nov 22 16:32:51 PST 1997 jonathan@Reno.DSG.Stanford.EDU:/reno/compile/GENERIC pmax


>Description:

gdb doesn't properly handle pmax shared libraries.

When starting an inferior, gdb reports that it cannot establisha
breakpoint function in shared libraries, find the dynamic-linker
shared library initializers, and so cannot properly debug the
shared library code:


	(gdb) break main
	Breakpoint 1 at 0x436478
	(gdb) run
	Starting program: /usr/bin/gdb 
	warning: Unable to find dynamic linker breakpoint function.
	warning: GDB will be unable to debug shared library initializers
	warning: and track explicitly loaded dynamic code.
	
	Program received signal SIGTRAP, Trace/breakpoint trap.
	0x0 in ?? ()

(see previous PR about the SIGTRAP problem.)

I have no clue what this means. However, non-integrated FSF gdb 4.15
and gdb 4.16 (with the mipsnat code I wrote and shipped with earlier
pmax snapshots) doesn't have this problem.

I'm not sure what I can change without potentially breaking GDB on
other ports...

>How-To-Repeat:

	on a pmax with netbsd 1.3_ALPHA, do:

	gdb /usr/bin/gdb
	break main
	run

>Fix:


None known. No workaround, either.  I don't really know where to start
on this one; any assistance gratefuly appreciated.
>Audit-Trail:
>Unformatted: