From: Paul Gilliam <pgilliam@us.ibm.com>
To: gdb@sources.redhat.com
Subject: accessing altivec registers on ppc64
Date: Wed, 10 Aug 2005 21:44:00 -0000 [thread overview]
Message-ID: <200508101512.38042.pgilliam@us.ibm.com> (raw)
On a GNU/linux system with kernel version 2.6.5-7.97-pmac64, I can't access the value in an altivec register.
This is using close to the latest CVS head version of GDB as a native debugger on an apple G5 running SuSE SLES 9.
In digging through the sources, I found the following in the function fetch_ppc_registers at line 487 of ppc-linux-nat.c:
if (have_ptrace_getvrregs)
if (tdep->ppc_vr0_regnum != -1 && tdep->ppc_vrsave_regnum != -1)
fetch_altivec_registers (tid);
have_ptrace_getvrregs is initialized to 1 and set to 0 only if a ptrace using PTRACE_GETVRREGS fails.
tdep->ppc_vr0_regnum and ppc_vrsave_regnum are set in rs6000_gdbarch_init(), in a switch statement at line 3217 of file rs6000-tdep.c,
depending on the value of v->mach. I my case, that value is 64 == bfd_mach_ppc64 so they are set to -1 and altivec registers are not fetched.
But if I seperate out that case and make it assign values as the bfd_mach_ppc case does, fetch_altivec_registers is still not called.
Does anyone know what's going on?
On a related topic:
When I do 'info vector', I get the first 31 general-purpose registers (r0 thru r30, but no r31) followed by the vector registers.
Any idea why the first 31 GP regs are inlcuded?
-=# Paul Gilliam #=-
reply other threads:[~2005-08-10 21:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200508101512.38042.pgilliam@us.ibm.com \
--to=pgilliam@us.ibm.com \
--cc=gdb@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).