aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2022-03-15 18:08:06 +0100
committerMarkus Metzger <markus.t.metzger@intel.com>2022-10-18 14:16:09 +0200
commit2733d9d5d62c62023dc2d7a93fa5afa22f386ffd (patch)
tree0f300db4630b2472d9187e3a89e0c0ae5dc6ca8e /gdb/doc
parentad10f44e568806c2399f9405f4588f3e27f7d9ae (diff)
downloadfsf-binutils-gdb-2733d9d5d62c62023dc2d7a93fa5afa22f386ffd.zip
fsf-binutils-gdb-2733d9d5d62c62023dc2d7a93fa5afa22f386ffd.tar.gz
fsf-binutils-gdb-2733d9d5d62c62023dc2d7a93fa5afa22f386ffd.tar.bz2
gdb, gdbserver: extend RSP to support namespaces
Introduce a new qXfer:libraries-svr4:read annex key/value pair lmid=<namespace identifier> to be used together with start and prev to provide the namespace of start and prev to gdbserver. Unknown key/value pairs are ignored by gdbserver so no new supports check is needed. Introduce a new library-list-svr4 library attribute lmid to provide the namespace of a library entry to GDB. This implementation uses the address of a namespace's r_debug object as namespace identifier. This should have incremented the minor version but since unknown XML attributes are ignored, anyway, and since changing the version results in a warning from GDB, the version is left at 1.0.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/gdb.texinfo16
1 files changed, 14 insertions, 2 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 3de511a..ea66f4e 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -43706,6 +43706,12 @@ specified by the @samp{start} argument. If unset or zero then
the remote stub will expect that no @samp{struct link_map}
exists prior to the starting point.
+@item lmid=@var{lmid}
+A hexadecimal number specifying a namespace identifier. This is
+currently only used together with @samp{start} to provide the
+namespace identifier back to @value{GDBN} in the response.
+@value{GDBN} will only provide values that were previously reported to
+it. If unset, the response will include @samp{lmid="0x0"}.
@end table
Arguments that are not understood by the remote stub will be silently
@@ -46244,6 +46250,11 @@ memory address. It is a displacement of absolute memory address against
address the file was prelinked to during the library load.
@item
@code{l_ld}, which is memory address of the @code{PT_DYNAMIC} segment
+@item
+@code{lmid}, which is an identifier for a linker namespace, such as
+the memory address of the @code{r_debug} object that contains this
+namespace's load map or the namespace identifier returned by
+@code{dlinfo (3)}.
@end itemize
Additionally the single @code{main-lm} attribute specifies address of
@@ -46259,9 +46270,9 @@ looks like this:
@smallexample
<library-list-svr4 version="1.0" main-lm="0xe4f8f8">
<library name="/lib/ld-linux.so.2" lm="0xe4f51c" l_addr="0xe2d000"
- l_ld="0xe4eefc"/>
+ l_ld="0xe4eefc" lmid="0xfffe0"/>
<library name="/lib/libc.so.6" lm="0xe4fbe8" l_addr="0x154000"
- l_ld="0x152350"/>
+ l_ld="0x152350" lmid="0xfffe0"/>
</library-list-svr>
@end smallexample
@@ -46277,6 +46288,7 @@ The format of an SVR4 library list is described by this DTD:
<!ATTLIST library lm CDATA #REQUIRED>
<!ATTLIST library l_addr CDATA #REQUIRED>
<!ATTLIST library l_ld CDATA #REQUIRED>
+<!ATTLIST library lmid CDATA #IMPLIED>
@end smallexample
@node Memory Map Format