From owner-freebsd-current Sun Oct 20 08:56:47 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA27587 for current-outgoing; Sun, 20 Oct 1996 08:56:47 -0700 (PDT) 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 IAA27575 for ; Sun, 20 Oct 1996 08:56:43 -0700 (PDT) From: Greg Lehey Received: from freebie.lemis.de by diablo.ppp.de with smtp (Smail3.1.28.1 #1) id m0vF0Eq-000QoQC; Sun, 20 Oct 96 16:56 MET Received: (grog@localhost) by freebie.lemis.de (8.8.2/8.6.12) id RAA13043; Sun, 20 Oct 1996 17:04:26 +0200 (MET DST) Organisation: LEMIS, Schellnhausen 2, 36325 Feldatal, Germany Phone: +49-6637-919123 Fax: +49-6637-919122 Message-Id: <199610201504.RAA13043@freebie.lemis.de> Subject: Re: kern/1848: breakpoints in shared libraries don't fire In-Reply-To: <199610201432.AAA01800@genesis.atrad.adelaide.edu.au> from Michael Smith at "Oct 21, 96 00:02:49 am" To: msmith@atrad.adelaide.edu.au (Michael Smith) Date: Sun, 20 Oct 1996 17:04:26 +0200 (MET DST) Cc: FreeBSD-current@FreeBSD.ORG (FreeBSD current users) X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Michael Smith writes: > Douglas Thomas Crosher stands accused of saying: Well, no, it was I. >>> 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. What's wrong with the PID? > I suspect that the attempt to set the trace is silently failing. Possibly. But it works in other systems (such as BSD/OS), so it's not as simple as that. I can see two ways to solve the problem, in order of decreasing desirability: 1. If a process sets a breakpoint in shared text, create a new segment with a copy of the text, and allocate it to this process only. 2. If a process sets a breakpoint in shared text, store information about the process, and only honour the breakpoint when it occurs in this process' context. This is less desirable, since it slows down other processes as well. Greg