This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb-6.6, faking a shared library


On Wed, Nov 29, 2006 at 10:44:06AM -0500, jbbachky@aim.com wrote:
> What I'm calling a shared library is a subset of glibc which gets 
> linked/mapped to a specific address, and the programs which "link 
> against it" really link against fixed addresses, thus no dynamic 
> linking is involved. Special startup code is used to map the library's 
> addresses for each process which need it. However, since gdb knows 
> nothing about it being shared among other processes (not simply other 
> pthreads sharing the same memory map), bad things happen when a 
> breakpoint in that library is hit by another process.

It won't help you to tell GDB that it's a shared library; GDB inserts
breakpoints in shared libraries the same way it does anywhere else.
The debug agent is usually responsible for handling places which need
special breakpoint handling.  I think you'd need the kernel to do
breakpoint insertion/removal at context switches in the case you've
described.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]