Re: [RFA] gdbtypes.[ch] rs6000-tdep.c--AltiVec regs types

Daniel Jacobowitz
2002-01-11T23:28:46Z

On Fri, Jan 11, 2002 at 05:32:45PM -0500, Elena Zannoni wrote:
>
> This patch provides a builtin union type for the AltiVec registers,
> so that the printing of such regs is a bit more enlightening, like:
>
>
> (gdb) p $vr0
> $2 = {uint128 = 0x00000064000000c80000012c00000190,
> v4sf = {f = {1.40129846e-43, 2.80259693e-43, 4.20389539e-43, 5.60519386e-43}},
> v4si = {f = {100, 200, 300, 400}},
> v8hi = {f = {0, 100, 0, 200, 0, 300, 0, 400}},
> v16qi = {f = "\0\0\0d\0\0\0Ãˆ\0\0\001,\0\0\001\220"}}
> (gdb) p $vr0.v4si
> $3 = {f = {100, 200, 300, 400}}
> (gdb) p $vr0.v4si.f[2]
> $4 = 300
> (gdb) p $vr0.v4si.f[2]=444
> $5 = 444

Why is the .f necessary? Why not make $vr0.v4si an array rather than
struct type?

> 2002-01-11 Elena Zannoni <ezannoni@redhat.com>
>
> [Based on work by Jim Blandy]
>
> * rs6000-tdep.c: Declare predifined type for AltiVec registers.

Typo - predefined.

--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer