manpagez: man pages & more
info gdb
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

D.10 Library List Format

On some platforms, a dynamic loader (e.g. ‘ld.so’) runs in the same process as your application to manage libraries. In this case, No value for GDBN can use the loader's symbol table and normal memory operations to maintain a list of shared libraries. On other platforms, the operating system manages loaded libraries. No value for GDBN can not retrieve the list of currently loaded libraries through memory operations, so it uses the ‘qXfer:libraries:read’ packet (see qXfer library list read) instead. The remote stub queries the target's operating system and reports which libraries are loaded.

The ‘qXfer:libraries:read’ packet returns an XML document which lists loaded libraries and their offsets. Each library has an associated name and one or more segment base addresses, which report where the library was loaded in memory. The segment bases are start addresses, not relocation offsets; they do not depend on the library's link-time base addresses.

A simple memory map, with one loaded library relocated by a single offset, looks like this:

 
<library-list>
  <library name="/lib/libc.so.6">
    <segment address="0x10000000"/>
  </library>
</library-list>

The format of a library list is described by this DTD:

 
<!-- library-list: Root element with versioning -->
<!ELEMENT library-list  (library)*>
<!ATTLIST library-list  version CDATA   #FIXED  "1.0">
<!ELEMENT library       (segment)*>
<!ATTLIST library       name    CDATA   #REQUIRED>
<!ELEMENT segment       EMPTY>
<!ATTLIST segment       address CDATA   #REQUIRED>

© manpagez.com 2000-2017
Individual documents may contain additional copyright information.