Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Oct 1996 11:34:15 +0930 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        dtc@scrooge.ee.swin.oz.au (Douglas Thomas Crosher)
Cc:        msmith@atrad.adelaide.edu.au, freebsd-current@freebsd.org
Subject:   Re: kern/1848: breakpoints in shared libraries don't fire
Message-ID:  <199610210204.LAA04119@genesis.atrad.adelaide.edu.au>
In-Reply-To: <199610201502.BAA17461@scrooge.ee.swin.oz.au> from "Douglas Thomas Crosher" at Oct 21, 96 01:02:22 am

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

> Douglas Crosher

-- 
]] Mike Smith, Software Engineer        msmith@atrad.adelaide.edu.au    [[
]] Genesis Software                     genesis@atrad.adelaide.edu.au   [[
]] High-speed data acquisition and      (GSM mobile)  <STOLEN>          [[
]] realtime instrument control          (ph/fax)  +61-8-8267-3493       [[
]] Collector of old Unix hardware.      "Where are your PEZ?" The Tick  [[



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