aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-11-14 20:37:29 +0000
committerAndrew Cagney <cagney@redhat.com>2002-11-14 20:37:29 +0000
commit524d7c188c0860ee017df038f2d1f443da3c80eb (patch)
tree6174f5d73ffaad7c1159954fa922cfd4bb73bfda /gdb
parent2fa9fc65a53ee02ca5dd15d12ebb903a22207051 (diff)
downloadgdb-524d7c188c0860ee017df038f2d1f443da3c80eb.zip
gdb-524d7c188c0860ee017df038f2d1f443da3c80eb.tar.gz
gdb-524d7c188c0860ee017df038f2d1f443da3c80eb.tar.bz2
2002-11-14 Andrew Cagney <ac131313@redhat.com>
* regcache.h (deprecated_registers): Rename registers. * a68v-nat.c, alpha-nat.c, arch-utils.c, core-sol2.c: Update. * hp300ux-nat.c, hppab-nat.c, hppah-nat.c: Update. * hppam3-nat.c, hpux-thread.c, i386gnu-nat.c: Update. * ia64-aix-nat.c, ia64-linux-nat.c, ia64-tdep.c: Update. * irix4-nat.c, irix5-nat.c, lynx-nat.c, m68k-tdep.c: Update. * m68knbsd-nat.c, mips-linux-tdep.c, mipsm3-nat.c: Update. * mipsv4-nat.c, ns32knbsd-nat.c, ppc-bdm.c: Update. * ppc-sysv-tdep.c, ptx4-nat.c, regcache.c, remote-es.c: Update. * remote-sds.c, remote-vx68.c, remote-vxmips.c: Update. * remote-vxsparc.c, rs6000-tdep.c, sol-thread.c: Update. * sparc-nat.c, sparc-tdep.c, sun3-nat.c, symm-nat.c: Update. * v850ice.c: Update.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog16
-rw-r--r--gdb/a68v-nat.c24
-rw-r--r--gdb/alpha-nat.c20
-rw-r--r--gdb/arch-utils.c2
-rw-r--r--gdb/core-sol2.c30
-rw-r--r--gdb/hp300ux-nat.c2
-rw-r--r--gdb/hppab-nat.c4
-rw-r--r--gdb/hppah-nat.c6
-rw-r--r--gdb/hppam3-nat.c6
-rw-r--r--gdb/hpux-thread.c9
-rw-r--r--gdb/i386gnu-nat.c2
-rw-r--r--gdb/ia64-aix-nat.c10
-rw-r--r--gdb/ia64-linux-nat.c4
-rw-r--r--gdb/ia64-tdep.c6
-rw-r--r--gdb/irix4-nat.c16
-rw-r--r--gdb/irix5-nat.c18
-rw-r--r--gdb/lynx-nat.c24
-rw-r--r--gdb/m68k-tdep.c14
-rw-r--r--gdb/m68knbsd-nat.c12
-rw-r--r--gdb/mips-linux-tdep.c8
-rw-r--r--gdb/mipsm3-nat.c14
-rw-r--r--gdb/mipsv4-nat.c14
-rw-r--r--gdb/ns32knbsd-nat.c4
-rw-r--r--gdb/ppc-bdm.c2
-rw-r--r--gdb/ppc-sysv-tdep.c12
-rw-r--r--gdb/ptx4-nat.c2
-rw-r--r--gdb/regcache.c10
-rw-r--r--gdb/regcache.h14
-rw-r--r--gdb/remote-es.c20
-rw-r--r--gdb/remote-sds.c4
-rw-r--r--gdb/remote-vx68.c28
-rw-r--r--gdb/remote-vxmips.c34
-rw-r--r--gdb/remote-vxsparc.c33
-rw-r--r--gdb/rs6000-tdep.c18
-rw-r--r--gdb/sol-thread.c6
-rw-r--r--gdb/sparc-nat.c80
-rw-r--r--gdb/sparc-tdep.c4
-rw-r--r--gdb/sun3-nat.c29
-rw-r--r--gdb/symm-nat.c76
-rw-r--r--gdb/v850ice.c2
40 files changed, 347 insertions, 292 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 157d534..e65cb22 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,19 @@
+2002-11-14 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.h (deprecated_registers): Rename registers.
+ * a68v-nat.c, alpha-nat.c, arch-utils.c, core-sol2.c: Update.
+ * hp300ux-nat.c, hppab-nat.c, hppah-nat.c: Update.
+ * hppam3-nat.c, hpux-thread.c, i386gnu-nat.c: Update.
+ * ia64-aix-nat.c, ia64-linux-nat.c, ia64-tdep.c: Update.
+ * irix4-nat.c, irix5-nat.c, lynx-nat.c, m68k-tdep.c: Update.
+ * m68knbsd-nat.c, mips-linux-tdep.c, mipsm3-nat.c: Update.
+ * mipsv4-nat.c, ns32knbsd-nat.c, ppc-bdm.c: Update.
+ * ppc-sysv-tdep.c, ptx4-nat.c, regcache.c, remote-es.c: Update.
+ * remote-sds.c, remote-vx68.c, remote-vxmips.c: Update.
+ * remote-vxsparc.c, rs6000-tdep.c, sol-thread.c: Update.
+ * sparc-nat.c, sparc-tdep.c, sun3-nat.c, symm-nat.c: Update.
+ * v850ice.c: Update.
+
Wed Nov 13 19:51:05 2002 Andrew Cagney <cagney@redhat.com>
* utils.c (gdb_realpath): Add comment mentioning realpath with a
diff --git a/gdb/a68v-nat.c b/gdb/a68v-nat.c
index b5d5c28..0bfe8e2 100644
--- a/gdb/a68v-nat.c
+++ b/gdb/a68v-nat.c
@@ -61,11 +61,14 @@ fetch_inferior_registers (int ignored)
(PTRACE_ARG3_TYPE) & inferior_control_registers,
ptrace_$control_set_m68k);
- bcopy (&inferior_registers, registers, 16 * 4);
- bcopy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
+ bcopy (&inferior_registers, &deprecated_registers[0], 16 * 4);
+ bcopy (&inferior_fp_registers,
+ &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
sizeof inferior_fp_registers.regs);
- *(int *) &registers[REGISTER_BYTE (PS_REGNUM)] = inferior_control_registers.sr;
- *(int *) &registers[REGISTER_BYTE (PC_REGNUM)] = inferior_control_registers.pc;
+ *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)]
+ = inferior_control_registers.sr;
+ *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)]
+ = inferior_control_registers.pc;
}
/* Store our register values back into the inferior.
@@ -94,13 +97,16 @@ store_inferior_registers (int regno)
(PTRACE_ARG3_TYPE) & inferior_control_registers,
ptrace_$control_set_m68k);
- bcopy (registers, &inferior_registers, sizeof (inferior_registers));
+ bcopy (&deprecated_registers[0], &inferior_registers,
+ sizeof (inferior_registers));
- bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)], inferior_fp_registers.regs,
- sizeof inferior_fp_registers.regs);
+ bcopy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
+ inferior_fp_registers.regs, sizeof inferior_fp_registers.regs);
- inferior_control_registers.sr = *(int *) &registers[REGISTER_BYTE (PS_REGNUM)];
- inferior_control_registers.pc = *(int *) &registers[REGISTER_BYTE (PC_REGNUM)];
+ inferior_control_registers.sr
+ = *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)];
+ inferior_control_registers.pc
+ = *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_registers,
diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c
index ef468f5..6d7a3d6 100644
--- a/gdb/alpha-nat.c
+++ b/gdb/alpha-nat.c
@@ -133,17 +133,19 @@ fetch_elf_core_registers (char *core_reg_sect, unsigned core_reg_size,
if (which == 2)
{
/* The FPU Registers. */
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], core_reg_sect, 31 * 8);
- memset (&registers[REGISTER_BYTE (FP0_REGNUM + 31)], 0, 8);
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
+ core_reg_sect, 31 * 8);
+ memset (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM + 31)], 0, 8);
memset (&deprecated_register_valid[FP0_REGNUM], 1, 32);
}
else
{
/* The General Registers. */
- memcpy (&registers[REGISTER_BYTE (ALPHA_V0_REGNUM)], core_reg_sect,
- 31 * 8);
- memcpy (&registers[REGISTER_BYTE (PC_REGNUM)], core_reg_sect + 31 * 8, 8);
- memset (&registers[REGISTER_BYTE (ALPHA_ZERO_REGNUM)], 0, 8);
+ memcpy (&deprecated_registers[REGISTER_BYTE (ALPHA_V0_REGNUM)],
+ core_reg_sect, 31 * 8);
+ memcpy (&deprecated_registers[REGISTER_BYTE (PC_REGNUM)],
+ core_reg_sect + 31 * 8, 8);
+ memset (&deprecated_registers[REGISTER_BYTE (ALPHA_ZERO_REGNUM)], 0, 8);
memset (&deprecated_register_valid[ALPHA_V0_REGNUM], 1, 32);
deprecated_register_valid[PC_REGNUM] = 1;
}
@@ -209,10 +211,10 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno)
for (regi = 0; regi < 31; regi++)
if ((regno == -1) || (regno == regi))
- *(regp + regi) = *(long *) &registers[REGISTER_BYTE (regi)];
+ *(regp + regi) = *(long *) &deprecated_registers[REGISTER_BYTE (regi)];
if ((regno == -1) || (regno == PC_REGNUM))
- *(regp + 31) = *(long *) &registers[REGISTER_BYTE (PC_REGNUM)];
+ *(regp + 31) = *(long *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
}
/*
@@ -241,7 +243,7 @@ fill_fpregset (gdb_fpregset_t *fpregsetp, int regno)
if ((regno == -1) || (regno == regi))
{
*(regp + regi - FP0_REGNUM) =
- *(long *) &registers[REGISTER_BYTE (regi)];
+ *(long *) &deprecated_registers[REGISTER_BYTE (regi)];
}
}
}
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index a056177..732c40b 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -99,7 +99,7 @@ legacy_extract_return_value (struct type *type, struct regcache *regcache,
{
char *registers = deprecated_grub_regcache_for_registers (regcache);
bfd_byte *buf = valbuf;
- DEPRECATED_EXTRACT_RETURN_VALUE (type, registers, buf);
+ DEPRECATED_EXTRACT_RETURN_VALUE (type, registers, buf); /* OK */
}
/* Implementation of store return value that grubs the register cache.
diff --git a/gdb/core-sol2.c b/gdb/core-sol2.c
index 0123cf4..f978b68 100644
--- a/gdb/core-sol2.c
+++ b/gdb/core-sol2.c
@@ -94,15 +94,19 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
struct regs *gregs = (struct regs *) core_reg_sect;
/* G0 *always* holds 0. */
- *(int *) &registers[REGISTER_BYTE (0)] = 0;
+ *(int *) &deprecated_registers[REGISTER_BYTE (0)] = 0;
/* The globals and output registers. */
- memcpy (&registers[REGISTER_BYTE (G1_REGNUM)], &gregs->r_g1,
- 15 * REGISTER_RAW_SIZE (G1_REGNUM));
- *(int *) &registers[REGISTER_BYTE (PS_REGNUM)] = gregs->r_ps;
- *(int *) &registers[REGISTER_BYTE (PC_REGNUM)] = gregs->r_pc;
- *(int *) &registers[REGISTER_BYTE (NPC_REGNUM)] = gregs->r_npc;
- *(int *) &registers[REGISTER_BYTE (Y_REGNUM)] = gregs->r_y;
+ memcpy (&deprecated_registers[REGISTER_BYTE (G1_REGNUM)],
+ &gregs->r_g1, 15 * REGISTER_RAW_SIZE (G1_REGNUM));
+ *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)]
+ = gregs->r_ps;
+ *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)]
+ = gregs->r_pc;
+ *(int *) &deprecated_registers[REGISTER_BYTE (NPC_REGNUM)]
+ = gregs->r_npc;
+ *(int *) &deprecated_registers[REGISTER_BYTE (Y_REGNUM)]
+ = gregs->r_y;
/* My best guess at where to get the locals and input
registers is exactly where they usually are, right above
@@ -112,9 +116,9 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
{
int sp;
- sp = *(int *) &registers[REGISTER_BYTE (SP_REGNUM)];
+ sp = *(int *) &deprecated_registers[REGISTER_BYTE (SP_REGNUM)];
if (0 != target_read_memory (sp,
- &registers[REGISTER_BYTE (L0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM)))
{
warning ("couldn't read input and local registers from core file\n");
@@ -163,10 +167,10 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
{
struct fpu *fpuregs = (struct fpu *) core_reg_sect;
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], &fpuregs->fpu_fr,
- sizeof (fpuregs->fpu_fr));
- memcpy (&registers[REGISTER_BYTE (FPS_REGNUM)], &fpuregs->fpu_fsr,
- sizeof (FPU_FSR_TYPE));
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
+ &fpuregs->fpu_fr, sizeof (fpuregs->fpu_fr));
+ memcpy (&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)],
+ &fpuregs->fpu_fsr, sizeof (FPU_FSR_TYPE));
}
else
{
diff --git a/gdb/hp300ux-nat.c b/gdb/hp300ux-nat.c
index ecb8a35..7ef3e34 100644
--- a/gdb/hp300ux-nat.c
+++ b/gdb/hp300ux-nat.c
@@ -161,7 +161,7 @@ store_inferior_register (register int regno, register unsigned int regaddr)
{
store_inferior_register_1
(regno, regaddr,
- (*(int *) &registers[(REGISTER_BYTE (regno)) + i]));
+ (*(int *) &deprecated_registers[(REGISTER_BYTE (regno)) + i]));
regaddr += sizeof (int);
}
}
diff --git a/gdb/hppab-nat.c b/gdb/hppab-nat.c
index 51dde60..d859587 100644
--- a/gdb/hppab-nat.c
+++ b/gdb/hppab-nat.c
@@ -118,7 +118,7 @@ store_inferior_registers (int regno)
errno = 0;
if (regno == PCOQ_HEAD_REGNUM || regno == PCOQ_TAIL_REGNUM)
{
- scratch = *(int *) &registers[REGISTER_BYTE (regno)] | 0x3;
+ scratch = *(int *) &deprecated_registers[REGISTER_BYTE (regno)] | 0x3;
ptrace (PT_WUREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr,
scratch);
if (errno != 0)
@@ -135,7 +135,7 @@ store_inferior_registers (int regno)
errno = 0;
ptrace (PT_WUREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) regaddr,
- *(int *) &registers[REGISTER_BYTE (regno) + i]);
+ *(int *) &deprecated_registers[REGISTER_BYTE (regno) + i]);
if (errno != 0)
{
/* Warning, not error, in case we are attached; sometimes the
diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c
index aab5e96..f10eb5a 100644
--- a/gdb/hppah-nat.c
+++ b/gdb/hppah-nat.c
@@ -121,7 +121,7 @@ store_inferior_registers (int regno)
{
CORE_ADDR temp;
- temp = *(CORE_ADDR *)&registers[REGISTER_BYTE (regno)];
+ temp = *(CORE_ADDR *)&deprecated_registers[REGISTER_BYTE (regno)];
/* Set the priv level (stored in the low two bits of the PC. */
temp |= 0x3;
@@ -146,7 +146,7 @@ store_inferior_registers (int regno)
the high part of IPSW. What will it take for HP to catch a
clue about building sensible interfaces? */
if (regno == IPSW_REGNUM && len == 8)
- *(int *)&registers[REGISTER_BYTE (regno)] = 0;
+ *(int *)&deprecated_registers[REGISTER_BYTE (regno)] = 0;
#endif
for (i = 0; i < len; i += sizeof (int))
@@ -154,7 +154,7 @@ store_inferior_registers (int regno)
errno = 0;
call_ptrace (PT_WUREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) addr + i,
- *(int *) &registers[REGISTER_BYTE (regno) + i]);
+ *(int *) &deprecated_registers[REGISTER_BYTE (regno) + i]);
if (errno != 0)
{
/* Warning, not error, in case we are attached; sometimes
diff --git a/gdb/hppam3-nat.c b/gdb/hppam3-nat.c
index ee67f1b..349df39 100644
--- a/gdb/hppam3-nat.c
+++ b/gdb/hppam3-nat.c
@@ -113,15 +113,15 @@ store_inferior_registers (int regno)
*/
if (regno > 0 && regno < NUM_REGS)
{
- memcpy (&state[regno], &registers[REGISTER_BYTE (regno)],
+ memcpy (&state[regno], &deprecated_registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno));
}
else
{
for (index = 0; index < NUM_REGS; index++)
- memcpy (&state[index], &registers[REGISTER_BYTE (index)],
+ memcpy (&state[index], &deprecated_registers[REGISTER_BYTE (index)],
REGISTER_RAW_SIZE (index));
-/* state[index] = registers[REGISTER_BYTE (index)]; */
+/* state[index] = deprecated_registers[REGISTER_BYTE (index)]; */
}
diff --git a/gdb/hpux-thread.c b/gdb/hpux-thread.c
index 981bb9d..26d57ba 100644
--- a/gdb/hpux-thread.c
+++ b/gdb/hpux-thread.c
@@ -357,18 +357,19 @@ hpux_thread_store_registers (int regno)
else if (regno == SP_REGNUM)
{
write_memory ((CORE_ADDR) & tcb_ptr->static_ctx.sp,
- registers + REGISTER_BYTE (regno),
+ &deprecated_registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno));
tcb_ptr->static_ctx.sp = (cma__t_hppa_regs *)
- (extract_address (registers + REGISTER_BYTE (regno), REGISTER_RAW_SIZE (regno)) + 160);
+ (extract_address (&deprecated_registers[REGISTER_BYTE (regno)],
+ REGISTER_RAW_SIZE (regno)) + 160);
}
else if (regno == PC_REGNUM)
write_memory (sp - 20,
- registers + REGISTER_BYTE (regno),
+ &deprecated_registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno));
else
write_memory (sp + regmap[regno],
- registers + REGISTER_BYTE (regno),
+ &deprecated_registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno));
}
}
diff --git a/gdb/i386gnu-nat.c b/gdb/i386gnu-nat.c
index 82f9ee5..4623e11 100644
--- a/gdb/i386gnu-nat.c
+++ b/gdb/i386gnu-nat.c
@@ -256,7 +256,7 @@ gnu_store_registers (int regno)
}
#define fill(state, regno) \
- memcpy (REG_ADDR(state, regno), &registers[REGISTER_BYTE (regno)], \
+ memcpy (REG_ADDR(state, regno), &deprecated_registers[REGISTER_BYTE (regno)], \
REGISTER_RAW_SIZE (regno))
if (regno == -1)
diff --git a/gdb/ia64-aix-nat.c b/gdb/ia64-aix-nat.c
index dbf664c..c94144c 100644
--- a/gdb/ia64-aix-nat.c
+++ b/gdb/ia64-aix-nat.c
@@ -85,7 +85,7 @@ fill_gregset (prgregset_t *gregsetp, int regno)
#define COPY_REG(_fld_,_regi_) \
if ((regno == -1) || regno == _regi_) \
- memcpy (&(gregsetp->_fld_), &registers[REGISTER_BYTE (_regi_)], \
+ memcpy (&(gregsetp->_fld_), &deprecated_registers[REGISTER_BYTE (_regi_)], \
REGISTER_RAW_SIZE (_regi_))
for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++)
@@ -108,10 +108,10 @@ fill_gregset (prgregset_t *gregsetp, int regno)
if (regno == IA64_BSP_REGNUM || regno == -1)
{
memcpy (&(gregsetp->__bspstore),
- &registers[REGISTER_BYTE (IA64_BSP_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (IA64_BSP_REGNUM)],
REGISTER_RAW_SIZE (IA64_BSP_REGNUM));
- memcpy (&registers[REGISTER_BYTE (IA64_BSPSTORE_REGNUM)],
- &registers[REGISTER_BYTE (IA64_BSP_REGNUM)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (IA64_BSPSTORE_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (IA64_BSP_REGNUM)],
REGISTER_RAW_SIZE (IA64_BSP_REGNUM));
}
@@ -153,7 +153,7 @@ fill_fpregset (prfpregset_t *fpregsetp, int regno)
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) &registers[REGISTER_BYTE (regi)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regi)];
to = (char *) &(fpregsetp->__fpr[regi - IA64_FR0_REGNUM]);
memcpy (to, from, REGISTER_RAW_SIZE (regi));
}
diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c
index 82695ef..76b8235 100644
--- a/gdb/ia64-linux-nat.c
+++ b/gdb/ia64-linux-nat.c
@@ -400,7 +400,7 @@ fill_gregset (gregset_t *gregsetp, int regno)
#define COPY_REG(_idx_,_regi_) \
if ((regno == -1) || regno == _regi_) \
- memcpy (regp + _idx_, &registers[REGISTER_BYTE (_regi_)], \
+ memcpy (regp + _idx_, &deprecated_registers[REGISTER_BYTE (_regi_)], \
REGISTER_RAW_SIZE (_regi_))
for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++)
@@ -465,7 +465,7 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) &registers[REGISTER_BYTE (regi)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regi)];
to = (char *) &((*fpregsetp)[regi - IA64_FR0_REGNUM]);
memcpy (to, from, REGISTER_RAW_SIZE (regi));
}
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index e588dc9..59c7c73 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -1902,7 +1902,7 @@ ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
float_elt_type,
floatreg,
VALUE_CONTENTS (arg) + argoffset,
- &registers[REGISTER_BYTE (floatreg)]);
+ &deprecated_registers[REGISTER_BYTE (floatreg)]);
floatreg++;
argoffset += TYPE_LENGTH (float_elt_type);
len -= TYPE_LENGTH (float_elt_type);
@@ -1913,7 +1913,7 @@ ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
/* Store the struct return value in r8 if necessary. */
if (struct_return)
{
- store_address (&registers[REGISTER_BYTE (IA64_GR8_REGNUM)],
+ store_address (&deprecated_registers[REGISTER_BYTE (IA64_GR8_REGNUM)],
REGISTER_RAW_SIZE (IA64_GR8_REGNUM),
struct_addr);
}
@@ -1954,7 +1954,7 @@ ia64_store_return_value (struct type *type, char *valbuf)
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
ia64_register_convert_to_raw (type, IA64_FR8_REGNUM, valbuf,
- &registers[REGISTER_BYTE (IA64_FR8_REGNUM)]);
+ &deprecated_registers[REGISTER_BYTE (IA64_FR8_REGNUM)]);
target_store_registers (IA64_FR8_REGNUM);
}
else
diff --git a/gdb/irix4-nat.c b/gdb/irix4-nat.c
index 0f44776..2283887 100644
--- a/gdb/irix4-nat.c
+++ b/gdb/irix4-nat.c
@@ -77,19 +77,19 @@ fill_gregset (gregset_t *gregsetp, int regno)
/* same FIXME as above wrt 32 */
for (regi = 0; regi < 32; regi++)
if ((regno == -1) || (regno == regi))
- *(regp + regi) = *(greg_t *) & registers[REGISTER_BYTE (regi)];
+ *(regp + regi) = *(greg_t *) & deprecated_registers[REGISTER_BYTE (regi)];
if ((regno == -1) || (regno == PC_REGNUM))
- gregsetp->gp_pc = *(greg_t *) & registers[REGISTER_BYTE (PC_REGNUM)];
+ gregsetp->gp_pc = *(greg_t *) & deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
if ((regno == -1) || (regno == CAUSE_REGNUM))
- gregsetp->gp_cause = *(greg_t *) & registers[REGISTER_BYTE (CAUSE_REGNUM)];
+ gregsetp->gp_cause = *(greg_t *) & deprecated_registers[REGISTER_BYTE (CAUSE_REGNUM)];
if ((regno == -1) || (regno == HI_REGNUM))
- gregsetp->gp_mdhi = *(greg_t *) & registers[REGISTER_BYTE (HI_REGNUM)];
+ gregsetp->gp_mdhi = *(greg_t *) & deprecated_registers[REGISTER_BYTE (HI_REGNUM)];
if ((regno == -1) || (regno == LO_REGNUM))
- gregsetp->gp_mdlo = *(greg_t *) & registers[REGISTER_BYTE (LO_REGNUM)];
+ gregsetp->gp_mdlo = *(greg_t *) & deprecated_registers[REGISTER_BYTE (LO_REGNUM)];
}
/*
@@ -127,14 +127,14 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) &registers[REGISTER_BYTE (regi)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regi)];
to = (char *) &(fpregsetp->fp_r.fp_regs[regi - FP0_REGNUM]);
memcpy (to, from, REGISTER_RAW_SIZE (regi));
}
}
if ((regno == -1) || (regno == FCRCS_REGNUM))
- fpregsetp->fp_csr = *(unsigned *) &registers[REGISTER_BYTE (FCRCS_REGNUM)];
+ fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)];
}
@@ -184,7 +184,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
return;
}
- memcpy ((char *) registers, core_reg_sect, core_reg_size);
+ memcpy ((char *) deprecated_registers, core_reg_sect, core_reg_size);
}
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c
index 0d7e9b6..9e4f210 100644
--- a/gdb/irix5-nat.c
+++ b/gdb/irix5-nat.c
@@ -83,27 +83,27 @@ fill_gregset (gregset_t *gregsetp, int regno)
for (regi = 0; regi <= CTX_RA; regi++)
if ((regno == -1) || (regno == regi))
*(regp + regi) =
- extract_signed_integer (&registers[REGISTER_BYTE (regi)],
+ extract_signed_integer (&deprecated_registers[REGISTER_BYTE (regi)],
REGISTER_RAW_SIZE (regi));
if ((regno == -1) || (regno == PC_REGNUM))
*(regp + CTX_EPC) =
- extract_signed_integer (&registers[REGISTER_BYTE (PC_REGNUM)],
+ extract_signed_integer (&deprecated_registers[REGISTER_BYTE (PC_REGNUM)],
REGISTER_RAW_SIZE (PC_REGNUM));
if ((regno == -1) || (regno == CAUSE_REGNUM))
*(regp + CTX_CAUSE) =
- extract_signed_integer (&registers[REGISTER_BYTE (CAUSE_REGNUM)],
+ extract_signed_integer (&deprecated_registers[REGISTER_BYTE (CAUSE_REGNUM)],
REGISTER_RAW_SIZE (CAUSE_REGNUM));
if ((regno == -1) || (regno == HI_REGNUM))
*(regp + CTX_MDHI) =
- extract_signed_integer (&registers[REGISTER_BYTE (HI_REGNUM)],
+ extract_signed_integer (&deprecated_registers[REGISTER_BYTE (HI_REGNUM)],
REGISTER_RAW_SIZE (HI_REGNUM));
if ((regno == -1) || (regno == LO_REGNUM))
*(regp + CTX_MDLO) =
- extract_signed_integer (&registers[REGISTER_BYTE (LO_REGNUM)],
+ extract_signed_integer (&deprecated_registers[REGISTER_BYTE (LO_REGNUM)],
REGISTER_RAW_SIZE (LO_REGNUM));
}
@@ -145,14 +145,14 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) &registers[REGISTER_BYTE (regi)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regi)];
to = (char *) &(fpregsetp->fp_r.fp_regs[regi - FP0_REGNUM]);
memcpy (to, from, REGISTER_RAW_SIZE (regi));
}
}
if ((regno == -1) || (regno == FCRCS_REGNUM))
- fpregsetp->fp_csr = *(unsigned *) &registers[REGISTER_BYTE (FCRCS_REGNUM)];
+ fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)];
}
@@ -198,7 +198,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
{
if (core_reg_size == REGISTER_BYTES)
{
- memcpy ((char *) registers, core_reg_sect, core_reg_size);
+ memcpy ((char *) deprecated_registers, core_reg_sect, core_reg_size);
}
else if (MIPS_REGSIZE == 4 &&
core_reg_size == (2 * MIPS_REGSIZE) * NUM_REGS)
@@ -206,7 +206,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
/* This is a core file from a N32 executable, 64 bits are saved
for all registers. */
char *srcp = core_reg_sect;
- char *dstp = registers;
+ char *dstp = deprecated_registers;
int regno;
for (regno = 0; regno < NUM_REGS; regno++)
diff --git a/gdb/lynx-nat.c b/gdb/lynx-nat.c
index 8f8f15e..37edc2b 100644
--- a/gdb/lynx-nat.c
+++ b/gdb/lynx-nat.c
@@ -296,7 +296,7 @@ fetch_inferior_registers (int regno)
supply_register (G0_REGNUM, buf);
supply_register (TBR_REGNUM, (char *) &ec.tbr);
- memcpy (&registers[REGISTER_BYTE (G1_REGNUM)], &ec.g1,
+ memcpy (&deprecated_registers[REGISTER_BYTE (G1_REGNUM)], &ec.g1,
4 * REGISTER_RAW_SIZE (G1_REGNUM));
for (i = G1_REGNUM; i <= G1_REGNUM + 3; i++)
deprecated_register_valid[i] = 1;
@@ -307,7 +307,7 @@ fetch_inferior_registers (int regno)
supply_register (NPC_REGNUM, (char *) &ec.npc);
supply_register (WIM_REGNUM, (char *) &ec.wim);
- memcpy (&registers[REGISTER_BYTE (O0_REGNUM)], ec.o,
+ memcpy (&deprecated_registers[REGISTER_BYTE (O0_REGNUM)], ec.o,
8 * REGISTER_RAW_SIZE (O0_REGNUM));
for (i = O0_REGNUM; i <= O0_REGNUM + 7; i++)
deprecated_register_valid[i] = 1;
@@ -321,13 +321,13 @@ fetch_inferior_registers (int regno)
sp = read_register (SP_REGNUM);
target_read_memory (sp + FRAME_SAVED_I0,
- &registers[REGISTER_BYTE (I0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (I0_REGNUM)],
8 * REGISTER_RAW_SIZE (I0_REGNUM));
for (i = I0_REGNUM; i <= I7_REGNUM; i++)
deprecated_register_valid[i] = 1;
target_read_memory (sp + FRAME_SAVED_L0,
- &registers[REGISTER_BYTE (L0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
8 * REGISTER_RAW_SIZE (L0_REGNUM));
for (i = L0_REGNUM; i <= L0_REGNUM + 7; i++)
deprecated_register_valid[i] = 1;
@@ -345,7 +345,7 @@ fetch_inferior_registers (int regno)
if (errno)
perror_with_name ("ptrace(PTRACE_GETFPREGS)");
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], fc.f.fregs,
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], fc.f.fregs,
32 * REGISTER_RAW_SIZE (FP0_REGNUM));
for (i = FP0_REGNUM; i <= FP0_REGNUM + 31; i++)
deprecated_register_valid[i] = 1;
@@ -383,7 +383,7 @@ store_inferior_registers (int regno)
int retval;
ec.tbr = read_register (TBR_REGNUM);
- memcpy (&ec.g1, &registers[REGISTER_BYTE (G1_REGNUM)],
+ memcpy (&ec.g1, &deprecated_registers[REGISTER_BYTE (G1_REGNUM)],
4 * REGISTER_RAW_SIZE (G1_REGNUM));
ec.psr = read_register (PS_REGNUM);
@@ -392,7 +392,7 @@ store_inferior_registers (int regno)
ec.npc = read_register (NPC_REGNUM);
ec.wim = read_register (WIM_REGNUM);
- memcpy (ec.o, &registers[REGISTER_BYTE (O0_REGNUM)],
+ memcpy (ec.o, &deprecated_registers[REGISTER_BYTE (O0_REGNUM)],
8 * REGISTER_RAW_SIZE (O0_REGNUM));
errno = 0;
@@ -414,11 +414,11 @@ store_inferior_registers (int regno)
if (!deprecated_register_valid[L0_REGNUM + 5])
internal_error (__FILE__, __LINE__, "failed internal consistency check");
target_write_memory (sp + FRAME_SAVED_I0,
- &registers[REGISTER_BYTE (I0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (I0_REGNUM)],
8 * REGISTER_RAW_SIZE (I0_REGNUM));
target_write_memory (sp + FRAME_SAVED_L0,
- &registers[REGISTER_BYTE (L0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
8 * REGISTER_RAW_SIZE (L0_REGNUM));
}
else if (regno >= L0_REGNUM && regno <= I7_REGNUM)
@@ -432,7 +432,7 @@ store_inferior_registers (int regno)
regoffset = REGISTER_BYTE (regno) - REGISTER_BYTE (I0_REGNUM)
+ FRAME_SAVED_I0;
target_write_memory (sp + regoffset,
- &registers[REGISTER_BYTE (regno)],
+ &deprecated_registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno));
}
}
@@ -449,7 +449,7 @@ store_inferior_registers (int regno)
if (errno)
perror_with_name ("ptrace(PTRACE_GETFPREGS)");
- memcpy (fc.f.fregs, &registers[REGISTER_BYTE (FP0_REGNUM)],
+ memcpy (fc.f.fregs, &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
32 * REGISTER_RAW_SIZE (FP0_REGNUM));
fc.fsr = read_register (FPS_REGNUM);
@@ -571,7 +571,7 @@ store_inferior_registers (int regno)
{
unsigned int reg;
- reg = *(unsigned int *) &registers[REGISTER_BYTE (regno) + i];
+ reg = *(unsigned int *) &deprecated_registers[REGISTER_BYTE (regno) + i];
errno = 0;
ptrace (ptrace_fun, PIDGET (inferior_ptid),
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index f390c48..d27d177 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -837,16 +837,16 @@ fill_gregset (gregset_t *gregsetp, int regno)
{
if ((regno == -1) || (regno == regi))
{
- *(regp + regi) = *(int *) &registers[REGISTER_BYTE (regi)];
+ *(regp + regi) = *(int *) &deprecated_registers[REGISTER_BYTE (regi)];
}
}
if ((regno == -1) || (regno == PS_REGNUM))
{
- *(regp + R_PS) = *(int *) &registers[REGISTER_BYTE (PS_REGNUM)];
+ *(regp + R_PS) = *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)];
}
if ((regno == -1) || (regno == PC_REGNUM))
{
- *(regp + R_PC) = *(int *) &registers[REGISTER_BYTE (PC_REGNUM)];
+ *(regp + R_PC) = *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
}
}
@@ -888,22 +888,22 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) &registers[REGISTER_BYTE (regi)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regi)];
to = (char *) &(fpregsetp->f_fpregs[regi - FP0_REGNUM][0]);
memcpy (to, from, REGISTER_RAW_SIZE (regi));
}
}
if ((regno == -1) || (regno == E_FPC_REGNUM))
{
- fpregsetp->f_pcr = *(int *) &registers[REGISTER_BYTE (E_FPC_REGNUM)];
+ fpregsetp->f_pcr = *(int *) &deprecated_registers[REGISTER_BYTE (E_FPC_REGNUM)];
}
if ((regno == -1) || (regno == E_FPS_REGNUM))
{
- fpregsetp->f_psr = *(int *) &registers[REGISTER_BYTE (E_FPS_REGNUM)];
+ fpregsetp->f_psr = *(int *) &deprecated_registers[REGISTER_BYTE (E_FPS_REGNUM)];
}
if ((regno == -1) || (regno == E_FPI_REGNUM))
{
- fpregsetp->f_fpiaddr = *(int *) &registers[REGISTER_BYTE (E_FPI_REGNUM)];
+ fpregsetp->f_fpiaddr = *(int *) &deprecated_registers[REGISTER_BYTE (E_FPI_REGNUM)];
}
}
diff --git a/gdb/m68knbsd-nat.c b/gdb/m68knbsd-nat.c
index d09b79e..191327a 100644
--- a/gdb/m68knbsd-nat.c
+++ b/gdb/m68knbsd-nat.c
@@ -36,12 +36,12 @@ fetch_inferior_registers (int regno)
ptrace (PT_GETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_registers, 0);
- memcpy (&registers[REGISTER_BYTE (0)], &inferior_registers,
+ memcpy (&deprecated_registers[REGISTER_BYTE (0)], &inferior_registers,
sizeof (inferior_registers));
ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_fp_registers, 0);
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
sizeof (inferior_fp_registers));
deprecated_registers_fetched ();
@@ -53,12 +53,12 @@ store_inferior_registers (int regno)
struct reg inferior_registers;
struct fpreg inferior_fp_registers;
- memcpy (&inferior_registers, &registers[REGISTER_BYTE (0)],
+ memcpy (&inferior_registers, &deprecated_registers[REGISTER_BYTE (0)],
sizeof (inferior_registers));
ptrace (PT_SETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_registers, 0);
- memcpy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
+ memcpy (&inferior_fp_registers, &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
sizeof (inferior_fp_registers));
ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_fp_registers, 0);
@@ -77,10 +77,10 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
struct md_core *core_reg = (struct md_core *) core_reg_sect;
/* Integer registers */
- memcpy (&registers[REGISTER_BYTE (0)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (0)],
&core_reg->intreg, sizeof (struct reg));
/* Floating point registers */
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
&core_reg->freg, sizeof (struct fpreg));
}
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index 03279d8..9ad457b 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -132,7 +132,7 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
if (regno < 32)
{
- src = &registers[REGISTER_BYTE (regno)];
+ src = &deprecated_registers[REGISTER_BYTE (regno)];
dst = regp + regno + EF_REG0;
memcpy (dst, src, sizeof (elf_greg_t));
return;
@@ -163,7 +163,7 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
if (regaddr != -1)
{
- src = &registers[REGISTER_BYTE (regno)];
+ src = &deprecated_registers[REGISTER_BYTE (regno)];
dst = regp + regaddr;
memcpy (dst, src, sizeof (elf_greg_t));
}
@@ -199,13 +199,13 @@ fill_fpregset (elf_fpregset_t *fpregsetp, int regno)
if ((regno >= FP0_REGNUM) && (regno < FP0_REGNUM + 32))
{
- from = (char *) &registers[REGISTER_BYTE (regno)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regno)];
to = (char *) (*fpregsetp + regno - FP0_REGNUM);
memcpy (to, from, REGISTER_RAW_SIZE (regno - FP0_REGNUM));
}
else if (regno == FCRCS_REGNUM)
{
- from = (char *) &registers[REGISTER_BYTE (regno)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regno)];
to = (char *) (*fpregsetp + 32);
memcpy (to, from, REGISTER_RAW_SIZE (regno));
}
diff --git a/gdb/mipsm3-nat.c b/gdb/mipsm3-nat.c
index 97a74dd..22f947f 100644
--- a/gdb/mipsm3-nat.c
+++ b/gdb/mipsm3-nat.c
@@ -122,14 +122,14 @@ static int reg_offset[] =
* Caller knows that the regs handled in one transaction are of same size.
*/
#define FETCH_REGS(state, regnum, count) \
- memcpy (&registers[REGISTER_BYTE (regnum)], \
+ memcpy (&deprecated_registers[REGISTER_BYTE (regnum)], \
(char *)state+reg_offset[ regnum ], \
count*REGISTER_SIZE)
/* Store COUNT contiguous registers to thread STATE starting from REGNUM */
#define STORE_REGS(state, regnum, count) \
memcpy ((char *)state+reg_offset[ regnum ], \
- &registers[REGISTER_BYTE (regnum)], \
+ &deprecated_registers[REGISTER_BYTE (regnum)], \
count*REGISTER_SIZE)
#define REGS_ALL -1
@@ -204,7 +204,7 @@ fetch_inferior_registers (int regno)
}
/* ZERO_REGNUM is always zero */
- *(int *) registers = 0;
+ *(int *) deprecated_registers = 0;
/* Copy thread saved regs 1..31 to gdb's reg value array
* Luckily, they are contiquous
@@ -259,7 +259,7 @@ fetch_inferior_registers (int regno)
/* If the thread does not have saved COPROC1, set regs to zero */
if (!(exc_state.coproc_state & MIPS_STATUS_USE_COP1))
- bzero (&registers[REGISTER_BYTE (FP0_REGNUM)],
+ bzero (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
sizeof (struct mips_float_state));
else
{
@@ -324,7 +324,7 @@ store_inferior_registers (register int regno)
/* Don't allow these to change */
/* ZERO_REGNUM */
- *(int *) registers = 0;
+ *(int *) deprecated_registers = 0;
fetch_inferior_registers (PS_REGNUM);
fetch_inferior_registers (BADVADDR_REGNUM);
@@ -342,8 +342,8 @@ store_inferior_registers (register int regno)
* should go to threads frame pointer. If not true, this
* fails badly!!!!!
*/
- memcpy (&registers[REGISTER_BYTE (MACH_FP_REGNUM)],
- &registers[REGISTER_BYTE (FP_REGNUM)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (MACH_FP_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (FP_REGNUM)],
REGISTER_RAW_SIZE (FP_REGNUM));
#endif
diff --git a/gdb/mipsv4-nat.c b/gdb/mipsv4-nat.c
index 901f9b0..ec46df6 100644
--- a/gdb/mipsv4-nat.c
+++ b/gdb/mipsv4-nat.c
@@ -75,19 +75,19 @@ fill_gregset (gregset_t *gregsetp, int regno)
for (regi = 0; regi <= 32; regi++)
if ((regno == -1) || (regno == regi))
- *(regp + regi) = *(greg_t *) & registers[REGISTER_BYTE (regi)];
+ *(regp + regi) = *(greg_t *) & deprecated_registers[REGISTER_BYTE (regi)];
if ((regno == -1) || (regno == PC_REGNUM))
- *(regp + CXT_EPC) = *(greg_t *) & registers[REGISTER_BYTE (PC_REGNUM)];
+ *(regp + CXT_EPC) = *(greg_t *) & deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
if ((regno == -1) || (regno == CAUSE_REGNUM))
- *(regp + CXT_CAUSE) = *(greg_t *) & registers[REGISTER_BYTE (CAUSE_REGNUM)];
+ *(regp + CXT_CAUSE) = *(greg_t *) & deprecated_registers[REGISTER_BYTE (CAUSE_REGNUM)];
if ((regno == -1) || (regno == HI_REGNUM))
- *(regp + CXT_MDHI) = *(greg_t *) & registers[REGISTER_BYTE (HI_REGNUM)];
+ *(regp + CXT_MDHI) = *(greg_t *) & deprecated_registers[REGISTER_BYTE (HI_REGNUM)];
if ((regno == -1) || (regno == LO_REGNUM))
- *(regp + CXT_MDLO) = *(greg_t *) & registers[REGISTER_BYTE (LO_REGNUM)];
+ *(regp + CXT_MDLO) = *(greg_t *) & deprecated_registers[REGISTER_BYTE (LO_REGNUM)];
}
/*
@@ -125,14 +125,14 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) &registers[REGISTER_BYTE (regi)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regi)];
to = (char *) &(fpregsetp->fp_r.fp_regs[regi - FP0_REGNUM]);
memcpy (to, from, REGISTER_RAW_SIZE (regi));
}
}
if ((regno == -1) || (regno == FCRCS_REGNUM))
- fpregsetp->fp_csr = *(unsigned *) &registers[REGISTER_BYTE (FCRCS_REGNUM)];
+ fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)];
}
diff --git a/gdb/ns32knbsd-nat.c b/gdb/ns32knbsd-nat.c
index d8bd216..bf5250f 100644
--- a/gdb/ns32knbsd-nat.c
+++ b/gdb/ns32knbsd-nat.c
@@ -32,10 +32,10 @@
#include "regcache.h"
#define RF(dst, src) \
- memcpy(&registers[REGISTER_BYTE(dst)], &src, sizeof(src))
+ memcpy(&deprecated_registers[REGISTER_BYTE(dst)], &src, sizeof(src))
#define RS(src, dst) \
- memcpy(&dst, &registers[REGISTER_BYTE(src)], sizeof(dst))
+ memcpy(&dst, &deprecated_registers[REGISTER_BYTE(src)], sizeof(dst))
void
fetch_inferior_registers (int regno)
diff --git a/gdb/ppc-bdm.c b/gdb/ppc-bdm.c
index 7631e95..9e7133e 100644
--- a/gdb/ppc-bdm.c
+++ b/gdb/ppc-bdm.c
@@ -295,7 +295,7 @@ bdm_ppc_store_registers (int regno)
&& ((i < FP0_REGNUM) || (i > FPLAST_REGNUM)))
{
/* printf("write valid reg %d\n", bdm_regno); */
- ocd_write_bdm_registers (bdm_regno, registers + REGISTER_BYTE (i), 4);
+ ocd_write_bdm_registers (bdm_regno, deprecated_registers + REGISTER_BYTE (i), 4);
}
/*
else if (i == gdbarch_tdep (current_gdbarch)->ppc_mq_regnum)
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c
index ecaed85..1f01706 100644
--- a/gdb/ppc-sysv-tdep.c
+++ b/gdb/ppc-sysv-tdep.c
@@ -175,7 +175,7 @@ ppc_sysv_abi_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
{
char val_buf[4];
store_address (val_buf, 4, struct_addr);
- memcpy (&registers[REGISTER_BYTE (greg)], val_buf, 4);
+ memcpy (&deprecated_registers[REGISTER_BYTE (greg)], val_buf, 4);
greg++;
}
/* Now fill in the registers and stack... */
@@ -192,7 +192,7 @@ ppc_sysv_abi_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
if (len > 8)
printf_unfiltered (
"Fatal Error: a floating point parameter #%d with a size > 8 is found!\n", argno);
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM + freg)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM + freg)],
VALUE_CONTENTS (arg), len);
freg++;
}
@@ -222,9 +222,9 @@ ppc_sysv_abi_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
if ((greg & 1) == 0)
greg++;
- memcpy (&registers[REGISTER_BYTE (greg)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (greg)],
VALUE_CONTENTS (arg), 4);
- memcpy (&registers[REGISTER_BYTE (greg + 1)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (greg + 1)],
VALUE_CONTENTS (arg) + 4, 4);
greg += 2;
}
@@ -247,7 +247,7 @@ ppc_sysv_abi_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
}
if (greg <= 10)
{
- memcpy (&registers[REGISTER_BYTE (greg)], val_buf, 4);
+ memcpy (&deprecated_registers[REGISTER_BYTE (greg)], val_buf, 4);
greg++;
}
else
@@ -268,7 +268,7 @@ ppc_sysv_abi_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
memcpy (v_val_buf, VALUE_CONTENTS (arg), len);
if (vreg <= 13)
{
- memcpy (&registers[REGISTER_BYTE (tdep->ppc_vr0_regnum
+ memcpy (&deprecated_registers[REGISTER_BYTE (tdep->ppc_vr0_regnum
+ vreg)],
v_val_buf, 16);
vreg++;
diff --git a/gdb/ptx4-nat.c b/gdb/ptx4-nat.c
index 65eef9d..1798b50 100644
--- a/gdb/ptx4-nat.c
+++ b/gdb/ptx4-nat.c
@@ -59,7 +59,7 @@ fill_gregset (gregset_t *gregsetp, int regno)
{
if ((regno == -1) || (regno == regi))
{
- (*gregsetp)[regi] = *(greg_t *) & registers[REGISTER_BYTE (regi)];
+ (*gregsetp)[regi] = *(greg_t *) & deprecated_registers[REGISTER_BYTE (regi)];
}
}
}
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 9afafad..1bbdb61 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -489,7 +489,7 @@ struct regcache *current_regcache;
/* REGISTERS contains the cached register values (in target byte order). */
-char *registers;
+char *deprecated_registers;
/* DEPRECATED_REGISTER_VALID is 0 if the register needs to be fetched,
1 if it has been fetched, and
@@ -657,7 +657,7 @@ deprecated_read_register_bytes (int in_start, char *in_buf, int in_len)
/* FIXME: cagney/2001-08-18: This is just silly. It defeats
the entire register read/write flow of control. Must
resist temptation to return 0xdeadbeef. */
- memcpy (reg_buf, registers + reg_start, reg_len);
+ memcpy (reg_buf, &deprecated_registers[reg_start], reg_len);
/* Legacy note: This function, for some reason, allows a NULL
input buffer. If the buffer is NULL, the registers are still
@@ -1000,7 +1000,7 @@ deprecated_write_register_bytes (int myregstart, char *myaddr, int inlen)
Update it from the target before scribbling on it. */
deprecated_read_register_gen (regnum, regbuf);
- memcpy (registers + overlapstart,
+ memcpy (&deprecated_registers[overlapstart],
myaddr + (overlapstart - myregstart),
overlapend - overlapstart);
@@ -1413,7 +1413,7 @@ build_regcache (void)
{
current_regcache = regcache_xmalloc (current_gdbarch);
current_regcache->readonly_p = 0;
- registers = deprecated_grub_regcache_for_registers (current_regcache);
+ deprecated_registers = deprecated_grub_regcache_for_registers (current_regcache);
deprecated_register_valid = deprecated_grub_regcache_for_register_valid (current_regcache);
}
@@ -1695,7 +1695,7 @@ _initialize_regcache (void)
regcache_descr_handle = register_gdbarch_data (init_regcache_descr,
xfree_regcache_descr);
REGISTER_GDBARCH_SWAP (current_regcache);
- register_gdbarch_swap (&registers, sizeof (registers), NULL);
+ register_gdbarch_swap (&deprecated_registers, sizeof (deprecated_registers), NULL);
register_gdbarch_swap (&deprecated_register_valid, sizeof (deprecated_register_valid), NULL);
register_gdbarch_swap (NULL, 0, build_regcache);
diff --git a/gdb/regcache.h b/gdb/regcache.h
index 2b8f2fe..de6a321 100644
--- a/gdb/regcache.h
+++ b/gdb/regcache.h
@@ -129,11 +129,6 @@ extern struct type *register_type (struct gdbarch *gdbarch, int regnum);
extern int max_register_size (struct gdbarch *gdbarch);
-/* DEPRECATED: Character array containing an image of the inferior
- programs' registers for the most recently referenced thread. */
-
-extern char *registers;
-
/* Save/restore a register cache. The registers saved/restored is
determined by the save_reggroup and restore_reggroup (although you
can't restore a register that wasn't saved as well :-). You can
@@ -192,6 +187,15 @@ extern void deprecated_write_register_bytes (int regbyte, char *myaddr,
available. */
extern signed char *deprecated_register_valid;
+/* Character array containing an image of the inferior programs'
+ registers for the most recently referenced thread.
+
+ NOTE: cagney/2002-11-14: Target side code should be using
+ supply_register() and/or regcache_collect() while architecture side
+ code should use the more generic regcache methods. */
+
+extern char *deprecated_registers;
+
/* NOTE: cagney/2002-11-05: This function, and its co-conspirator
deprecated_registers[], have been superseeded by supply_register(). */
extern void deprecated_registers_fetched (void);
diff --git a/gdb/remote-es.c b/gdb/remote-es.c
index 452e02e..72e6171 100644
--- a/gdb/remote-es.c
+++ b/gdb/remote-es.c
@@ -623,7 +623,7 @@ es1800_fetch_register (int regno)
{
error ("Emulator reply is too short: %s", buf);
}
- registers[r++] = (fromhex (p[k * 2 + 1]) * 16) + fromhex (p[k * 2 + 2]);
+ deprecated_registers[r++] = (fromhex (p[k * 2 + 1]) * 16) + fromhex (p[k * 2 + 2]);
}
}
else
@@ -666,7 +666,7 @@ es1800_fetch_registers (void)
{
error ("Emulator reply is too short: %s", buf);
}
- registers[r++] = (fromhex (p[i + 0]) * 16) + fromhex (p[i + 1]);
+ deprecated_registers[r++] = (fromhex (p[i + 0]) * 16) + fromhex (p[i + 1]);
i += 2;
}
}
@@ -685,7 +685,7 @@ es1800_fetch_registers (void)
{
error ("Emulator reply is too short: %s", buf);
}
- registers[r++] = (fromhex (p[i + 0])) * 16 + fromhex (p[i + 1]);
+ deprecated_registers[r++] = (fromhex (p[i + 0])) * 16 + fromhex (p[i + 1]);
i += 2;
}
}
@@ -725,7 +725,7 @@ es1800_fetch_registers (void)
{
error ("Emulator reply is too short: %s", buf);
}
- registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
+ deprecated_registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
}
p = SR_buf;
@@ -735,7 +735,7 @@ es1800_fetch_registers (void)
{
error ("Emulator reply is too short: %s", buf);
}
- registers[r++] =
+ deprecated_registers[r++] =
fromhex (SR_buf[k * 2 + 1]) * 16 + fromhex (SR_buf[k * 2 + 2]);
}
send_with_reply ("PC", buf, sizeof (buf));
@@ -746,7 +746,7 @@ es1800_fetch_registers (void)
{
error ("Emulator reply is too short: %s", buf);
}
- registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
+ deprecated_registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
}
}
else
@@ -771,7 +771,7 @@ es1800_fetch_registers (void)
{
error ("Emulator reply is too short: %s", buf);
}
- registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
+ deprecated_registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
}
/* fetch STATUS */
@@ -783,7 +783,7 @@ es1800_fetch_registers (void)
{
error ("Emulator reply is too short: %s", buf);
}
- registers[r++] =
+ deprecated_registers[r++] =
fromhex (SR_buf[k * 2 + 1]) * 16 + fromhex (SR_buf[k * 2 + 2]);
}
@@ -797,7 +797,7 @@ es1800_fetch_registers (void)
{
error ("Emulator reply is too short: %s", buf);
}
- registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
+ deprecated_registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
}
}
}
@@ -827,7 +827,7 @@ es1800_store_register (int regno)
int k;
unsigned char *r;
- r = (unsigned char *) registers;
+ r = (unsigned char *) deprecated_registers;
if (regno == -1) /* write all registers */
{
diff --git a/gdb/remote-sds.c b/gdb/remote-sds.c
index 19781a2..6797d05 100644
--- a/gdb/remote-sds.c
+++ b/gdb/remote-sds.c
@@ -528,7 +528,7 @@ sds_store_registers (int regno)
*p++ = 0;
*p++ = 0;
for (i = 0; i < 4 * 6; i++)
- *p++ = registers[i + 4 * 32 + 8 * 32];
+ *p++ = deprecated_registers[i + 4 * 32 + 8 * 32];
for (i = 0; i < 4 * 1; i++)
*p++ = 0;
for (i = 0; i < 4 * 4; i++)
@@ -543,7 +543,7 @@ sds_store_registers (int regno)
*p++ = 0;
*p++ = 0;
for (i = 0; i < 4 * 32; i++)
- *p++ = registers[i];
+ *p++ = deprecated_registers[i];
sds_send (buf, p - buf);
diff --git a/gdb/remote-vx68.c b/gdb/remote-vx68.c
index c6f1e68..e7f138d 100644
--- a/gdb/remote-vx68.c
+++ b/gdb/remote-vx68.c
@@ -85,10 +85,13 @@ vx_read_register (int regno)
net_read_registers (mc68k_greg_packet, MC68K_GREG_PLEN, PTRACE_GETREGS);
- bcopy (&mc68k_greg_packet[MC68K_R_D0], registers, 16 * MC68K_GREG_SIZE);
- bcopy (&mc68k_greg_packet[MC68K_R_SR], &registers[REGISTER_BYTE (PS_REGNUM)],
+ bcopy (&mc68k_greg_packet[MC68K_R_D0], deprecated_registers,
+ 16 * MC68K_GREG_SIZE);
+ bcopy (&mc68k_greg_packet[MC68K_R_SR],
+ &deprecated_registers[REGISTER_BYTE (PS_REGNUM)],
MC68K_GREG_SIZE);
- bcopy (&mc68k_greg_packet[MC68K_R_PC], &registers[REGISTER_BYTE (PC_REGNUM)],
+ bcopy (&mc68k_greg_packet[MC68K_R_PC],
+ &deprecated_registers[REGISTER_BYTE (PC_REGNUM)],
MC68K_GREG_SIZE);
/* Get floating-point registers, if the target system has them.
@@ -100,17 +103,17 @@ vx_read_register (int regno)
PTRACE_GETFPREGS);
bcopy (&mc68k_fpreg_packet[MC68K_R_FP0],
- &registers[REGISTER_BYTE (FP0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
MC68K_FPREG_SIZE * 8);
bcopy (&mc68k_fpreg_packet[MC68K_R_FPCR],
- &registers[REGISTER_BYTE (FPC_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (FPC_REGNUM)],
MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
}
else
{
- bzero (&registers[REGISTER_BYTE (FP0_REGNUM)],
+ bzero (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
MC68K_FPREG_SIZE * 8);
- bzero (&registers[REGISTER_BYTE (FPC_REGNUM)],
+ bzero (&deprecated_registers[REGISTER_BYTE (FPC_REGNUM)],
MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
}
@@ -131,10 +134,11 @@ vx_write_register (int regno)
/* Store general-purpose registers. */
- bcopy (registers, &mc68k_greg_packet[MC68K_R_D0], 16 * MC68K_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (PS_REGNUM)],
+ bcopy (deprecated_registers, &mc68k_greg_packet[MC68K_R_D0],
+ 16 * MC68K_GREG_SIZE);
+ bcopy (&deprecated_registers[REGISTER_BYTE (PS_REGNUM)],
&mc68k_greg_packet[MC68K_R_SR], MC68K_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (PC_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (PC_REGNUM)],
&mc68k_greg_packet[MC68K_R_PC], MC68K_GREG_SIZE);
net_write_registers (mc68k_greg_packet, MC68K_GREG_PLEN, PTRACE_SETREGS);
@@ -143,10 +147,10 @@ vx_write_register (int regno)
if (target_has_fp)
{
- bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
&mc68k_fpreg_packet[MC68K_R_FP0],
MC68K_FPREG_SIZE * 8);
- bcopy (&registers[REGISTER_BYTE (FPC_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (FPC_REGNUM)],
&mc68k_fpreg_packet[MC68K_R_FPCR],
MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
diff --git a/gdb/remote-vxmips.c b/gdb/remote-vxmips.c
index 4ffde16..441bd9b 100644
--- a/gdb/remote-vxmips.c
+++ b/gdb/remote-vxmips.c
@@ -103,18 +103,19 @@ vx_read_register (int regno)
/* Copy the general registers. */
- bcopy (&mips_greg_packet[MIPS_R_GP0], &registers[0], 32 * MIPS_GREG_SIZE);
+ bcopy (&mips_greg_packet[MIPS_R_GP0], &deprecated_registers[0],
+ 32 * MIPS_GREG_SIZE);
/* Copy SR, LO, HI, and PC. */
bcopy (&mips_greg_packet[MIPS_R_SR],
- &registers[REGISTER_BYTE (PS_REGNUM)], MIPS_GREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (PS_REGNUM)], MIPS_GREG_SIZE);
bcopy (&mips_greg_packet[MIPS_R_LO],
- &registers[REGISTER_BYTE (LO_REGNUM)], MIPS_GREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (LO_REGNUM)], MIPS_GREG_SIZE);
bcopy (&mips_greg_packet[MIPS_R_HI],
- &registers[REGISTER_BYTE (HI_REGNUM)], MIPS_GREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (HI_REGNUM)], MIPS_GREG_SIZE);
bcopy (&mips_greg_packet[MIPS_R_PC],
- &registers[REGISTER_BYTE (PC_REGNUM)], MIPS_GREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (PC_REGNUM)], MIPS_GREG_SIZE);
/* If the target has floating point registers, fetch them.
Otherwise, zero the floating point register values in
@@ -129,20 +130,20 @@ vx_read_register (int regno)
/* Copy the floating point registers. */
bcopy (&mips_fpreg_packet[MIPS_R_FP0],
- &registers[REGISTER_BYTE (FP0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
/* Copy the floating point control/status register (fpcsr). */
bcopy (&mips_fpreg_packet[MIPS_R_FPCSR],
- &registers[REGISTER_BYTE (FCRCS_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)],
REGISTER_RAW_SIZE (FCRCS_REGNUM));
}
else
{
- bzero ((char *) &registers[REGISTER_BYTE (FP0_REGNUM)],
+ bzero ((char *) &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
- bzero ((char *) &registers[REGISTER_BYTE (FCRCS_REGNUM)],
+ bzero ((char *) &deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)],
REGISTER_RAW_SIZE (FCRCS_REGNUM));
}
@@ -162,17 +163,18 @@ vx_write_register (int regno)
/* Store general registers. */
- bcopy (&registers[0], &mips_greg_packet[MIPS_R_GP0], 32 * MIPS_GREG_SIZE);
+ bcopy (&deprecated_registers[0], &mips_greg_packet[MIPS_R_GP0],
+ 32 * MIPS_GREG_SIZE);
/* Copy SR, LO, HI, and PC. */
- bcopy (&registers[REGISTER_BYTE (PS_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (PS_REGNUM)],
&mips_greg_packet[MIPS_R_SR], MIPS_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (LO_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (LO_REGNUM)],
&mips_greg_packet[MIPS_R_LO], MIPS_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (HI_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (HI_REGNUM)],
&mips_greg_packet[MIPS_R_HI], MIPS_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (PC_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (PC_REGNUM)],
&mips_greg_packet[MIPS_R_PC], MIPS_GREG_SIZE);
net_write_registers (mips_greg_packet, MIPS_GREG_PLEN, PTRACE_SETREGS);
@@ -183,13 +185,13 @@ vx_write_register (int regno)
{
/* Copy the floating point data registers. */
- bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
&mips_fpreg_packet[MIPS_R_FP0],
REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
/* Copy the floating point control/status register (fpcsr). */
- bcopy (&registers[REGISTER_BYTE (FCRCS_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)],
&mips_fpreg_packet[MIPS_R_FPCSR],
REGISTER_RAW_SIZE (FCRCS_REGNUM));
diff --git a/gdb/remote-vxsparc.c b/gdb/remote-vxsparc.c
index 31cbd49..eb59b9f 100644
--- a/gdb/remote-vxsparc.c
+++ b/gdb/remote-vxsparc.c
@@ -92,18 +92,19 @@ vx_read_register (int regno)
as defined in "tm-sparc.h". */
bcopy (&sparc_greg_packet[SPARC_R_G0],
- &registers[REGISTER_BYTE (G0_REGNUM)], 32 * SPARC_GREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (G0_REGNUM)],
+ 32 * SPARC_GREG_SIZE);
bcopy (&sparc_greg_packet[SPARC_R_Y],
- &registers[REGISTER_BYTE (Y_REGNUM)], 6 * SPARC_GREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (Y_REGNUM)], 6 * SPARC_GREG_SIZE);
/* Now write the local and in registers to the register window
spill area in the frame. VxWorks does not do this for the
active frame automatically; it greatly simplifies debugging
(FRAME_FIND_SAVED_REGS, in particular, depends on this). */
- sp = extract_address (&registers[REGISTER_BYTE (SP_REGNUM)],
+ sp = extract_address (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)],
REGISTER_RAW_SIZE (SP_REGNUM));
- write_memory (sp, &registers[REGISTER_BYTE (L0_REGNUM)],
+ write_memory (sp, &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM));
/* If the target has floating point registers, fetch them.
@@ -116,14 +117,18 @@ vx_read_register (int regno)
net_read_registers (sparc_fpreg_packet, SPARC_FPREG_PLEN,
PTRACE_GETFPREGS);
bcopy (&sparc_fpreg_packet[SPARC_R_FP0],
- &registers[REGISTER_BYTE (FP0_REGNUM)], 32 * SPARC_FPREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
+ 32 * SPARC_FPREG_SIZE);
bcopy (&sparc_fpreg_packet[SPARC_R_FSR],
- &registers[REGISTER_BYTE (FPS_REGNUM)], 1 * SPARC_FPREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (FPS_REGNUM)],
+ 1 * SPARC_FPREG_SIZE);
}
else
{
- bzero (&registers[REGISTER_BYTE (FP0_REGNUM)], 32 * SPARC_FPREG_SIZE);
- bzero (&registers[REGISTER_BYTE (FPS_REGNUM)], 1 * SPARC_FPREG_SIZE);
+ bzero (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
+ 32 * SPARC_FPREG_SIZE);
+ bzero (&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)],
+ 1 * SPARC_FPREG_SIZE);
}
/* Mark the register cache valid. */
@@ -160,9 +165,9 @@ vx_write_register (int regno)
}
if (in_gp_regs)
{
- bcopy (&registers[REGISTER_BYTE (G0_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (G0_REGNUM)],
&sparc_greg_packet[SPARC_R_G0], 32 * SPARC_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (Y_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (Y_REGNUM)],
&sparc_greg_packet[SPARC_R_Y], 6 * SPARC_GREG_SIZE);
net_write_registers (sparc_greg_packet, SPARC_GREG_PLEN, PTRACE_SETREGS);
@@ -172,9 +177,9 @@ vx_write_register (int regno)
if (regno < 0 || (L0_REGNUM <= regno && regno <= I7_REGNUM))
{
- sp = extract_address (&registers[REGISTER_BYTE (SP_REGNUM)],
+ sp = extract_address (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)],
REGISTER_RAW_SIZE (SP_REGNUM));
- write_memory (sp, &registers[REGISTER_BYTE (L0_REGNUM)],
+ write_memory (sp, &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM));
}
}
@@ -183,9 +188,9 @@ vx_write_register (int regno)
if (in_fp_regs && target_has_fp)
{
- bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
&sparc_fpreg_packet[SPARC_R_FP0], 32 * SPARC_FPREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (FPS_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)],
&sparc_fpreg_packet[SPARC_R_FSR], 1 * SPARC_FPREG_SIZE);
net_write_registers (sparc_fpreg_packet, SPARC_FPREG_PLEN,
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index b087a0b..26f5e4c 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -995,7 +995,8 @@ rs6000_pop_frame (void)
addr = prev_sp + fdata.gpr_offset;
for (ii = fdata.saved_gpr; ii <= 31; ++ii)
{
- read_memory (addr, &registers[REGISTER_BYTE (ii)], wordsize);
+ read_memory (addr, &deprecated_registers[REGISTER_BYTE (ii)],
+ wordsize);
addr += wordsize;
}
}
@@ -1005,7 +1006,7 @@ rs6000_pop_frame (void)
addr = prev_sp + fdata.fpr_offset;
for (ii = fdata.saved_fpr; ii <= 31; ++ii)
{
- read_memory (addr, &registers[REGISTER_BYTE (ii + FP0_REGNUM)], 8);
+ read_memory (addr, &deprecated_registers[REGISTER_BYTE (ii + FP0_REGNUM)], 8);
addr += 8;
}
}
@@ -1122,7 +1123,7 @@ rs6000_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
printf_unfiltered (
"Fatal Error: a floating point parameter #%d with a size > 8 is found!\n", argno);
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM + 1 + f_argno)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM + 1 + f_argno)],
VALUE_CONTENTS (arg),
len);
++f_argno;
@@ -1134,8 +1135,9 @@ rs6000_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
/* Argument takes more than one register. */
while (argbytes < len)
{
- memset (&registers[REGISTER_BYTE (ii + 3)], 0, reg_size);
- memcpy (&registers[REGISTER_BYTE (ii + 3)],
+ memset (&deprecated_registers[REGISTER_BYTE (ii + 3)], 0,
+ reg_size);
+ memcpy (&deprecated_registers[REGISTER_BYTE (ii + 3)],
((char *) VALUE_CONTENTS (arg)) + argbytes,
(len - argbytes) > reg_size
? reg_size : len - argbytes);
@@ -1151,8 +1153,8 @@ rs6000_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
{
/* Argument can fit in one register. No problem. */
int adj = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? reg_size - len : 0;
- memset (&registers[REGISTER_BYTE (ii + 3)], 0, reg_size);
- memcpy ((char *)&registers[REGISTER_BYTE (ii + 3)] + adj,
+ memset (&deprecated_registers[REGISTER_BYTE (ii + 3)], 0, reg_size);
+ memcpy ((char *)&deprecated_registers[REGISTER_BYTE (ii + 3)] + adj,
VALUE_CONTENTS (arg), len);
}
++argno;
@@ -1234,7 +1236,7 @@ ran_out_of_registers_for_arguments:
printf_unfiltered (
"Fatal Error: a floating point parameter #%d with a size > 8 is found!\n", argno);
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM + 1 + f_argno)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM + 1 + f_argno)],
VALUE_CONTENTS (arg),
len);
++f_argno;
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index ccef315..13b9580 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -648,7 +648,8 @@ sol_thread_store_registers (int regno)
{ /* Not writing all the regs */
/* save new register value */
char* old_value = (char*) alloca (REGISTER_SIZE);
- memcpy (old_value, &registers[REGISTER_BYTE (regno)], REGISTER_SIZE);
+ memcpy (old_value, &deprecated_registers[REGISTER_BYTE (regno)],
+ REGISTER_SIZE);
val = p_td_thr_getgregs (&thandle, gregset);
if (val != TD_OK)
@@ -660,7 +661,8 @@ sol_thread_store_registers (int regno)
td_err_string (val));
/* restore new register value */
- memcpy (&registers[REGISTER_BYTE (regno)], old_value, REGISTER_SIZE);
+ memcpy (&deprecated_registers[REGISTER_BYTE (regno)], old_value,
+ REGISTER_SIZE);
#if 0
/* thread_db doesn't seem to handle this right */
diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c
index 611f50d..b2c6d41 100644
--- a/gdb/sparc-nat.c
+++ b/gdb/sparc-nat.c
@@ -79,12 +79,15 @@ fetch_inferior_registers (int regno)
(PTRACE_ARG3_TYPE) & inferior_registers, 0))
perror ("ptrace_getregs");
- registers[REGISTER_BYTE (0)] = 0;
- memcpy (&registers[REGISTER_BYTE (1)], &inferior_registers.r_g1,
- 15 * REGISTER_RAW_SIZE (G0_REGNUM));
- *(int *) &registers[REGISTER_BYTE (PS_REGNUM)] = inferior_registers.r_ps;
- *(int *) &registers[REGISTER_BYTE (PC_REGNUM)] = inferior_registers.r_pc;
- *(int *) &registers[REGISTER_BYTE (NPC_REGNUM)] = inferior_registers.r_npc;
+ deprecated_registers[REGISTER_BYTE (0)] = 0;
+ memcpy (&deprecated_registers[REGISTER_BYTE (1)],
+ &inferior_registers.r_g1, 15 * REGISTER_RAW_SIZE (G0_REGNUM));
+ *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)]
+ = inferior_registers.r_ps;
+ *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)]
+ = inferior_registers.r_pc;
+ *(int *) &deprecated_registers[REGISTER_BYTE (NPC_REGNUM)]
+ = inferior_registers.r_npc;
*(int *) &registers[REGISTER_BYTE (Y_REGNUM)] = inferior_registers.r_y;
for (i = G0_REGNUM; i <= O7_REGNUM; i++)
@@ -109,11 +112,10 @@ fetch_inferior_registers (int regno)
(PTRACE_ARG3_TYPE) & inferior_fp_registers,
0))
perror ("ptrace_getfpregs");
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
- sizeof inferior_fp_registers.fpu_fr);
- memcpy (&registers[REGISTER_BYTE (FPS_REGNUM)],
- &inferior_fp_registers.Fpu_fsr,
- sizeof (FPU_FSR_TYPE));
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
+ &inferior_fp_registers, sizeof inferior_fp_registers.fpu_fr);
+ memcpy (&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)],
+ &inferior_fp_registers.Fpu_fsr, sizeof (FPU_FSR_TYPE));
for (i = FP0_REGNUM; i <= FP0_REGNUM + 31; i++)
deprecated_register_valid[i] = 1;
deprecated_register_valid[FPS_REGNUM] = 1;
@@ -123,20 +125,20 @@ fetch_inferior_registers (int regno)
all (16 ptrace calls!) if we really need them. */
if (regno == -1)
{
- CORE_ADDR sp = *(unsigned int *) & registers[REGISTER_BYTE (SP_REGNUM)];
- target_read_memory (sp, &registers[REGISTER_BYTE (L0_REGNUM)],
+ CORE_ADDR sp = *(unsigned int *) & deprecated_registers[REGISTER_BYTE (SP_REGNUM)];
+ target_read_memory (sp, &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM));
for (i = L0_REGNUM; i <= I7_REGNUM; i++)
deprecated_register_valid[i] = 1;
}
else if (regno >= L0_REGNUM && regno <= I7_REGNUM)
{
- CORE_ADDR sp = *(unsigned int *) & registers[REGISTER_BYTE (SP_REGNUM)];
+ CORE_ADDR sp = *(unsigned int *) & deprecated_registers[REGISTER_BYTE (SP_REGNUM)];
i = REGISTER_BYTE (regno);
if (deprecated_register_valid[regno])
printf_unfiltered ("register %d valid and read\n", regno);
target_read_memory (sp + i - REGISTER_BYTE (L0_REGNUM),
- &registers[i], REGISTER_RAW_SIZE (regno));
+ &deprecated_registers[i], REGISTER_RAW_SIZE (regno));
deprecated_register_valid[regno] = 1;
}
}
@@ -195,14 +197,14 @@ store_inferior_registers (int regno)
if (wanna_store & STACK_REGS)
{
- CORE_ADDR sp = *(unsigned int *) & registers[REGISTER_BYTE (SP_REGNUM)];
+ CORE_ADDR sp = *(unsigned int *) & deprecated_registers[REGISTER_BYTE (SP_REGNUM)];
if (regno < 0 || regno == SP_REGNUM)
{
if (!deprecated_register_valid[L0_REGNUM + 5])
internal_error (__FILE__, __LINE__, "failed internal consistency check");
target_write_memory (sp,
- &registers[REGISTER_BYTE (L0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM));
}
else
@@ -210,7 +212,7 @@ store_inferior_registers (int regno)
if (!deprecated_register_valid[regno])
internal_error (__FILE__, __LINE__, "failed internal consistency check");
target_write_memory (sp + REGISTER_BYTE (regno) - REGISTER_BYTE (L0_REGNUM),
- &registers[REGISTER_BYTE (regno)],
+ &deprecated_registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno));
}
@@ -221,17 +223,18 @@ store_inferior_registers (int regno)
if (!deprecated_register_valid[G1_REGNUM])
internal_error (__FILE__, __LINE__, "failed internal consistency check");
- memcpy (&inferior_registers.r_g1, &registers[REGISTER_BYTE (G1_REGNUM)],
+ memcpy (&inferior_registers.r_g1,
+ &deprecated_registers[REGISTER_BYTE (G1_REGNUM)],
15 * REGISTER_RAW_SIZE (G1_REGNUM));
inferior_registers.r_ps =
- *(int *) &registers[REGISTER_BYTE (PS_REGNUM)];
+ *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)];
inferior_registers.r_pc =
- *(int *) &registers[REGISTER_BYTE (PC_REGNUM)];
+ *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
inferior_registers.r_npc =
- *(int *) &registers[REGISTER_BYTE (NPC_REGNUM)];
+ *(int *) &deprecated_registers[REGISTER_BYTE (NPC_REGNUM)];
inferior_registers.r_y =
- *(int *) &registers[REGISTER_BYTE (Y_REGNUM)];
+ *(int *) &deprecated_registers[REGISTER_BYTE (Y_REGNUM)];
if (0 != ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_registers, 0))
@@ -242,10 +245,12 @@ store_inferior_registers (int regno)
{
if (!deprecated_register_valid[FP0_REGNUM + 9])
internal_error (__FILE__, __LINE__, "failed internal consistency check");
- memcpy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
+ memcpy (&inferior_fp_registers,
+ &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
sizeof inferior_fp_registers.fpu_fr);
memcpy (&inferior_fp_registers.Fpu_fsr,
- &registers[REGISTER_BYTE (FPS_REGNUM)], sizeof (FPU_FSR_TYPE));
+ &deprecated_registers[REGISTER_BYTE (FPS_REGNUM)],
+ sizeof (FPU_FSR_TYPE));
if (0 !=
ptrace (PTRACE_SETFPREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_fp_registers, 0))
@@ -277,15 +282,15 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
#define gregs ((struct regs *)core_reg_sect)
/* G0 *always* holds 0. */
- *(int *) &registers[REGISTER_BYTE (0)] = 0;
+ *(int *) &deprecated_registers[REGISTER_BYTE (0)] = 0;
/* The globals and output registers. */
- memcpy (&registers[REGISTER_BYTE (G1_REGNUM)], &gregs->r_g1,
+ memcpy (&deprecated_registers[REGISTER_BYTE (G1_REGNUM)], &gregs->r_g1,
15 * REGISTER_RAW_SIZE (G1_REGNUM));
- *(int *) &registers[REGISTER_BYTE (PS_REGNUM)] = gregs->r_ps;
- *(int *) &registers[REGISTER_BYTE (PC_REGNUM)] = gregs->r_pc;
- *(int *) &registers[REGISTER_BYTE (NPC_REGNUM)] = gregs->r_npc;
- *(int *) &registers[REGISTER_BYTE (Y_REGNUM)] = gregs->r_y;
+ *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)] = gregs->r_ps;
+ *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)] = gregs->r_pc;
+ *(int *) &deprecated_registers[REGISTER_BYTE (NPC_REGNUM)] = gregs->r_npc;
+ *(int *) &deprecated_registers[REGISTER_BYTE (Y_REGNUM)] = gregs->r_y;
/* My best guess at where to get the locals and input
registers is exactly where they usually are, right above
@@ -295,8 +300,9 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
{
int sp;
- sp = *(int *) &registers[REGISTER_BYTE (SP_REGNUM)];
- if (0 != target_read_memory (sp, &registers[REGISTER_BYTE (L0_REGNUM)],
+ sp = *(int *) &deprecated_registers[REGISTER_BYTE (SP_REGNUM)];
+ if (0 != target_read_memory (sp,
+ &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM)))
{
/* fprintf_unfiltered so user can still use gdb */
@@ -313,10 +319,10 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
#define fpuregs ((struct fpu *) core_reg_sect)
if (core_reg_size >= sizeof (struct fpu))
{
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], fpuregs->fpu_regs,
- sizeof (fpuregs->fpu_regs));
- memcpy (&registers[REGISTER_BYTE (FPS_REGNUM)], &fpuregs->fpu_fsr,
- sizeof (FPU_FSR_TYPE));
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
+ fpuregs->fpu_regs, sizeof (fpuregs->fpu_regs));
+ memcpy (&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)],
+ &fpuregs->fpu_fsr, sizeof (FPU_FSR_TYPE));
}
else
fprintf_unfiltered (gdb_stderr, "Couldn't read float regs from core file\n");
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 21e40be..af43c9f 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -1729,7 +1729,7 @@ fill_fpregset (gdb_fpregset_t *fpregsetp, int regno)
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) &registers[REGISTER_BYTE (regi)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regi)];
to = (char *) &fpregsetp->pr_fr.pr_regs[regi - FP0_REGNUM];
memcpy (to, from, REGISTER_RAW_SIZE (regi));
}
@@ -1738,7 +1738,7 @@ fill_fpregset (gdb_fpregset_t *fpregsetp, int regno)
if (!(GDB_TARGET_IS_SPARC64)) /* FIXME: does Sparc64 have this register? */
if ((regno == -1) || (regno == FPS_REGNUM))
{
- from = (char *)&registers[REGISTER_BYTE (FPS_REGNUM)];
+ from = (char *)&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)];
to = (char *) &fpregsetp->pr_fsr;
memcpy (to, from, REGISTER_RAW_SIZE (FPS_REGNUM));
}
diff --git a/gdb/sun3-nat.c b/gdb/sun3-nat.c
index e7a91ad..1df7858 100644
--- a/gdb/sun3-nat.c
+++ b/gdb/sun3-nat.c
@@ -45,15 +45,15 @@ fetch_inferior_registers (int regno)
ptrace (PTRACE_GETFPREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_fp_registers);
- memcpy (registers, &inferior_registers, 16 * 4);
+ memcpy (deprecated_registers, &inferior_registers, 16 * 4);
if (FP0_REGNUM >= 0)
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
- sizeof inferior_fp_registers.fps_regs);
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
+ &inferior_fp_registers, sizeof inferior_fp_registers.fps_regs);
- *(int *) &registers[REGISTER_BYTE (PS_REGNUM)] = inferior_registers.r_ps;
- *(int *) &registers[REGISTER_BYTE (PC_REGNUM)] = inferior_registers.r_pc;
+ *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)] = inferior_registers.r_ps;
+ *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)] = inferior_registers.r_pc;
if (FP0_REGNUM >= 0)
- memcpy (&registers[REGISTER_BYTE (FPC_REGNUM)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (FPC_REGNUM)],
&inferior_fp_registers.fps_control,
sizeof inferior_fp_registers -
sizeof inferior_fp_registers.fps_regs);
@@ -69,17 +69,18 @@ store_inferior_registers (int regno)
struct regs inferior_registers;
struct fp_status inferior_fp_registers;
- memcpy (&inferior_registers, registers, 16 * 4);
+ memcpy (&inferior_registers, deprecated_registers, 16 * 4);
if (FP0_REGNUM >= 0)
- memcpy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
+ memcpy (&inferior_fp_registers,
+ &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
sizeof inferior_fp_registers.fps_regs);
- inferior_registers.r_ps = *(int *) &registers[REGISTER_BYTE (PS_REGNUM)];
- inferior_registers.r_pc = *(int *) &registers[REGISTER_BYTE (PC_REGNUM)];
+ inferior_registers.r_ps = *(int *) &&deprecated_registers[REGISTER_BYTE (PS_REGNUM)];
+ inferior_registers.r_pc = *(int *) &&deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
if (FP0_REGNUM >= 0)
memcpy (&inferior_fp_registers.fps_control,
- &registers[REGISTER_BYTE (FPC_REGNUM)],
+ &&deprecated_registers[REGISTER_BYTE (FPC_REGNUM)],
sizeof inferior_fp_registers -
sizeof inferior_fp_registers.fps_regs);
@@ -116,7 +117,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
if (core_reg_size < sizeof (struct regs))
error ("Can't find registers in core file");
- memcpy (registers, (char *) regs, 16 * 4);
+ memcpy (&deprecated_registers, (char *) regs, 16 * 4);
supply_register (PS_REGNUM, (char *) &regs->r_ps);
supply_register (PC_REGNUM, (char *) &regs->r_pc);
@@ -130,10 +131,10 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
{
if (FP0_REGNUM >= 0)
{
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)],
+ memcpy (&&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
fpustruct->f_fpstatus.fps_regs,
sizeof fpustruct->f_fpstatus.fps_regs);
- memcpy (&registers[REGISTER_BYTE (FPC_REGNUM)],
+ memcpy (&&deprecated_registers[REGISTER_BYTE (FPC_REGNUM)],
&fpustruct->f_fpstatus.fps_control,
sizeof fpustruct->f_fpstatus -
sizeof fpustruct->f_fpstatus.fps_regs);
diff --git a/gdb/symm-nat.c b/gdb/symm-nat.c
index 62ed7f2..fb52754 100644
--- a/gdb/symm-nat.c
+++ b/gdb/symm-nat.c
@@ -68,29 +68,29 @@ store_inferior_registers (int regno)
to the registers array to solve this properly. */
mptrace (XPT_RREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0);
- regs.pr_eax = *(int *) &registers[REGISTER_BYTE (0)];
- regs.pr_ebx = *(int *) &registers[REGISTER_BYTE (5)];
- regs.pr_ecx = *(int *) &registers[REGISTER_BYTE (2)];
- regs.pr_edx = *(int *) &registers[REGISTER_BYTE (1)];
- regs.pr_esi = *(int *) &registers[REGISTER_BYTE (6)];
- regs.pr_edi = *(int *) &registers[REGISTER_BYTE (7)];
- regs.pr_esp = *(int *) &registers[REGISTER_BYTE (14)];
- regs.pr_ebp = *(int *) &registers[REGISTER_BYTE (15)];
- regs.pr_eip = *(int *) &registers[REGISTER_BYTE (16)];
- regs.pr_flags = *(int *) &registers[REGISTER_BYTE (17)];
+ regs.pr_eax = *(int *) &deprecated_registers[REGISTER_BYTE (0)];
+ regs.pr_ebx = *(int *) &deprecated_registers[REGISTER_BYTE (5)];
+ regs.pr_ecx = *(int *) &deprecated_registers[REGISTER_BYTE (2)];
+ regs.pr_edx = *(int *) &deprecated_registers[REGISTER_BYTE (1)];
+ regs.pr_esi = *(int *) &deprecated_registers[REGISTER_BYTE (6)];
+ regs.pr_edi = *(int *) &deprecated_registers[REGISTER_BYTE (7)];
+ regs.pr_esp = *(int *) &deprecated_registers[REGISTER_BYTE (14)];
+ regs.pr_ebp = *(int *) &deprecated_registers[REGISTER_BYTE (15)];
+ regs.pr_eip = *(int *) &deprecated_registers[REGISTER_BYTE (16)];
+ regs.pr_flags = *(int *) &deprecated_registers[REGISTER_BYTE (17)];
for (i = 0; i < 31; i++)
{
regs.pr_fpa.fpa_regs[i] =
- *(int *) &registers[REGISTER_BYTE (FP1_REGNUM + i)];
+ *(int *) &deprecated_registers[REGISTER_BYTE (FP1_REGNUM + i)];
}
- memcpy (regs.pr_fpu.fpu_stack[0], &registers[REGISTER_BYTE (ST0_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[1], &registers[REGISTER_BYTE (ST1_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[2], &registers[REGISTER_BYTE (ST2_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[3], &registers[REGISTER_BYTE (ST3_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[4], &registers[REGISTER_BYTE (ST4_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[5], &registers[REGISTER_BYTE (ST5_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[6], &registers[REGISTER_BYTE (ST6_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[7], &registers[REGISTER_BYTE (ST7_REGNUM)], 10);
+ memcpy (regs.pr_fpu.fpu_stack[0], &deprecated_registers[REGISTER_BYTE (ST0_REGNUM)], 10);
+ memcpy (regs.pr_fpu.fpu_stack[1], &deprecated_registers[REGISTER_BYTE (ST1_REGNUM)], 10);
+ memcpy (regs.pr_fpu.fpu_stack[2], &deprecated_registers[REGISTER_BYTE (ST2_REGNUM)], 10);
+ memcpy (regs.pr_fpu.fpu_stack[3], &deprecated_registers[REGISTER_BYTE (ST3_REGNUM)], 10);
+ memcpy (regs.pr_fpu.fpu_stack[4], &deprecated_registers[REGISTER_BYTE (ST4_REGNUM)], 10);
+ memcpy (regs.pr_fpu.fpu_stack[5], &deprecated_registers[REGISTER_BYTE (ST5_REGNUM)], 10);
+ memcpy (regs.pr_fpu.fpu_stack[6], &deprecated_registers[REGISTER_BYTE (ST6_REGNUM)], 10);
+ memcpy (regs.pr_fpu.fpu_stack[7], &deprecated_registers[REGISTER_BYTE (ST7_REGNUM)], 10);
mptrace (XPT_WREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0);
}
@@ -103,29 +103,29 @@ fetch_inferior_registers (int regno)
deprecated_registers_fetched ();
mptrace (XPT_RREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0);
- *(int *) &registers[REGISTER_BYTE (EAX_REGNUM)] = regs.pr_eax;
- *(int *) &registers[REGISTER_BYTE (EBX_REGNUM)] = regs.pr_ebx;
- *(int *) &registers[REGISTER_BYTE (ECX_REGNUM)] = regs.pr_ecx;
- *(int *) &registers[REGISTER_BYTE (EDX_REGNUM)] = regs.pr_edx;
- *(int *) &registers[REGISTER_BYTE (ESI_REGNUM)] = regs.pr_esi;
- *(int *) &registers[REGISTER_BYTE (EDI_REGNUM)] = regs.pr_edi;
- *(int *) &registers[REGISTER_BYTE (EBP_REGNUM)] = regs.pr_ebp;
- *(int *) &registers[REGISTER_BYTE (ESP_REGNUM)] = regs.pr_esp;
- *(int *) &registers[REGISTER_BYTE (EIP_REGNUM)] = regs.pr_eip;
- *(int *) &registers[REGISTER_BYTE (EFLAGS_REGNUM)] = regs.pr_flags;
+ *(int *) &deprecated_registers[REGISTER_BYTE (EAX_REGNUM)] = regs.pr_eax;
+ *(int *) &rdeprecated_egisters[REGISTER_BYTE (EBX_REGNUM)] = regs.pr_ebx;
+ *(int *) &deprecated_registers[REGISTER_BYTE (ECX_REGNUM)] = regs.pr_ecx;
+ *(int *) &deprecated_registers[REGISTER_BYTE (EDX_REGNUM)] = regs.pr_edx;
+ *(int *) &deprecated_registers[REGISTER_BYTE (ESI_REGNUM)] = regs.pr_esi;
+ *(int *) &deprecated_registers[REGISTER_BYTE (EDI_REGNUM)] = regs.pr_edi;
+ *(int *) &deprecated_registers[REGISTER_BYTE (EBP_REGNUM)] = regs.pr_ebp;
+ *(int *) &deprecated_registers[REGISTER_BYTE (ESP_REGNUM)] = regs.pr_esp;
+ *(int *) &deprecated_registers[REGISTER_BYTE (EIP_REGNUM)] = regs.pr_eip;
+ *(int *) &deprecated_registers[REGISTER_BYTE (EFLAGS_REGNUM)] = regs.pr_flags;
for (i = 0; i < FPA_NREGS; i++)
{
- *(int *) &registers[REGISTER_BYTE (FP1_REGNUM + i)] =
+ *(int *) &deprecated_registers[REGISTER_BYTE (FP1_REGNUM + i)] =
regs.pr_fpa.fpa_regs[i];
}
- memcpy (&registers[REGISTER_BYTE (ST0_REGNUM)], regs.pr_fpu.fpu_stack[0], 10);
- memcpy (&registers[REGISTER_BYTE (ST1_REGNUM)], regs.pr_fpu.fpu_stack[1], 10);
- memcpy (&registers[REGISTER_BYTE (ST2_REGNUM)], regs.pr_fpu.fpu_stack[2], 10);
- memcpy (&registers[REGISTER_BYTE (ST3_REGNUM)], regs.pr_fpu.fpu_stack[3], 10);
- memcpy (&registers[REGISTER_BYTE (ST4_REGNUM)], regs.pr_fpu.fpu_stack[4], 10);
- memcpy (&registers[REGISTER_BYTE (ST5_REGNUM)], regs.pr_fpu.fpu_stack[5], 10);
- memcpy (&registers[REGISTER_BYTE (ST6_REGNUM)], regs.pr_fpu.fpu_stack[6], 10);
- memcpy (&registers[REGISTER_BYTE (ST7_REGNUM)], regs.pr_fpu.fpu_stack[7], 10);
+ memcpy (&deprecated_registers[REGISTER_BYTE (ST0_REGNUM)], regs.pr_fpu.fpu_stack[0], 10);
+ memcpy (&deprecated_registers[REGISTER_BYTE (ST1_REGNUM)], regs.pr_fpu.fpu_stack[1], 10);
+ memcpy (&deprecated_registers[REGISTER_BYTE (ST2_REGNUM)], regs.pr_fpu.fpu_stack[2], 10);
+ memcpy (&deprecated_registers[REGISTER_BYTE (ST3_REGNUM)], regs.pr_fpu.fpu_stack[3], 10);
+ memcpy (&deprecated_registers[REGISTER_BYTE (ST4_REGNUM)], regs.pr_fpu.fpu_stack[4], 10);
+ memcpy (&deprecated_registers[REGISTER_BYTE (ST5_REGNUM)], regs.pr_fpu.fpu_stack[5], 10);
+ memcpy (&deprecated_registers[REGISTER_BYTE (ST6_REGNUM)], regs.pr_fpu.fpu_stack[6], 10);
+ memcpy (&deprecated_registers[REGISTER_BYTE (ST7_REGNUM)], regs.pr_fpu.fpu_stack[7], 10);
}
/* FIXME: This should be merged with i387-tdep.c as well. */
diff --git a/gdb/v850ice.c b/gdb/v850ice.c
index d1f696b..2e68cff 100644
--- a/gdb/v850ice.c
+++ b/gdb/v850ice.c
@@ -560,7 +560,7 @@ v850ice_store_registers (int regno)
return;
}
- regval = extract_unsigned_integer (&registers[REGISTER_BYTE (regno)],
+ regval = extract_unsigned_integer (&deprecated_registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno));
strcpy (cmd, "reg ");
if (!convert_register (regno, &cmd[4]))