Allow section offsets instead of segment offsets (qXfer:libraries:read+)

Pedro Alves pedro@codesourcery.com
Tue Feb 26 19:38:00 GMT 2008


Hi,

We're working with a target where to access the list of loaded
libraries, we have to use a target side debug API.  Well, that's
what solib-target.c is for, so we can use that.  But in order
to do that, we needed the changes shown in this patch.

Currenly, in the qXfer:libraries:read+ support, GDB expects the
target to pass a list of segment load bases per library.
This target's shared objects are relocatable objects, not
fully linked binaries.  There are no program headers in them,
and no segments to pass along.  Instead, the loader loads
each allocatable section at arbitrary addresses.

This patch adds the support to this kind of target, by enhancing
the library-list xml to enable passing a list of section offsets
instead of segment offsets per library, and adds the solib-target.c
side bits to handle it.

Tested with a native i686-pc-cygwin gdbserver, to ensure the
current support didn't break.

Patch + docs + NEWS entry below.

-- 
Pedro Alves
-------------- next part --------------
A non-text attachment was scrubbed...
Name: solib_target_sections.diff
Type: text/x-diff
Size: 14010 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20080226/9bb97f75/attachment.bin>


More information about the Gdb-patches mailing list