Next: , Previous: , Up: Remote Protocol   [Contents][Index]

E.16 Library List Format for SVR4 Targets

On SVR4 platforms GDB can use the symbol table of a dynamic loader (e.g. and normal memory operations to maintain a list of shared libraries. Still a special library list provided by this packet is more efficient for the GDB remote protocol.

The ‘qXfer:libraries-svr4:read’ packet returns an XML document which lists loaded libraries and their SVR4 linker parameters. For each library on SVR4 target, the following parameters are reported:

Additionally the single main-lm attribute specifies address of struct link_map used for the main executable. This parameter is used for TLS access and its presence is optional.

GDB must be linked with the Expat library to support XML SVR4 library lists. See Expat.

A simple memory map, with two loaded libraries (which do not use prelink), looks like this:

<library-list-svr4 version="1.0" main-lm="0xe4f8f8">
  <library name="/lib/" lm="0xe4f51c" l_addr="0xe2d000"
           l_ld="0xe4eefc" lmid="0xfffe0"/>
  <library name="/lib/" lm="0xe4fbe8" l_addr="0x154000"
           l_ld="0x152350" lmid="0xfffe0"/>

The format of an SVR4 library list is described by this DTD:

<!-- library-list-svr4: Root element with versioning -->
<!ELEMENT library-list-svr4  (library)*>
<!ATTLIST library-list-svr4  version CDATA   #FIXED  "1.0">
<!ATTLIST library-list-svr4  main-lm CDATA   #IMPLIED>
<!ELEMENT library            EMPTY>
<!ATTLIST library            name    CDATA   #REQUIRED>
<!ATTLIST library            lm      CDATA   #REQUIRED>
<!ATTLIST library            l_addr  CDATA   #REQUIRED>
<!ATTLIST library            l_ld    CDATA   #REQUIRED>
<!ATTLIST library            lmid    CDATA   #IMPLIED>

Next: , Previous: , Up: Remote Protocol   [Contents][Index]