This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Changes to signed char and unsigned char handling


> Date: Fri, 6 Jul 2007 17:34:08 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: gdb-patches@sourceware.org
> 
> > 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.

Well, maybe we should ask for his opinion on your suggested patch.

> > 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}.

Aha, I see that I was doubly confused.  So maybe this is more clear
yet:

   in fact, @code{display} decides
   whether to use @code{print} or @code{x} depending on your format
   specification---it uses @code{x} if you specify either the @samp{i}
   or @samp{s} format, or a unit size; otherwise it uses @code{print}.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]