This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Changes to signed char and unsigned char handling
- From: Daniel Jacobowitz <drow at false dot org>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 6 Jul 2007 17:34:08 -0400
- Subject: Re: [RFC] Changes to signed char and unsigned char handling
- References: <20070705135402.GA4300@caradoc.them.org> <ufy41ddor.fsf@gnu.org>
On Fri, Jul 06, 2007 at 01:33:24PM +0300, Eli Zaretskii wrote:
> > Date: Thu, 5 Jul 2007 09:54:02 -0400
> > From: Daniel Jacobowitz <drow@false.org>
> >
> > 3. Treat "char" as a character, but "unsigned char" and "signed char"
> > as numbers
>
> Didn't RMS object to this change?
His objection was to the original change, which is currently in HEAD,
to not print "unsigned char *" variables as strings. It was not an
especially definitive objection; I think that this version is better
than the behavior of earlier versions of GDB, which would satisfy his
stated concern.
I'm willing to change my mind on the approach; that's why it's an RFC
:-)
> The changes for the manual are also okay, but I have a few
> comments/requests:
Thank you, as usual. I will incorporate your suggestions.
> > @@ -5932,8 +5946,7 @@ displays you request manually using @cod
> > specify the output format you prefer; in fact, @code{display} decides
> > whether to use @code{print} or @code{x} depending on how elaborate your
> > format specification is---it uses @code{x} if you specify a unit size,
> > -or one of the two formats (@samp{i} and @samp{s}) that are only
> > -supported by @code{x}; otherwise it uses @code{print}.
> > +the @samp{i} format, or the @samp{s} format; otherwise it uses @code{print}.
>
> This change produces a sentence that is hard to parse:
>
> in fact, @code{display} decides
> whether to use @code{print} or @code{x} depending on how elaborate your
> format specification is---it uses @code{x} if you specify a unit size,
> the @samp{i} format, or the @samp{s} format; otherwise it uses @code{print}.
>
> The conditions under which `x' is used are described, but the
> conditions under which we use `i' or `s' are left unspecified.
We don't use `i' or `s'; the use of `i' or `s' in the user's format
specification causes `display' to behave like `examine' instead of
like `print'. How is this?
in fact, @code{display} decides
whether to use @code{print} or @code{x} depending on your format
specification---@code{display} uses @code{x} if you specify a unit size,
the @samp{i} format, or the @samp{s} format; otherwise it uses @code{print}.
--
Daniel Jacobowitz
CodeSourcery