This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] print/x of a float/double should printf ("%a")
- From: Daniel Jacobowitz <drow at false dot org>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches at sourceware dot org
- Date: Sun, 18 Feb 2007 15:34:10 -0500
- Subject: Re: [RFC] print/x of a float/double should printf ("%a")
- References: <20070218153705.GA25940@host0.dyn.jankratochvil.net> <uirdzjjql.fsf@gnu.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.
The current behavior is "print/x (long) val", which I consider to be
silly. I can't recall ever typing p/x on a float value and expecting
to get a result rounded to no decimal places.
--
Daniel Jacobowitz
CodeSourcery