[rfc][1/3] gdbserver bi-arch support: rename init_registers

Ulrich Weigand uweigand@de.ibm.com
Mon Jan 21 17:45:00 GMT 2008


Hello,

this patch is the first step in making gdbserver bi-arch capable.

Currently, every register data file generated from regformats defines
a function called "init_registers", which makes it impossible to link
multiple different register format descriptions into a single gdbserver
executable.

This patch solves this problem by changing the name of this function
to depend on the "name" field of the register format.  (There were
three instances where two regformats file used the same "name"; 
these are also fixed.)  Note that this patch does not actually use
the new capability to link multiple register format files into a
single executable; this will be done by follow-on patches.

The corresponding change in gdbserver is straightforward, but a bit
tedious.  gdbserver currently calls init_registers in the target's
initialize_low routine (linux-low.c, win32-low.c, or spu-low.c).

As at this point we do not actually know which register format to
use (except in the spu-low.c case), the linux and win32 targets have
to delegate the init_registers call to the low target.  To this
purpose I've added a new arch_setup callback to the the_low_target
structure.  As this is now mandatory, I've added it as first element.

The rest of the patch is simply adapting all the low targets to
call the appropriate init_registers_... routine.  In most cases 
this is straightforward, but there are some linux-...-low.c files
that are used alternately with different register format files.
This patch adds conditional compilation that matches the tests
used in the configure scripts to make sure the proper version is
selected.

(Note that a goal of the new setup is to make it possible to change
these compile-time checks into run-time checks.  This is not yet
done in this patch, though.)

At this point, I've only tested the patch on s390 and s390x.  If we
can agree on this approach, I'll try to test a number of other
platforms as well ...

I'd appreciate feed back whether this is the right way to go
(and of course tests on different platforms).

The two follow-on patches I'm posting together with this patch
show that this approach does indeed allow to implement working
bi-arch support, using s390/s390x as example.

Bye,
Ulrich


gdb/ChangeLog:

	* regformats/regdat.sh: Rename init_registers function in
	generated file to init_registers_${name}.

	* regformats/reg-crisv32.dat: Set "name" to crisv32.
	* regformats/reg-ppc64.dat: Set "name" to ppc64.
	* regformats/reg-s390x.dat: Set "name" to s390x.

gdbserver/ChangeLog:

	* server.h (init_registers): Remove prototype.

	* linux-low.h (struct linux_target_ops): Add arch_setup field.
	* linux-low.c (initialize_low): Call the_low_target.arch_setup ()
	instead of init_registers ().
	* linux-arm-low.c (init_registers_arm): Add prototype.
	(init_registers_arm_with_iwmmxt): Likewise.
	(the_low_target): Add initializer for arch_setup field.
	* linux-cris-low.c (init_registers_cris): Add prototype.
	(the_low_target): Add initializer for arch_setup field.
	* linux-crisv32-low.c (init_registers_crisv32): Add prototype.
	(the_low_target): Add initializer for arch_setup field.
	* linux-i386-low.c (init_registers_i386_linux): Add prototype.
	(the_low_target): Add initializer for arch_setup field.
	* linux-ia64-low.c (init_registers_ia64): Add prototype.
	(the_low_target): Add initializer for arch_setup field.
	* linux-m32r-low.c (init_registers_m32r): Add prototype.
	(the_low_target): Add initializer for arch_setup field.
	* linux-m68k-low.c (init_registers_m68k): Add prototype.
	(the_low_target): Add initializer for arch_setup field.
	* linux-mips-low.c (init_registers_mips_linux): Add prototype.
	(init_registers_mips64_linux): Likewise.
	(the_low_target): Add initializer for arch_setup field.
	* linux-ppc-low.c (init_registers_ppc): Add prototype.
	(init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
	(the_low_target): Add initializer for arch_setup field.
	* linux-ppc64-low.c (init_registers_ppc64): Add prototype.
	(init_registers_powerpc_64): Likewise.
	(the_low_target): Add initializer for arch_setup field.
	* linux-s390-low.c (init_registers_s390): Add prototype.
	(init_registers_s390x): Likewise.
	(the_low_target): Add initializer for arch_setup field.
	* linux-sh-low.c (init_registers_sh): Add prototype.
	(the_low_target): Add initializer for arch_setup field.
	* linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
	(the_low_target): Add initializer for arch_setup field.

	* win32-low.h (struct win32_target_ops): Add arch_setup field.
	* win32-low.c (initialize_low): Call the_low_target.arch_setup ()
	instead of init_registers ().
	* win32-arm-low.c (init_registers_arm): Add prototype.
	(the_low_target): Add initializer for arch_setup field.
	* win32-i386-low.c (init_registers_i386): Add prototype.
	(the_low_target): Add initializer for arch_setup field.

	* spu-low.c (init_registers_spu): Add prototype.
	(initialize_low): Call initialie_registers_spu () instead of
	initialize_registers ().


diff -urNp gdb-orig/gdb/gdbserver/linux-arm-low.c gdb-head/gdb/gdbserver/linux-arm-low.c
--- gdb-orig/gdb/gdbserver/linux-arm-low.c	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/linux-arm-low.c	2008-01-17 22:01:51.000000000 +0100
@@ -24,6 +24,11 @@
 
 #include "gdb_proc_service.h"
 
+/* Defined in auto-generated file reg-arm.c.  */
+void init_registers_arm (void);
+/* Defined in auto-generated file arm-with-iwmmxt.c.  */
+void init_registers_arm_with_iwmmxt (void);
+
 #ifndef PTRACE_GET_THREAD_AREA
 #define PTRACE_GET_THREAD_AREA 22
 #endif
@@ -200,6 +205,11 @@ struct regset_info target_regsets[] = {
 };
 
 struct linux_target_ops the_low_target = {
+#ifdef __IWMMXT__
+  init_registers_arm_with_iwmmxt,
+#else
+  init_registers_arm,
+#endif
   arm_num_regs,
   arm_regmap,
   arm_cannot_fetch_register,
diff -urNp gdb-orig/gdb/gdbserver/linux-cris-low.c gdb-head/gdb/gdbserver/linux-cris-low.c
--- gdb-orig/gdb/gdbserver/linux-cris-low.c	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/linux-cris-low.c	2008-01-17 22:04:06.000000000 +0100
@@ -21,6 +21,9 @@
 #include "linux-low.h"
 #include <sys/ptrace.h>
 
+/* Defined in auto-generated file reg-cris.c.  */
+void init_registers_cris (void);
+
 /* CRISv10 */
 #define cris_num_regs 32
 
@@ -105,6 +108,7 @@ cris_reinsert_addr (void)
 }
 
 struct linux_target_ops the_low_target = {
+  init_registers_cris,
   cris_num_regs,
   cris_regmap,
   cris_cannot_fetch_register,
diff -urNp gdb-orig/gdb/gdbserver/linux-crisv32-low.c gdb-head/gdb/gdbserver/linux-crisv32-low.c
--- gdb-orig/gdb/gdbserver/linux-crisv32-low.c	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/linux-crisv32-low.c	2008-01-17 22:03:49.000000000 +0100
@@ -21,6 +21,9 @@
 #include "linux-low.h"
 #include <sys/ptrace.h>
 
+/* Defined in auto-generated file reg-crisv32.c.  */
+void init_registers_crisv32 (void);
+
 /* CRISv32 */
 #define cris_num_regs 49
 
@@ -360,6 +363,7 @@ struct regset_info target_regsets[] = {
 };
 
 struct linux_target_ops the_low_target = {
+  init_register_crisv32,
   -1,
   NULL,
   NULL,
diff -urNp gdb-orig/gdb/gdbserver/linux-i386-low.c gdb-head/gdb/gdbserver/linux-i386-low.c
--- gdb-orig/gdb/gdbserver/linux-i386-low.c	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/linux-i386-low.c	2008-01-17 22:05:19.000000000 +0100
@@ -33,6 +33,10 @@
 #define PTRACE_GET_THREAD_AREA 25
 #endif
 
+/* Defined in auto-generated file reg-i386-linux.c.  */
+void init_registers_i386_linux (void);
+
+
 /* This module only supports access to the general purpose registers.  */
 
 #define i386_num_regs 16
@@ -185,6 +189,7 @@ i386_breakpoint_at (CORE_ADDR pc)
 }
 
 struct linux_target_ops the_low_target = {
+  init_registers_i386_linux,
   i386_num_regs,
   i386_regmap,
   i386_cannot_fetch_register,
diff -urNp gdb-orig/gdb/gdbserver/linux-ia64-low.c gdb-head/gdb/gdbserver/linux-ia64-low.c
--- gdb-orig/gdb/gdbserver/linux-ia64-low.c	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/linux-ia64-low.c	2008-01-17 22:05:40.000000000 +0100
@@ -24,6 +24,9 @@
 #include <sys/reg.h>
 #endif
 
+/* Defined in auto-generated file reg-ia64.c.  */
+void init_registers_ia64 (void);
+
 #define ia64_num_regs 462
 
 #include <asm/ptrace_offsets.h>
@@ -276,6 +279,7 @@ ia64_cannot_fetch_register (int regno)
 }
 
 struct linux_target_ops the_low_target = {
+  init_registers_ia64,
   ia64_num_regs,
   ia64_regmap,
   ia64_cannot_fetch_register,
diff -urNp gdb-orig/gdb/gdbserver/linux-low.c gdb-head/gdb/gdbserver/linux-low.c
--- gdb-orig/gdb/gdbserver/linux-low.c	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/linux-low.c	2008-01-17 22:21:02.000000000 +0100
@@ -2060,7 +2060,7 @@ initialize_low (void)
   set_target_ops (&linux_target_ops);
   set_breakpoint_data (the_low_target.breakpoint,
 		       the_low_target.breakpoint_len);
-  init_registers ();
+  the_low_target.arch_setup ();
   linux_init_signals ();
   linux_test_for_tracefork ();
 }
diff -urNp gdb-orig/gdb/gdbserver/linux-low.h gdb-head/gdb/gdbserver/linux-low.h
--- gdb-orig/gdb/gdbserver/linux-low.h	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/linux-low.h	2008-01-17 22:22:46.000000000 +0100
@@ -42,6 +42,9 @@ extern struct regset_info target_regsets
 
 struct linux_target_ops
 {
+  /* Architecture-specific setup.  */
+  void (*arch_setup) (void);
+
   int num_regs;
   int *regmap;
   int (*cannot_fetch_register) (int);
diff -urNp gdb-orig/gdb/gdbserver/linux-m32r-low.c gdb-head/gdb/gdbserver/linux-m32r-low.c
--- gdb-orig/gdb/gdbserver/linux-m32r-low.c	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/linux-m32r-low.c	2008-01-17 22:06:00.000000000 +0100
@@ -23,6 +23,9 @@
 #include <sys/reg.h>
 #endif
 
+/* Defined in auto-generated file reg-m32r.c.  */
+void init_registers_m32r (void);
+
 #define m32r_num_regs 25
 
 static int m32r_regmap[] = {
@@ -83,6 +86,7 @@ m32r_breakpoint_at (CORE_ADDR where)
 }
 
 struct linux_target_ops the_low_target = {
+  init_registers_m32r,
   m32r_num_regs,
   m32r_regmap,
   m32r_cannot_fetch_register,
diff -urNp gdb-orig/gdb/gdbserver/linux-m68k-low.c gdb-head/gdb/gdbserver/linux-m68k-low.c
--- gdb-orig/gdb/gdbserver/linux-m68k-low.c	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/linux-m68k-low.c	2008-01-17 22:06:26.000000000 +0100
@@ -20,6 +20,9 @@
 #include "server.h"
 #include "linux-low.h"
 
+/* Defined in auto-generated file reg-m68k.c.  */
+void init_registers_m68k (void);
+
 #ifdef HAVE_SYS_REG_H
 #include <sys/reg.h>
 #endif
@@ -152,6 +155,7 @@ m68k_breakpoint_at (CORE_ADDR pc)
 }
 
 struct linux_target_ops the_low_target = {
+  init_registers_m68k,
   m68k_num_regs,
   m68k_regmap,
   m68k_cannot_fetch_register,
diff -urNp gdb-orig/gdb/gdbserver/linux-mips-low.c gdb-head/gdb/gdbserver/linux-mips-low.c
--- gdb-orig/gdb/gdbserver/linux-mips-low.c	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/linux-mips-low.c	2008-01-17 22:11:00.000000000 +0100
@@ -25,6 +25,11 @@
 
 #include "gdb_proc_service.h"
 
+/* Defined in auto-generated file mips-linux.c.  */
+void init_registers_mips_linux (void);
+/* Defined in auto-generated file mips64-linux.c.  */
+void init_registers_mips64_linux (void);
+
 #ifndef PTRACE_GET_THREAD_AREA
 #define PTRACE_GET_THREAD_AREA 25
 #endif
@@ -329,6 +334,11 @@ struct regset_info target_regsets[] = {
 };
 
 struct linux_target_ops the_low_target = {
+#ifdef __mips64
+  init_registers_mips64_linux,
+#else
+  init_registers_mips_linux,
+#endif
   mips_num_regs,
   mips_regmap,
   mips_cannot_fetch_register,
diff -urNp gdb-orig/gdb/gdbserver/linux-ppc-low.c gdb-head/gdb/gdbserver/linux-ppc-low.c
--- gdb-orig/gdb/gdbserver/linux-ppc-low.c	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/linux-ppc-low.c	2008-01-17 22:15:19.000000000 +0100
@@ -23,6 +23,13 @@
 
 #include <asm/ptrace.h>
 
+/* Defined in auto-generated file reg-ppc.c.  */
+void init_registers_ppc (void);
+/* Defined in auto-generated file powerpc-32.c.  */
+void init_registers_powerpc_32 (void);
+/* Defined in auto-generated file powerpc-e500.c.  */
+void init_registers_powerpc_e500 (void);
+
 #define ppc_num_regs 71
 
 /* Currently, don't check/send MQ.  */
@@ -231,6 +238,15 @@ struct regset_info target_regsets[] = {
 };
 
 struct linux_target_ops the_low_target = {
+#ifdef __ALTIVEC__
+  init_registers_powerpc_32,
+#else
+#ifdef __SPE__
+  init_registers_powerpc_e500,
+#else
+  init_registers_ppc,
+#endif
+#endif
   ppc_num_regs,
   ppc_regmap,
   ppc_cannot_fetch_register,
diff -urNp gdb-orig/gdb/gdbserver/linux-ppc64-low.c gdb-head/gdb/gdbserver/linux-ppc64-low.c
--- gdb-orig/gdb/gdbserver/linux-ppc64-low.c	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/linux-ppc64-low.c	2008-01-17 22:13:01.000000000 +0100
@@ -21,6 +21,11 @@
 #include "server.h"
 #include "linux-low.h"
 
+/* Defined in auto-generated file reg-ppc64.c.  */
+void init_registers_ppc64 (void);
+/* Defined in auto-generated file powerpc-64.c.  */
+void init_registers_powerpc_64 (void);
+
 #include <asm/ptrace.h>
 
 #define ppc_num_regs 71
@@ -162,6 +167,11 @@ struct regset_info target_regsets[] = {
 };
 
 struct linux_target_ops the_low_target = {
+#ifdef __ALTIVEC__
+  init_registers_powerpc_64,
+#else
+  init_registers_ppc64,
+#endif
   ppc_num_regs,
   ppc_regmap,
   ppc_cannot_fetch_register,
diff -urNp gdb-orig/gdb/gdbserver/linux-s390-low.c gdb-head/gdb/gdbserver/linux-s390-low.c
--- gdb-orig/gdb/gdbserver/linux-s390-low.c	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/linux-s390-low.c	2008-01-17 22:16:47.000000000 +0100
@@ -25,6 +25,12 @@
 
 #include <asm/ptrace.h>
 
+/* Defined in auto-generated file reg-s390.c.  */
+void init_registers_s390 (void);
+/* Defined in auto-generated file reg-s390x.c.  */
+void init_registers_s390x (void);
+
+
 #define s390_num_regs 51
 
 static int s390_regmap[] = {
@@ -124,6 +130,11 @@ s390_breakpoint_at (CORE_ADDR pc)
 
 
 struct linux_target_ops the_low_target = {
+#ifndef __s390x__
+  init_registers_s390,
+#else
+  init_registers_s390x,
+#endif
   s390_num_regs,
   s390_regmap,
   s390_cannot_fetch_register,
diff -urNp gdb-orig/gdb/gdbserver/linux-sh-low.c gdb-head/gdb/gdbserver/linux-sh-low.c
--- gdb-orig/gdb/gdbserver/linux-sh-low.c	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/linux-sh-low.c	2008-01-17 22:17:19.000000000 +0100
@@ -20,6 +20,9 @@
 #include "server.h"
 #include "linux-low.h"
 
+/* Defined in auto-generated file reg-sh.c.  */
+void init_registers_sh (void);
+
 #ifdef HAVE_SYS_REG_H
 #include <sys/reg.h>
 #endif
@@ -106,6 +109,7 @@ struct regset_info target_regsets[] = {
 };
 
 struct linux_target_ops the_low_target = {
+  init_registers_sh,
   sh_num_regs,
   sh_regmap,
   sh_cannot_fetch_register,
diff -urNp gdb-orig/gdb/gdbserver/linux-x86-64-low.c gdb-head/gdb/gdbserver/linux-x86-64-low.c
--- gdb-orig/gdb/gdbserver/linux-x86-64-low.c	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/linux-x86-64-low.c	2008-01-17 22:18:03.000000000 +0100
@@ -24,6 +24,9 @@
 
 #include "gdb_proc_service.h"
 
+/* Defined in auto-generated file reg-x86-64-linux.c.  */
+void init_registers_x86_64_linux (void);
+
 #include <sys/reg.h>
 #include <sys/procfs.h>
 #include <sys/ptrace.h>
@@ -160,6 +163,7 @@ x86_64_breakpoint_at (CORE_ADDR pc)
 }
 
 struct linux_target_ops the_low_target = {
+  init_registers_x86_64_linux,
   -1,
   NULL,
   NULL,
diff -urNp gdb-orig/gdb/gdbserver/server.h gdb-head/gdb/gdbserver/server.h
--- gdb-orig/gdb/gdbserver/server.h	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/server.h	2008-01-17 22:00:07.000000000 +0100
@@ -218,10 +218,6 @@ void error (const char *string,...) ATTR
 void fatal (const char *string,...) ATTR_NORETURN ATTR_FORMAT (printf, 1, 2);
 void warning (const char *string,...) ATTR_FORMAT (printf, 1, 2);
 
-/* Functions from the register cache definition.  */
-
-void init_registers (void);
-
 /* Maximum number of bytes to read/write at once.  The value here
    is chosen to fill up a packet (the headers account for the 32).  */
 #define MAXBUFBYTES(N) (((N)-32)/2)
diff -urNp gdb-orig/gdb/gdbserver/spu-low.c gdb-head/gdb/gdbserver/spu-low.c
--- gdb-orig/gdb/gdbserver/spu-low.c	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/spu-low.c	2008-01-17 22:20:36.000000000 +0100
@@ -57,6 +57,9 @@
 /* These are used in remote-utils.c.  */
 int using_threads = 0;
 
+/* Defined in auto-generated file reg-spu.c.  */
+void init_registers_spu (void);
+
 
 /* Fetch PPU register REGNO.  */
 static CORE_ADDR
@@ -599,5 +602,5 @@ initialize_low (void)
 
   set_target_ops (&spu_target_ops);
   set_breakpoint_data (breakpoint, sizeof breakpoint);
-  init_registers ();
+  init_registers_spu ();
 }
diff -urNp gdb-orig/gdb/gdbserver/win32-arm-low.c gdb-head/gdb/gdbserver/win32-arm-low.c
--- gdb-orig/gdb/gdbserver/win32-arm-low.c	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/win32-arm-low.c	2008-01-17 22:21:44.000000000 +0100
@@ -22,6 +22,10 @@
 #define CONTEXT_FLOATING_POINT 0
 #endif
 
+/* Defined in auto-generated file reg-arm.c.  */
+void init_registers_arm (void);
+
+
 static void
 arm_get_thread_context (win32_thread_info *th, DEBUG_EVENT* current_event)
 {
@@ -107,6 +111,7 @@ static const unsigned long arm_wince_bre
 #define arm_wince_breakpoint_len 4
 
 struct win32_target_ops the_low_target = {
+  init_registers_arm,
   sizeof (mappings) / sizeof (mappings[0]),
   NULL, /* initial_stuff */
   arm_get_thread_context,
diff -urNp gdb-orig/gdb/gdbserver/win32-i386-low.c gdb-head/gdb/gdbserver/win32-i386-low.c
--- gdb-orig/gdb/gdbserver/win32-i386-low.c	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/win32-i386-low.c	2008-01-17 22:21:59.000000000 +0100
@@ -23,6 +23,9 @@
 
 #define FLAG_TRACE_BIT 0x100
 
+/* Defined in auto-generated file reg-i386.c.  */
+void init_registers_i386 (void);
+
 static unsigned dr[8];
 
 static int debug_registers_changed = 0;
@@ -191,6 +194,7 @@ i386_store_inferior_register (win32_thre
 }
 
 struct win32_target_ops the_low_target = {
+  init_registers_i386,
   sizeof (mappings) / sizeof (mappings[0]),
   i386_initial_stuff,
   i386_get_thread_context,
diff -urNp gdb-orig/gdb/gdbserver/win32-low.c gdb-head/gdb/gdbserver/win32-low.c
--- gdb-orig/gdb/gdbserver/win32-low.c	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/win32-low.c	2008-01-17 22:00:07.000000000 +0100
@@ -1686,5 +1686,5 @@ initialize_low (void)
   if (the_low_target.breakpoint != NULL)
     set_breakpoint_data (the_low_target.breakpoint,
 			 the_low_target.breakpoint_len);
-  init_registers ();
+  the_low_target.arch_setup ();
 }
diff -urNp gdb-orig/gdb/gdbserver/win32-low.h gdb-head/gdb/gdbserver/win32-low.h
--- gdb-orig/gdb/gdbserver/win32-low.h	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/gdbserver/win32-low.h	2008-01-17 22:02:56.000000000 +0100
@@ -42,6 +42,9 @@ typedef struct win32_thread_info
 
 struct win32_target_ops
 {
+  /* Architecture-specific setup.  */
+  void (*arch_setup) (void);
+
   /* The number of target registers.  */
   int num_regs;
 
diff -urNp gdb-orig/gdb/regformats/reg-crisv32.dat gdb-head/gdb/regformats/reg-crisv32.dat
--- gdb-orig/gdb/regformats/reg-crisv32.dat	2005-02-01 15:24:55.000000000 +0100
+++ gdb-head/gdb/regformats/reg-crisv32.dat	2008-01-17 22:03:38.000000000 +0100
@@ -1,4 +1,4 @@
-name:cris
+name:crisv32
 expedite:r8,sp,pc
 32:r0
 32:r1
diff -urNp gdb-orig/gdb/regformats/reg-ppc64.dat gdb-head/gdb/regformats/reg-ppc64.dat
--- gdb-orig/gdb/regformats/reg-ppc64.dat	2005-05-29 00:09:04.000000000 +0200
+++ gdb-head/gdb/regformats/reg-ppc64.dat	2008-01-17 22:11:35.000000000 +0100
@@ -1,4 +1,4 @@
-name:ppc
+name:ppc64
 expedite:r1,pc
 64:r0
 64:r1
diff -urNp gdb-orig/gdb/regformats/reg-s390x.dat gdb-head/gdb/regformats/reg-s390x.dat
--- gdb-orig/gdb/regformats/reg-s390x.dat	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/regformats/reg-s390x.dat	2008-01-17 22:00:07.000000000 +0100
@@ -1,4 +1,4 @@
-name:s390
+name:s390x
 expedite:r14,r15,pswa
 64:pswm
 64:pswa
diff -urNp gdb-orig/gdb/regformats/regdat.sh gdb-head/gdb/regformats/regdat.sh
--- gdb-orig/gdb/regformats/regdat.sh	2008-01-17 16:30:13.000000000 +0100
+++ gdb-head/gdb/regformats/regdat.sh	2008-01-17 22:00:07.000000000 +0100
@@ -155,7 +155,7 @@ echo
 
 cat <<EOF
 void
-init_registers ()
+init_registers_${name} ()
 {
     set_register_cache (regs_${name},
 			sizeof (regs_${name}) / sizeof (regs_${name}[0]));
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com



More information about the Gdb-patches mailing list