From f5aecab85d670ae338556b5ef702787502796759 Mon Sep 17 00:00:00 2001 From: Paul Gilliam Date: Tue, 1 Nov 2005 19:32:36 +0000 Subject: [PATCH] * rs6000-tdep.c (rs6000_gdbarch_init): On GNU/Linux, assume that bfd_mach_ppc64 has altivec unit, just like bfd_mach_ppc. --- gdb/ChangeLog | 5 +++++ gdb/rs6000-tdep.c | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 769139d2b6..7433f6259e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2005-11-01 Paul Gilliam + + * rs6000-tdep.c (rs6000_gdbarch_init): On GNU/Linux, assume that + bfd_mach_ppc64 has altivec unit, just like bfd_mach_ppc. + 2005-11-01 Andrew Stubbs * tui/tui-data.h (tui_line_or_address): Encapsulate the union in a diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 89aa6e3502..adfb945d05 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); -- 2.34.1