Date: Sun, 20 Oct 1996 22:26:22 -0700 (PDT) From: John-Mark Gurney <jmg@nike.efn.org> To: Michael Smith <msmith@atrad.adelaide.edu.au> Cc: Douglas Thomas Crosher <dtc@scrooge.ee.swin.oz.au>, freebsd-current@FreeBSD.org Subject: Re: kern/1848: breakpoints in shared libraries don't fire Message-ID: <Pine.NEB.3.95.961020222007.293A-100000@nike> In-Reply-To: <199610210204.LAA04119@genesis.atrad.adelaide.edu.au>
next in thread | previous in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.95.961020222007.293A-100000>