summaryrefslogtreecommitdiff
path: root/gdb/rs6000-tdep.c
diff options
context:
space:
mode:
authorPaul Gilliam <pgilliam@us.ibm.com>2005-11-01 19:32:36 +0000
committerPaul Gilliam <pgilliam@us.ibm.com>2005-11-01 19:32:36 +0000
commit965177b4861a11a98707605238fc0a85e29b7625 (patch)
treeb931c04008f18bd77c8c18ab7b01bc54f1d9dddc /gdb/rs6000-tdep.c
parent5a77dc52950c60f2b595fc4a3d55992dfdbe2058 (diff)
downloadgdb-965177b4861a11a98707605238fc0a85e29b7625.tar.gz
* rs6000-tdep.c (rs6000_gdbarch_init): On GNU/Linux, assume that
bfd_mach_ppc64 has altivec unit, just like bfd_mach_ppc.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r--gdb/rs6000-tdep.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 89aa6e35021..adfb945d056 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -3376,10 +3376,21 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
switch (info.osabi)
{
+ case GDB_OSABI_LINUX:
+ /* FIXME: pgilliam/2005-10-21: Assume all PowerPC 64-bit linux systems
+ have altivec registers. If not, ptrace will fail the first time it's
+ called to access one and will not be called again. This wart will
+ be removed when Daniel Jacobowitz's proposal for autodetecting target
+ registers is implemented. */
+ if ((v->arch == bfd_arch_powerpc) && ((v->mach)== bfd_mach_ppc64))
+ {
+ tdep->ppc_vr0_regnum = 71;
+ tdep->ppc_vrsave_regnum = 104;
+ }
+ /* Fall Thru */
case GDB_OSABI_NETBSD_AOUT:
case GDB_OSABI_NETBSD_ELF:
case GDB_OSABI_UNKNOWN:
- case GDB_OSABI_LINUX:
set_gdbarch_unwind_pc (gdbarch, rs6000_unwind_pc);
frame_unwind_append_sniffer (gdbarch, rs6000_frame_sniffer);
set_gdbarch_unwind_dummy_id (gdbarch, rs6000_unwind_dummy_id);