Re: Printing decimal128 types out of registers

Daniel Jacobowitz
2008-01-23T15:20:40Z

On Wed, Jan 23, 2008 at 01:10:38PM -0200, Thiago Jung Bauermann wrote:
> > So I suggest we not have $dl0 except on
> > hardware where the GDB user might look at the next instruction, see
> > that it operates on register dl0, and want to check the value of that
> > register.
>
> That would be the Power6 processor. In Linux, I can make the distinction
> using the auxiliary vector:
>
> AT_PLATFORM: power6
>
> Or even better:
>
> AT_HWCAP: dfp arch_2_05 ic_snoop smt mmu fpu altivec ppc64 ppc32
>
> I don't know if this would work for other OSs (and I don't know if other
> OSs have or will have DFP support). Is this a good method to determine
> when to show the pseudo registers?

Here's one (of many) possible ways you could do it. Define an
appropriate property in an XML file for Power6, and add that to the
list of built-in descriptions just like the existing ones. In
ppc-linux-nat.c and in gdbserver, check the auxv vector for the
dfp capability. If it's present, return the Power6 description.
Other non-Linux targets can handle this in the appropriate way
for each target.

For the gdbserver part you'd probably want to wait until Ulrich's
biarch patches go in; that may simplify it.

If this is too complicated, I wouldn't argue against a patch that just
added them if the floating point regsiters are present. Seems like it
won't be useful on a lot of processors though.

--
Daniel Jacobowitz
CodeSourcery