This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb and dynamic loader namespaces
- From: Daniel Jacobowitz <drow at false dot org>
- To: Mathieu Lacage <Mathieu dot Lacage at sophia dot inria dot fr>
- Cc: gdb at sourceware dot org
- Date: Mon, 8 Jan 2007 10:15:10 -0500
- Subject: Re: gdb and dynamic loader namespaces
- References: <1168268998.21818.44.camel@garfield.inria.fr>
On Mon, Jan 08, 2007 at 04:09:58PM +0100, Mathieu Lacage wrote:
> So, I tried to figure out how I could fix this in gdb: a bit of
> debugging shows that gdb is notified of dlmopen calls through the
> r_debug structure since "set stop-on-solib-events 1" triggers correctly
> an event upon dlmopen. The question then is why gdb does not add the new
> binary to its map. Maybe someone more knowledgeable than me about the
> layout of the gdb code source could point me to the piece of code which
> updates and manipulates the gdb map of binaries used during symbol
> lookup ? (I am using an x86 linux system)
It's in solib-svr4.c. Look especially at current_sos and compare that
to where glibc adds things in namespaces. I doubt they're on the same
list, and in fact they may not even be listed in the public part of
struct r_debug.
I'm not sure what gdb would really do with them either. It doesn't
support multiple namespaces of symbols.
--
Daniel Jacobowitz
CodeSourcery