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] print/x of a float/double should printf ("%a")


> Date: Sun, 18 Feb 2007 15:34:10 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: Jan Kratochvil <jan.kratochvil@redhat.com>, gdb-patches@sourceware.org
> 
> On Sun, Feb 18, 2007 at 10:25:54PM +0200, Eli Zaretskii wrote:
> >   . I don't like this bit:
> > 
> > > Systems not supporting "%a" will print the value as
> > > 	print (float) a
> > > which differs from the current way there:
> > > 	print/x (long) a
> > 
> > This makes this an incompatible change.  For this reason, I'd prefer a
> > new format letter, like Andreas suggested.
> 
> Is that the only reason you prefer a new format letter, rather than
> changing 'x'?  We could make it work everywhere - it would just be a
> bit of work, probably by adding appropriate bits to gnulib.  I'll
> even volunteer to do it.

That'd be fine with me, but do we really want a deviation from past
behavior?  How do we know no one out there depends on it?

> The current behavior is "print/x (long) val", which I consider to be
> silly.

I don't think it's so silly, but I cannot say I care for it too much,
either.  My main concern is to avoid gratuitous breakage of someone's
.gdbinit.

> I can't recall ever typing p/x on a float value and expecting
> to get a result rounded to no decimal places.

Me neither.


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