From owner-freebsd-current Sun Oct 20 22:27:27 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id WAA23780 for current-outgoing; Sun, 20 Oct 1996 22:27:27 -0700 (PDT) Received: from nike.efn.org (metriclient-14.uoregon.edu [128.223.172.14]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id WAA23772 for ; Sun, 20 Oct 1996 22:27:23 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by nike.efn.org (8.7.5/8.7.3) with SMTP id WAA02831; Sun, 20 Oct 1996 22:26:23 -0700 (PDT) Date: Sun, 20 Oct 1996 22:26:22 -0700 (PDT) From: John-Mark Gurney X-Sender: jmg@nike Reply-To: John-Mark Gurney To: Michael Smith cc: Douglas Thomas Crosher , freebsd-current@FreeBSD.org Subject: Re: kern/1848: breakpoints in shared libraries don't fire In-Reply-To: <199610210204.LAA04119@genesis.atrad.adelaide.edu.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk On Mon, 21 Oct 1996, Michael Smith wrote: > Douglas Thomas Crosher stands accused of saying: > > > > > > > It's possible to set breakpoints in shared libraries, but > > > > > executing the code doesn't cause a SIGTRACE. > > > > > > Setting a breakpoint in a shared library would be Bad, as you don't > > > have any way of telling who else it is shared with. I suspect that > > > the attempt to set the trace is silently failing. > > > > What about pages mmapped MAP_PRIVATE, couldn't the page be copied for > > private use when the breakpoint is set? > > I'm sure it _could_, after all it's just software. However ld.so most > likely maps pages as readonly, so you would have to make some changes > there (to detect whether a program was being debugged etc.), or teach > gdb to change the mappings on shared libraries. I really don't understand all the talk about debugging shared libs... it must be a problem with the updated gcc because under 2.6.3 w/ gdb 4.13 you can debug share libs without a problem... just to make sure I just did it with out a problem... I wish I could tell you more of what I did... but all I did was compile the lib with -g and yes.. the lib (my own cgiparse lib) is linked shared: tmp: -lcgiparse.1 => /usr/local/lib/libcgiparse.so.1.0 (0x801b000) -lc.3 => /usr/lib/libc.so.3.0 (0x802b000) hope this helps id the problem... ttyl... John-Mark gurney_j@efn.org http://resnet.uoregon.edu/~gurney_j/ Modem/FAX: (541) 683-6954 (FreeBSD Box) Live in Peace, destroy Micro$oft, support free software, run FreeBSD (unix)