From owner-freebsd-bugs Sun Oct 20 05:50:06 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id FAA13608 for bugs-outgoing; Sun, 20 Oct 1996 05:50:06 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id FAA13590; Sun, 20 Oct 1996 05:50:04 -0700 (PDT) Resent-Date: Sun, 20 Oct 1996 05:50:04 -0700 (PDT) Resent-Message-Id: <199610201250.FAA13590@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, grog@lemis.de Received: from diablo.ppp.de (diablo.ppp.de [193.141.101.34]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id FAA12973 for ; Sun, 20 Oct 1996 05:40:53 -0700 (PDT) Received: from freebie.lemis.de by diablo.ppp.de with smtp (Smail3.1.28.1 #1) id m0vExBS-000Qo5C; Sun, 20 Oct 96 13:40 MET Received: (grog@localhost) by freebie.lemis.de (8.8.2/8.6.12) id OAA12535; Sun, 20 Oct 1996 14:40:10 +0200 (MET DST) Message-Id: <199610201240.OAA12535@freebie.lemis.de> Date: Sun, 20 Oct 1996 14:40:10 +0200 (MET DST) From: Greg Lehey Reply-To: grog@lemis.de To: FreeBSD-gnats-submit@freebsd.org, grog@freebie.lemis.de X-Send-Pr-Version: 3.2 Subject: kern/1848: breakpoints in shared libraries don't fire Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >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: