This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [RFC] Allow explicit 16 or 32 char in 'x /s'
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Eli Zaretskii'" <eliz at gnu dot org>
- Cc: <gdb-patches at sourceware dot org>
- Date: Thu, 18 Mar 2010 13:56:42 +0100
- Subject: RE: [RFC] Allow explicit 16 or 32 char in 'x /s'
- References: <000f01cac623$2ec3a850$8c4af8f0$@muller@ics-cnrs.unistra.fr> <E1Ns9je-0003cA-V7@fencepost.gnu.org>
> -----Message d'origine-----
> De?: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Eli Zaretskii
> Envoyé?: Thursday, March 18, 2010 8:02 AM
> À?: Pierre Muller
> Cc?: gdb-patches@sourceware.org
> Objet?: Re: [RFC] Allow explicit 16 or 32 char in 'x /s'
>
> > From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
> > Date: Wed, 17 Mar 2010 23:42:53 +0100
> >
> >
> > The patch below allows to
> > print strings that are made of 16 bit or 32 bit char
> > using:
> > 'x /hs ' or 'x /ws ' commands.
>
> Thanks. If this patch is accepted, we will need a suitable change for
> the manual.
How about this change?
Pierre
doc/ChangeLog entry:
2010-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
* gdbint.texinfo (Examining memory): Update for
change in string display with explicit size.
Index: doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.680
diff -u -p -r1.680 gdb.texinfo
--- doc/gdb.texinfo 12 Mar 2010 19:15:52 -0000 1.680
+++ doc/gdb.texinfo 18 Mar 2010 12:50:15 -0000
@@ -7232,8 +7232,11 @@ Giant words (eight bytes).
@end table
Each time you specify a unit size with @code{x}, that size becomes the
-default unit the next time you use @code{x}. (For the @samp{s} and
-@samp{i} formats, the unit size is ignored and is normally not written.)
+default unit the next time you use @code{x}. For the @samp{i} format,
+the unit size is ignored and is normally not written. For the @samp{s}
format,
+the unit size defaults to @samp{b}, unless it is explicitly given.
+Ue @code{x /hs} to display 16-bit char strings and @code{x /ws} to display
+32-bit strings. The next use of @code{x /s} will still display 8-bit
strings.
@item @var{addr}, starting display address
@var{addr} is the address where you want @value{GDBN} to begin displaying