Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] allow gdb to access altivec registers
@ 2005-10-17 20:31 Paul Gilliam
  2005-10-17 21:05 ` Mark Kettenis
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Gilliam @ 2005-10-17 20:31 UTC (permalink / raw)
  To: gdb-patches

In rs6000-tdep.c (rs6000_gdbarch_init), bfd_mach_ppc64 is assumed to NOT have
altivec registers.

This patch makes it assume that it does.  This works for machines with the
IBM PowerPC 970 chip, an IBM JS-20 or Apple G5 for example.

If the bfd_mach_ppc64 should happen to NOT have an altivec unit, the ptrace
to get the vector registers will fail the first time it's called and it will
never be called again.

Here's the patch:

2005-10-17  Paul Gilliam  <pgilliam@us.ibm.com>

	* rs6000-tdep.c (rs6000_gdbarch_init): Assume that bfd_mach_ppc64 has
	altivec unit, just like bfd_mach_ppc.

Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.246
diff -a -u -p -r1.246 rs6000-tdep.c
--- rs6000-tdep.c       14 Oct 2005 20:17:11 -0000      1.246
+++ rs6000-tdep.c       17 Oct 2005 20:16:51 -0000
@@ -3240,6 +3240,7 @@ rs6000_gdbarch_init (struct gdbarch_info
     switch (v->mach)
       {
       case bfd_mach_ppc:
+      case bfd_mach_ppc64:
         tdep->ppc_sr0_regnum = -1;
        tdep->ppc_vr0_regnum = 71;
        tdep->ppc_vrsave_regnum = 104;
@@ -3263,7 +3264,6 @@ rs6000_gdbarch_init (struct gdbarch_info
         set_gdbarch_register_reggroup_p (gdbarch, e500_register_reggroup_p);
        break;

-      case bfd_mach_ppc64:
       case bfd_mach_ppc_620:
       case bfd_mach_ppc_630:
       case bfd_mach_ppc_a35:


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-11-02 20:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-17 20:31 [PATCH] allow gdb to access altivec registers Paul Gilliam
2005-10-17 21:05 ` Mark Kettenis
2005-10-17 21:06   ` Daniel Jacobowitz
2005-10-21 22:46     ` Paul Gilliam
2005-10-27  9:46       ` Kevin Buettner
2005-10-31 22:51         ` [PATCH] allow gdb to access altivec registers - OK to commit? Paul Gilliam
2005-11-01  0:27           ` Andreas Schwab
2005-11-02 20:44           ` Kevin Buettner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox