+2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * 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.
+
2008-02-26 Greg Law <glaw@undo-software.com>
* regcache.c (registers_changed): Call reinit_frame_cache.
+2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * 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.
+ * linux-xtensa-low.c (init_registers_xtensa): 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 ().
+
2008-02-19 Pedro Alves <pedro@codesourcery.com>
* server.c (handle_v_requests): When handling the vRun and vAttach
#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
};
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,
#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
}
struct linux_target_ops the_low_target = {
+ init_registers_cris,
cris_num_regs,
cris_regmap,
cris_cannot_fetch_register,
#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
};
struct linux_target_ops the_low_target = {
+ init_register_crisv32,
-1,
NULL,
NULL,
#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
}
struct linux_target_ops the_low_target = {
+ init_registers_i386_linux,
i386_num_regs,
i386_regmap,
i386_cannot_fetch_register,
#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>
}
struct linux_target_ops the_low_target = {
+ init_registers_ia64,
ia64_num_regs,
ia64_regmap,
ia64_cannot_fetch_register,
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 ();
}
struct linux_target_ops
{
+ /* Architecture-specific setup. */
+ void (*arch_setup) (void);
+
int num_regs;
int *regmap;
int (*cannot_fetch_register) (int);
#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[] = {
}
struct linux_target_ops the_low_target = {
+ init_registers_m32r,
m32r_num_regs,
m32r_regmap,
m32r_cannot_fetch_register,
#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
}
struct linux_target_ops the_low_target = {
+ init_registers_m68k,
m68k_num_regs,
m68k_regmap,
m68k_cannot_fetch_register,
#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
};
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,
#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. */
};
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,
#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
};
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,
#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[] = {
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,
#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
};
struct linux_target_ops the_low_target = {
+ init_registers_sh,
sh_num_regs,
sh_regmap,
sh_cannot_fetch_register,
#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>
}
struct linux_target_ops the_low_target = {
+ init_registers_x86_64_linux,
-1,
NULL,
NULL,
#include "server.h"
#include "linux-low.h"
+/* Defined in auto-generated file reg-xtensa.c. */
+void init_registers_xtensa (void);
+
#include <sys/ptrace.h>
#include <xtensa-config.h>
}
struct linux_target_ops the_low_target = {
+ init_registers_xtensa,
0,
0,
0,
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)
/* 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
set_target_ops (&spu_target_ops);
set_breakpoint_data (breakpoint, sizeof breakpoint);
- init_registers ();
+ init_registers_spu ();
}
#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)
{
#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,
#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;
}
struct win32_target_ops the_low_target = {
+ init_registers_i386,
sizeof (mappings) / sizeof (mappings[0]),
i386_initial_stuff,
i386_get_thread_context,
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 ();
}
struct win32_target_ops
{
+ /* Architecture-specific setup. */
+ void (*arch_setup) (void);
+
/* The number of target registers. */
int num_regs;
-name:cris
+name:crisv32
expedite:r8,sp,pc
32:r0
32:r1
-name:ppc
+name:ppc64
expedite:r1,pc
64:r0
64:r1
-name:s390
+name:s390x
expedite:r14,r15,pswa
64:pswm
64:pswa
cat <<EOF
void
-init_registers ()
+init_registers_${name} ()
{
set_register_cache (regs_${name},
sizeof (regs_${name}) / sizeof (regs_${name}[0]));