Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Oct 1996 14:40:10 +0200 (MET DST)
From:      Greg Lehey <grog@lemis.de>
To:        FreeBSD-gnats-submit@freebsd.org, grog@freebie.lemis.de
Subject:   kern/1848: breakpoints in shared libraries don't fire
Message-ID:  <199610201240.OAA12535@freebie.lemis.de>
Resent-Message-ID: <199610201250.FAA13590@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         1848
>Category:       kern
>Synopsis:       breakpoints may be set in shared libraries, but they never get hit
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 20 05:50:03 PDT 1996
>Last-Modified:
>Originator:     Greg Lehey
>Organization:
LEMIS
grog@lemis.de			 Schellnhausen 2
Tel: +49-6637-919123		 36325 Feldatal
Fax: +49-6637-919122		 Germany
>Release:        FreeBSD 2.2-CURRENT-ctm-2592 i386
>Environment:

	FreeBSD 2.2-current, as of CTM 2592.

>Description:

	It's possible to set breakpoints in shared libraries, but
	executing the code doesn't cause a SIGTRACE.

	I consider this problem relatively serious because it makes it
	very difficult to catch bugs by waiting for them to issue a
	system call.  In this case, the new version of sendmail is
	calling gethostbyaddr() even though it has been compiled
	without DNS support.

>How-To-Repeat:

	I did it with the latest version of sendmail.  Here sample
	output:

	=== root@freebie (/dev/ttyp3) /S/FreeBSD/Mail/sendmail-8.8.2/src 67 -> gdb sendmail  
	GDB 4.13 (i386-unknown-freebsd), Copyright 1994 Free Software Foundation, Inc...
	(gdb) b gethostbyaddr
	Function "gethostbyaddr" not defined.
	(gdb) b main
	Breakpoint 1 at 0x13cf9: file main.c, line 128.
	(gdb) r -bD -q10m
	Starting program: /S/FreeBSD/Mail/sendmail-8.8.2/src/sendmail -bD -q10m
	During symbol reading...unknown symbol type 0x1e...
	
	Breakpoint 1, main (argc=3, argv=0xefbfd344, envp=0xefbfd354) at main.c:128
	128             bool queuemode = FALSE;         /* process queue requests */
	(gdb) b gethostbyaddr
	Breakpoint 2 at 0x808435e
	(gdb) r
	The program being debugged has been started already.
	Start it from the beginning? (y or n) n
	Program not restarted.
	(gdb) c
	Continuing.
	^C
	Program received signal SIGINT, Interrupt.
	0x80a4951 in select ()
	(gdb) bt
	#0  0x80a4951 in select ()
	#1  0x808f610 in res_send ()
	#2  0x808bdd7 in res_query ()
	#3  0x80858d8 in _gethostbydnsaddr ()
	#4  0x80843c2 in gethostbyaddr ()
	#5  0x63d5 in sm_gethostbyaddr ()
	#6  0x66ef in load_if_names ()
	#7  0x14802 in main (argc=3, argv=0xefbfd344, envp=0xefbfd354) at main.c:482
	(gdb) 


>Fix:
	
	Not known

>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610201240.OAA12535>