This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [doc] Remote protocol: undocumented return value for 'p' and 'g'
- From: Pedro Alves <pedro at codesourcery dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 23 Dec 2010 20:30:15 +0000
- Subject: Re: [doc] Remote protocol: undocumented return value for 'p' and 'g'
- References: <201012231913.08466.pedro@codesourcery.com> <83sjxoe0ac.fsf@gnu.org>
On Thursday 23 December 2010 19:50:35, Eli Zaretskii wrote:
> > From: Pedro Alves <pedro@codesourcery.com>
> > Okay to apply?
>
> Yes, thanks.
>
> > +literal @samp{x}'s in place of the register data digits, to indicate
> > +the corresponding register has not been collected, thus its value is
>
> "... to indicate that the corresponding register ..."
>
> > +registers 0 and 2 have not been collected, while registers 1 and 3
> > +have been collected, and have value zero each:
> ^^^^^^^^^^^^^^^^^^^^^^^^
> "and both have zero value"
>
Thanks! Applied, as below.
--
Pedro Alves
2010-12-23 Pedro Alves <pedro@codesourcery.com>
gdb/doc/
* gdb.texinfo (Packets) <read registers packet>: Document support
for registers that were not collected.
---
gdb/doc/gdb.texinfo | 15 +++++++++++++++
1 file changed, 15 insertions(+)
Index: src/gdb/doc/gdb.texinfo
===================================================================
--- src.orig/gdb/doc/gdb.texinfo 2010-12-23 20:22:59.000000000 +0000
+++ src/gdb/doc/gdb.texinfo 2010-12-23 20:26:07.000000000 +0000
@@ -31815,6 +31815,21 @@ each register and their position within
determined by the @value{GDBN} internal gdbarch functions
@code{DEPRECATED_REGISTER_RAW_SIZE} and @code{gdbarch_register_name}. The
specification of several standard @samp{g} packets is specified below.
+
+When reading registers from a trace frame (@pxref{Analyze Collected
+Data,,Using the Collected Data}), the stub may also return a string of
+literal @samp{x}'s in place of the register data digits, to indicate
+that the corresponding register has not been collected, thus its value
+is unavailable. For example, for an architecture with 4 registers of
+4 bytes each, the following reply indicates to @value{GDBN} that
+registers 0 and 2 have not been collected, while registers 1 and 3
+have been collected, and both have zero value:
+
+@smallexample
+-> @code{g}
+<- @code{xxxxxxxx00000000xxxxxxxx00000000}
+@end smallexample
+
@item E @var{NN}
for an error.
@end table