Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Oct 1996 17:04:26 +0200 (MET DST)
From:      Greg Lehey <grog@lemis.de>
To:        msmith@atrad.adelaide.edu.au (Michael Smith)
Cc:        FreeBSD-current@FreeBSD.ORG (FreeBSD current users)
Subject:   Re: kern/1848: breakpoints in shared libraries don't fire
Message-ID:  <199610201504.RAA13043@freebie.lemis.de>
In-Reply-To: <199610201432.AAA01800@genesis.atrad.adelaide.edu.au> from Michael Smith at "Oct 21, 96 00:02:49 am"

next in thread | previous in thread | raw e-mail | index | archive | help
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




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