Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] gdbtypes.[ch] rs6000-tdep.c--AltiVec regs types
Date: Fri, 11 Jan 2002 15:47:00 -0000	[thread overview]
Message-ID: <3C3F7858.694D1AD8@redhat.com> (raw)
In-Reply-To: <20020111182846.A15924@nevyn.them.org>

Daniel Jacobowitz wrote:
> 
> 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?

I know this is historical (it's been done the same way for other
targets), 
and I'm guessing it's because a struct type can be passed by value,
while
an array type is always passed by reference.  You want a type that can
be passed to a function.

I should know this (I've dealt with it before), but my 
memory cache is shrinking with age and misuse.  ;-(


  reply	other threads:[~2002-01-11 23:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-11 15:20 Elena Zannoni
2002-01-11 15:28 ` Daniel Jacobowitz
2002-01-11 15:47   ` Michael Snyder [this message]
2002-01-11 15:55     ` Daniel Jacobowitz
2002-01-14  8:12     ` Elena Zannoni
2002-01-11 17:04 ` Andrew Cagney
2002-01-11 20:47   ` Elena Zannoni
2002-01-14 16:41 ` Elena Zannoni
2002-01-14 18:13   ` Kevin Buettner
2002-01-15 11:39     ` Elena Zannoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C3F7858.694D1AD8@redhat.com \
    --to=msnyder@redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox