Re: [RFC]: remove inconsistency in printcmd.c: print_scalar_formatted

Daniel Jacobowitz
2004-01-20T01:22:54Z

On Mon, Jan 19, 2004 at 07:41:44PM -0500, Andrew Cagney wrote:
> >On Mon, Jan 19, 2004 at 05:57:04PM -0500, Andrew Cagney wrote:
> >
> >>>Ping. Could we continue discussing this topic and come to some form of
> >>>resolution? The new additional ia64 test failures are annoying.
> >
> >>
> >>I thought there was basic agreement with your change (It sux less then
> >>the current behavior :-). Yes, change it. That way, behavior such as:
> >> (gdb) print/x 1.0
> >>will at least be more consistent.
> >
> >
> >Yeah, I agree, and re-reading Kevin's message I don't think he objects.
> >
> >How do you all feel about a more sweeping change instead:
> >(gdb) set $doublevar = 2.0
> >(gdb) print doublevar
> >$1 = 2.0
> >(gdb) print (int) doublevar
> >$1 = 2
> >(gdb) print/x (int) doublevar
> >$1 = 2
> >(gdb) print/x doublevar
> >$1 = 0xc000000000000000
> >(gdb) print/i doublevar
> >???? [no preference really]
>
> No. That would be wrong. print/<format> prints the value (not the
> implementation) using the specified format. Being able to examine the
> underlying implementation in various formats is more of an "examine"
> command.

Andrew, please explain to us all how you can respond to "I think this
would be a better, different-than-the-current behavior" with "No, that
would be wrong".

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer