This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Printing decimal128 types out of registers
> From: Thiago Jung Bauermann <bauerman@br.ibm.com>
> Date: Mon, 21 Jan 2008 12:54:34 -0200
>
> I was talking to Luis about this, and he suggested an approach other
> than using pseudo registers: create a way to make GDB consider two
> consecutive registers as contiguous data. Since there are other types
> that are also passed in consecutive registers (e.g., long long,
> soft-float, IBM lon double), this mechanism would be more useful. I
> think this is a good idea.
There's nothing wrong with the pseudo-register approach. In fact it
is used on many other architectures. For example sparc64, where pairs
of single-precision floating point numbers are used for
double-precision, and four registers are used for quadruple precision.
And on i386 we have the MMX registers that provide a different view on
the floating-point registers. I only think adding the whole tdesc
machinery around it is a bit too much.
Now PowerPC assembler is silly, and alows you to specify registers by
number instead of names. But most people actually rN for the general
purpose registers and fN for the floating-point registers. If dlN is
a widely accepted name for the decimal float registers, I think those
registers should be added.
> Perhaps some syntax could be created, like:
>
> (gdb) print {_Decimal128} $f2,$f3
> $1 = 1.2
>
> What do you think?
I'm not sure how this would fit into the expression parser. t might
get really ugly.