gdb and dynamic loader namespaces

Mathieu Lacage Mathieu.Lacage@sophia.inria.fr
Mon Jan 8 15:11:00 GMT 2007


hi,

While playing a bit with the dlmopen (this is the stock glibc coming
with a FC5 system) function, it occured to me that gdb 6.6 does not seem
to be able to deal with code loaded in a process through this function.
The attached test program shows that, indeed an extra binary is loaded
in my process address space but gdb seems unable to place a breakpoint
in any of the functions defined in this binary (something like "b
gtk_window_new"). 

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)

I apologize before hand if this email is off-topic,

regards,
Mathieu
-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-csrc
Size: 1209 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb/attachments/20070108/d3fa92a4/attachment.bin>


More information about the Gdb mailing list