aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-03-14 22:30:07 +0000
committerPedro Alves <palves@redhat.com>2008-03-14 22:30:07 +0000
commit1fddbabb01cdd8aa6400ca1ff8461259f90ca126 (patch)
tree51bc2ee1527c059adf8a89d580b094e2d15a40ff /gdb/doc
parent29035cbe96305dc7d3a2844fc6c0506de8e23aaf (diff)
downloadgdb-1fddbabb01cdd8aa6400ca1ff8461259f90ca126.zip
gdb-1fddbabb01cdd8aa6400ca1ff8461259f90ca126.tar.gz
gdb-1fddbabb01cdd8aa6400ca1ff8461259f90ca126.tar.bz2
* features/library-list.dtd: Allow "section" elements as children
of "library". Add "section" element and describe its attributes. * solib-target.c (struct lm_info): Add section_bases member. (library_list_start_segment): Error out if seen a section element. (library_list_start_section): New. (library_list_end_library): New. (solib_target_free_library_list): Free section_bases. (section_attributes): New. (library_children): Make "segment" optional. Add "section" child. (library_list_children): Register library_list_end_library. (solib_target_relocate_section_addresses): Handle section bases. * NEWS: Mention new qXfer:libraries:read section offsets support. doc/ * gdb.texinfo (Library List Format): Update to mention the possibility to pass section addresses instead of segment addresses.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog7
-rw-r--r--gdb/doc/gdb.texinfo40
2 files changed, 39 insertions, 8 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 096e284..60b83e9 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,10 @@
+2008-03-14 Pedro Alves <pedro@codesourcery.com>
+ Sandra Loosemore <sandra@codesourcery.com>
+
+ * gdb.texinfo (Library List Format): Update to mention the
+ possibility to pass section addresses instead of segment
+ addresses.
+
2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
* gdb.texinfo (Starting): Document "set exec-wrapper".
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index dbc9efc..9b69ad6 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -23776,8 +23776,8 @@ up to the first @samp{;} or @samp{?} (or the end of the packet).
@item vAttach;@var{pid}
@cindex @samp{vAttach} packet
Attach to a new process with the specified process ID. @var{pid} is a
-hexadecimal integer identifying the process. The attached process is
-stopped.
+hexadecimal integer identifying the process. If the stub is currently
+controlling a process, it is killed. The attached process is stopped.
This packet is only available in extended mode (@pxref{extended mode}).
@@ -23891,7 +23891,7 @@ Run the program @var{filename}, passing it each @var{argument} on its
command line. The file and arguments are hex-encoded strings. If
@var{filename} is an empty string, the stub may use a default program
(e.g.@: the last program run). The program is created in the stopped
-state.
+state. If the stub is currently controlling a process, it is killed.
This packet is only available in extended mode (@pxref{extended mode}).
@@ -26334,10 +26334,15 @@ are loaded.
The @samp{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.
+associated name and one or more segment or section base addresses,
+which report where the library was loaded in memory.
+
+For the common case of libraries that are fully linked binaries, the
+library should have a list of segments. If the target supports
+dynamic linking of a relocatable object file, its library XML element
+should instead include a list of allocated sections. The segment or
+section bases are start addresses, not relocation offsets; they do not
+depend on the library's link-time base addresses.
@value{GDBN} must be linked with the Expat library to support XML
library lists. @xref{Expat}.
@@ -26353,18 +26358,37 @@ offset, looks like this:
</library-list>
@end smallexample
+Another simple memory map, with one loaded library with three
+allocated sections (.text, .data, .bss), looks like this:
+
+@smallexample
+<library-list>
+ <library name="sharedlib.o">
+ <section address="0x10000000"/>
+ <section address="0x20000000"/>
+ <section address="0x30000000"/>
+ </library>
+</library-list>
+@end smallexample
+
The format of a library list is described by this DTD:
@smallexample
<!-- library-list: Root element with versioning -->
<!ELEMENT library-list (library)*>
<!ATTLIST library-list version CDATA #FIXED "1.0">
-<!ELEMENT library (segment)*>
+<!ELEMENT library (segment*, section*)>
<!ATTLIST library name CDATA #REQUIRED>
<!ELEMENT segment EMPTY>
<!ATTLIST segment address CDATA #REQUIRED>
+<!ELEMENT section EMPTY>
+<!ATTLIST section address CDATA #REQUIRED>
@end smallexample
+In addition, segments and section descriptors cannot be mixed within a
+single library element, and you must supply at least one segment or
+section for each library.
+
@node Memory Map Format
@section Memory Map Format
@cindex memory map format