* 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.
+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
(PTRACE_ARG3_TYPE) & inferior_control_registers,
ptrace_$control_set_m68k);
- bcopy (&inferior_registers, registers, 16 * 4);
- bcopy (&inferior_fp_registers, ®isters[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 *) ®isters[REGISTER_BYTE (PS_REGNUM)] = inferior_control_registers.sr;
- *(int *) ®isters[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.
(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 (®isters[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 *) ®isters[REGISTER_BYTE (PS_REGNUM)];
- inferior_control_registers.pc = *(int *) ®isters[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,
if (which == 2)
{
/* The FPU Registers. */
- memcpy (®isters[REGISTER_BYTE (FP0_REGNUM)], core_reg_sect, 31 * 8);
- memset (®isters[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 (®isters[REGISTER_BYTE (ALPHA_V0_REGNUM)], core_reg_sect,
- 31 * 8);
- memcpy (®isters[REGISTER_BYTE (PC_REGNUM)], core_reg_sect + 31 * 8, 8);
- memset (®isters[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;
}
for (regi = 0; regi < 31; regi++)
if ((regno == -1) || (regno == regi))
- *(regp + regi) = *(long *) ®isters[REGISTER_BYTE (regi)];
+ *(regp + regi) = *(long *) &deprecated_registers[REGISTER_BYTE (regi)];
if ((regno == -1) || (regno == PC_REGNUM))
- *(regp + 31) = *(long *) ®isters[REGISTER_BYTE (PC_REGNUM)];
+ *(regp + 31) = *(long *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
}
/*
if ((regno == -1) || (regno == regi))
{
*(regp + regi - FP0_REGNUM) =
- *(long *) ®isters[REGISTER_BYTE (regi)];
+ *(long *) &deprecated_registers[REGISTER_BYTE (regi)];
}
}
}
{
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.
struct regs *gregs = (struct regs *) core_reg_sect;
/* G0 *always* holds 0. */
- *(int *) ®isters[REGISTER_BYTE (0)] = 0;
+ *(int *) &deprecated_registers[REGISTER_BYTE (0)] = 0;
/* The globals and output registers. */
- memcpy (®isters[REGISTER_BYTE (G1_REGNUM)], &gregs->r_g1,
- 15 * REGISTER_RAW_SIZE (G1_REGNUM));
- *(int *) ®isters[REGISTER_BYTE (PS_REGNUM)] = gregs->r_ps;
- *(int *) ®isters[REGISTER_BYTE (PC_REGNUM)] = gregs->r_pc;
- *(int *) ®isters[REGISTER_BYTE (NPC_REGNUM)] = gregs->r_npc;
- *(int *) ®isters[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
{
int sp;
- sp = *(int *) ®isters[REGISTER_BYTE (SP_REGNUM)];
+ sp = *(int *) &deprecated_registers[REGISTER_BYTE (SP_REGNUM)];
if (0 != target_read_memory (sp,
- ®isters[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");
{
struct fpu *fpuregs = (struct fpu *) core_reg_sect;
- memcpy (®isters[REGISTER_BYTE (FP0_REGNUM)], &fpuregs->fpu_fr,
- sizeof (fpuregs->fpu_fr));
- memcpy (®isters[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
{
{
store_inferior_register_1
(regno, regaddr,
- (*(int *) ®isters[(REGISTER_BYTE (regno)) + i]));
+ (*(int *) &deprecated_registers[(REGISTER_BYTE (regno)) + i]));
regaddr += sizeof (int);
}
}
errno = 0;
if (regno == PCOQ_HEAD_REGNUM || regno == PCOQ_TAIL_REGNUM)
{
- scratch = *(int *) ®isters[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)
errno = 0;
ptrace (PT_WUREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) regaddr,
- *(int *) ®isters[REGISTER_BYTE (regno) + i]);
+ *(int *) &deprecated_registers[REGISTER_BYTE (regno) + i]);
if (errno != 0)
{
/* Warning, not error, in case we are attached; sometimes the
{
CORE_ADDR temp;
- temp = *(CORE_ADDR *)®isters[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;
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 *)®isters[REGISTER_BYTE (regno)] = 0;
+ *(int *)&deprecated_registers[REGISTER_BYTE (regno)] = 0;
#endif
for (i = 0; i < len; i += sizeof (int))
errno = 0;
call_ptrace (PT_WUREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) addr + i,
- *(int *) ®isters[REGISTER_BYTE (regno) + i]);
+ *(int *) &deprecated_registers[REGISTER_BYTE (regno) + i]);
if (errno != 0)
{
/* Warning, not error, in case we are attached; sometimes
*/
if (regno > 0 && regno < NUM_REGS)
{
- memcpy (&state[regno], ®isters[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], ®isters[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)]; */
}
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));
}
}
}
#define fill(state, regno) \
- memcpy (REG_ADDR(state, regno), ®isters[REGISTER_BYTE (regno)], \
+ memcpy (REG_ADDR(state, regno), &deprecated_registers[REGISTER_BYTE (regno)], \
REGISTER_RAW_SIZE (regno))
if (regno == -1)
#define COPY_REG(_fld_,_regi_) \
if ((regno == -1) || regno == _regi_) \
- memcpy (&(gregsetp->_fld_), ®isters[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++)
if (regno == IA64_BSP_REGNUM || regno == -1)
{
memcpy (&(gregsetp->__bspstore),
- ®isters[REGISTER_BYTE (IA64_BSP_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (IA64_BSP_REGNUM)],
REGISTER_RAW_SIZE (IA64_BSP_REGNUM));
- memcpy (®isters[REGISTER_BYTE (IA64_BSPSTORE_REGNUM)],
- ®isters[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));
}
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) ®isters[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));
}
#define COPY_REG(_idx_,_regi_) \
if ((regno == -1) || regno == _regi_) \
- memcpy (regp + _idx_, ®isters[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++)
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) ®isters[REGISTER_BYTE (regi)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regi)];
to = (char *) &((*fpregsetp)[regi - IA64_FR0_REGNUM]);
memcpy (to, from, REGISTER_RAW_SIZE (regi));
}
float_elt_type,
floatreg,
VALUE_CONTENTS (arg) + argoffset,
- ®isters[REGISTER_BYTE (floatreg)]);
+ &deprecated_registers[REGISTER_BYTE (floatreg)]);
floatreg++;
argoffset += TYPE_LENGTH (float_elt_type);
len -= TYPE_LENGTH (float_elt_type);
/* Store the struct return value in r8 if necessary. */
if (struct_return)
{
- store_address (®isters[REGISTER_BYTE (IA64_GR8_REGNUM)],
+ store_address (&deprecated_registers[REGISTER_BYTE (IA64_GR8_REGNUM)],
REGISTER_RAW_SIZE (IA64_GR8_REGNUM),
struct_addr);
}
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
ia64_register_convert_to_raw (type, IA64_FR8_REGNUM, valbuf,
- ®isters[REGISTER_BYTE (IA64_FR8_REGNUM)]);
+ &deprecated_registers[REGISTER_BYTE (IA64_FR8_REGNUM)]);
target_store_registers (IA64_FR8_REGNUM);
}
else
/* 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)];
}
/*
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) ®isters[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 *) ®isters[REGISTER_BYTE (FCRCS_REGNUM)];
+ fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)];
}
return;
}
- memcpy ((char *) registers, core_reg_sect, core_reg_size);
+ memcpy ((char *) deprecated_registers, core_reg_sect, core_reg_size);
}
\f
for (regi = 0; regi <= CTX_RA; regi++)
if ((regno == -1) || (regno == regi))
*(regp + regi) =
- extract_signed_integer (®isters[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 (®isters[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 (®isters[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 (®isters[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 (®isters[REGISTER_BYTE (LO_REGNUM)],
+ extract_signed_integer (&deprecated_registers[REGISTER_BYTE (LO_REGNUM)],
REGISTER_RAW_SIZE (LO_REGNUM));
}
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) ®isters[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 *) ®isters[REGISTER_BYTE (FCRCS_REGNUM)];
+ fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)];
}
{
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)
/* 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++)
supply_register (G0_REGNUM, buf);
supply_register (TBR_REGNUM, (char *) &ec.tbr);
- memcpy (®isters[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;
supply_register (NPC_REGNUM, (char *) &ec.npc);
supply_register (WIM_REGNUM, (char *) &ec.wim);
- memcpy (®isters[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;
sp = read_register (SP_REGNUM);
target_read_memory (sp + FRAME_SAVED_I0,
- ®isters[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,
- ®isters[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;
if (errno)
perror_with_name ("ptrace(PTRACE_GETFPREGS)");
- memcpy (®isters[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;
int retval;
ec.tbr = read_register (TBR_REGNUM);
- memcpy (&ec.g1, ®isters[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);
ec.npc = read_register (NPC_REGNUM);
ec.wim = read_register (WIM_REGNUM);
- memcpy (ec.o, ®isters[REGISTER_BYTE (O0_REGNUM)],
+ memcpy (ec.o, &deprecated_registers[REGISTER_BYTE (O0_REGNUM)],
8 * REGISTER_RAW_SIZE (O0_REGNUM));
errno = 0;
if (!deprecated_register_valid[L0_REGNUM + 5])
internal_error (__FILE__, __LINE__, "failed internal consistency check");
target_write_memory (sp + FRAME_SAVED_I0,
- ®isters[REGISTER_BYTE (I0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (I0_REGNUM)],
8 * REGISTER_RAW_SIZE (I0_REGNUM));
target_write_memory (sp + FRAME_SAVED_L0,
- ®isters[REGISTER_BYTE (L0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
8 * REGISTER_RAW_SIZE (L0_REGNUM));
}
else if (regno >= L0_REGNUM && regno <= I7_REGNUM)
regoffset = REGISTER_BYTE (regno) - REGISTER_BYTE (I0_REGNUM)
+ FRAME_SAVED_I0;
target_write_memory (sp + regoffset,
- ®isters[REGISTER_BYTE (regno)],
+ &deprecated_registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno));
}
}
if (errno)
perror_with_name ("ptrace(PTRACE_GETFPREGS)");
- memcpy (fc.f.fregs, ®isters[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);
{
unsigned int reg;
- reg = *(unsigned int *) ®isters[REGISTER_BYTE (regno) + i];
+ reg = *(unsigned int *) &deprecated_registers[REGISTER_BYTE (regno) + i];
errno = 0;
ptrace (ptrace_fun, PIDGET (inferior_ptid),
{
if ((regno == -1) || (regno == regi))
{
- *(regp + regi) = *(int *) ®isters[REGISTER_BYTE (regi)];
+ *(regp + regi) = *(int *) &deprecated_registers[REGISTER_BYTE (regi)];
}
}
if ((regno == -1) || (regno == PS_REGNUM))
{
- *(regp + R_PS) = *(int *) ®isters[REGISTER_BYTE (PS_REGNUM)];
+ *(regp + R_PS) = *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)];
}
if ((regno == -1) || (regno == PC_REGNUM))
{
- *(regp + R_PC) = *(int *) ®isters[REGISTER_BYTE (PC_REGNUM)];
+ *(regp + R_PC) = *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
}
}
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) ®isters[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 *) ®isters[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 *) ®isters[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 *) ®isters[REGISTER_BYTE (E_FPI_REGNUM)];
+ fpregsetp->f_fpiaddr = *(int *) &deprecated_registers[REGISTER_BYTE (E_FPI_REGNUM)];
}
}
ptrace (PT_GETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_registers, 0);
- memcpy (®isters[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 (®isters[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
sizeof (inferior_fp_registers));
deprecated_registers_fetched ();
struct reg inferior_registers;
struct fpreg inferior_fp_registers;
- memcpy (&inferior_registers, ®isters[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, ®isters[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);
struct md_core *core_reg = (struct md_core *) core_reg_sect;
/* Integer registers */
- memcpy (®isters[REGISTER_BYTE (0)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (0)],
&core_reg->intreg, sizeof (struct reg));
/* Floating point registers */
- memcpy (®isters[REGISTER_BYTE (FP0_REGNUM)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
&core_reg->freg, sizeof (struct fpreg));
}
if (regno < 32)
{
- src = ®isters[REGISTER_BYTE (regno)];
+ src = &deprecated_registers[REGISTER_BYTE (regno)];
dst = regp + regno + EF_REG0;
memcpy (dst, src, sizeof (elf_greg_t));
return;
if (regaddr != -1)
{
- src = ®isters[REGISTER_BYTE (regno)];
+ src = &deprecated_registers[REGISTER_BYTE (regno)];
dst = regp + regaddr;
memcpy (dst, src, sizeof (elf_greg_t));
}
if ((regno >= FP0_REGNUM) && (regno < FP0_REGNUM + 32))
{
- from = (char *) ®isters[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 *) ®isters[REGISTER_BYTE (regno)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regno)];
to = (char *) (*fpregsetp + 32);
memcpy (to, from, REGISTER_RAW_SIZE (regno));
}
* Caller knows that the regs handled in one transaction are of same size.
*/
#define FETCH_REGS(state, regnum, count) \
- memcpy (®isters[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 ], \
- ®isters[REGISTER_BYTE (regnum)], \
+ &deprecated_registers[REGISTER_BYTE (regnum)], \
count*REGISTER_SIZE)
#define REGS_ALL -1
}
/* 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
/* If the thread does not have saved COPROC1, set regs to zero */
if (!(exc_state.coproc_state & MIPS_STATUS_USE_COP1))
- bzero (®isters[REGISTER_BYTE (FP0_REGNUM)],
+ bzero (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
sizeof (struct mips_float_state));
else
{
/* 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);
* should go to threads frame pointer. If not true, this
* fails badly!!!!!
*/
- memcpy (®isters[REGISTER_BYTE (MACH_FP_REGNUM)],
- ®isters[REGISTER_BYTE (FP_REGNUM)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (MACH_FP_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (FP_REGNUM)],
REGISTER_RAW_SIZE (FP_REGNUM));
#endif
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)];
}
/*
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) ®isters[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 *) ®isters[REGISTER_BYTE (FCRCS_REGNUM)];
+ fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)];
}
#include "regcache.h"
#define RF(dst, src) \
- memcpy(®isters[REGISTER_BYTE(dst)], &src, sizeof(src))
+ memcpy(&deprecated_registers[REGISTER_BYTE(dst)], &src, sizeof(src))
#define RS(src, dst) \
- memcpy(&dst, ®isters[REGISTER_BYTE(src)], sizeof(dst))
+ memcpy(&dst, &deprecated_registers[REGISTER_BYTE(src)], sizeof(dst))
void
fetch_inferior_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)
{
char val_buf[4];
store_address (val_buf, 4, struct_addr);
- memcpy (®isters[REGISTER_BYTE (greg)], val_buf, 4);
+ memcpy (&deprecated_registers[REGISTER_BYTE (greg)], val_buf, 4);
greg++;
}
/* Now fill in the registers and stack... */
if (len > 8)
printf_unfiltered (
"Fatal Error: a floating point parameter #%d with a size > 8 is found!\n", argno);
- memcpy (®isters[REGISTER_BYTE (FP0_REGNUM + freg)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM + freg)],
VALUE_CONTENTS (arg), len);
freg++;
}
if ((greg & 1) == 0)
greg++;
- memcpy (®isters[REGISTER_BYTE (greg)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (greg)],
VALUE_CONTENTS (arg), 4);
- memcpy (®isters[REGISTER_BYTE (greg + 1)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (greg + 1)],
VALUE_CONTENTS (arg) + 4, 4);
greg += 2;
}
}
if (greg <= 10)
{
- memcpy (®isters[REGISTER_BYTE (greg)], val_buf, 4);
+ memcpy (&deprecated_registers[REGISTER_BYTE (greg)], val_buf, 4);
greg++;
}
else
memcpy (v_val_buf, VALUE_CONTENTS (arg), len);
if (vreg <= 13)
{
- memcpy (®isters[REGISTER_BYTE (tdep->ppc_vr0_regnum
+ memcpy (&deprecated_registers[REGISTER_BYTE (tdep->ppc_vr0_regnum
+ vreg)],
v_val_buf, 16);
vreg++;
{
if ((regno == -1) || (regno == regi))
{
- (*gregsetp)[regi] = *(greg_t *) & registers[REGISTER_BYTE (regi)];
+ (*gregsetp)[regi] = *(greg_t *) & deprecated_registers[REGISTER_BYTE (regi)];
}
}
}
/* 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
/* 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
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);
{
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);
}
regcache_descr_handle = register_gdbarch_data (init_regcache_descr,
xfree_regcache_descr);
REGISTER_GDBARCH_SWAP (current_regcache);
- register_gdbarch_swap (®isters, 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);
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
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);
{
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
{
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;
}
}
{
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;
}
}
{
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;
{
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));
{
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
{
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 */
{
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]);
}
{
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]);
}
}
}
int k;
unsigned char *r;
- r = (unsigned char *) registers;
+ r = (unsigned char *) deprecated_registers;
if (regno == -1) /* write all registers */
{
*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++)
*p++ = 0;
*p++ = 0;
for (i = 0; i < 4 * 32; i++)
- *p++ = registers[i];
+ *p++ = deprecated_registers[i];
sds_send (buf, p - buf);
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], ®isters[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], ®isters[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.
PTRACE_GETFPREGS);
bcopy (&mc68k_fpreg_packet[MC68K_R_FP0],
- ®isters[REGISTER_BYTE (FP0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
MC68K_FPREG_SIZE * 8);
bcopy (&mc68k_fpreg_packet[MC68K_R_FPCR],
- ®isters[REGISTER_BYTE (FPC_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (FPC_REGNUM)],
MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
}
else
{
- bzero (®isters[REGISTER_BYTE (FP0_REGNUM)],
+ bzero (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
MC68K_FPREG_SIZE * 8);
- bzero (®isters[REGISTER_BYTE (FPC_REGNUM)],
+ bzero (&deprecated_registers[REGISTER_BYTE (FPC_REGNUM)],
MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
}
/* Store general-purpose registers. */
- bcopy (registers, &mc68k_greg_packet[MC68K_R_D0], 16 * MC68K_GREG_SIZE);
- bcopy (®isters[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 (®isters[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);
if (target_has_fp)
{
- bcopy (®isters[REGISTER_BYTE (FP0_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
&mc68k_fpreg_packet[MC68K_R_FP0],
MC68K_FPREG_SIZE * 8);
- bcopy (®isters[REGISTER_BYTE (FPC_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (FPC_REGNUM)],
&mc68k_fpreg_packet[MC68K_R_FPCR],
MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
/* Copy the general registers. */
- bcopy (&mips_greg_packet[MIPS_R_GP0], ®isters[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],
- ®isters[REGISTER_BYTE (PS_REGNUM)], MIPS_GREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (PS_REGNUM)], MIPS_GREG_SIZE);
bcopy (&mips_greg_packet[MIPS_R_LO],
- ®isters[REGISTER_BYTE (LO_REGNUM)], MIPS_GREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (LO_REGNUM)], MIPS_GREG_SIZE);
bcopy (&mips_greg_packet[MIPS_R_HI],
- ®isters[REGISTER_BYTE (HI_REGNUM)], MIPS_GREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (HI_REGNUM)], MIPS_GREG_SIZE);
bcopy (&mips_greg_packet[MIPS_R_PC],
- ®isters[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
/* Copy the floating point registers. */
bcopy (&mips_fpreg_packet[MIPS_R_FP0],
- ®isters[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],
- ®isters[REGISTER_BYTE (FCRCS_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)],
REGISTER_RAW_SIZE (FCRCS_REGNUM));
}
else
{
- bzero ((char *) ®isters[REGISTER_BYTE (FP0_REGNUM)],
+ bzero ((char *) &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
- bzero ((char *) ®isters[REGISTER_BYTE (FCRCS_REGNUM)],
+ bzero ((char *) &deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)],
REGISTER_RAW_SIZE (FCRCS_REGNUM));
}
/* Store general registers. */
- bcopy (®isters[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 (®isters[REGISTER_BYTE (PS_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (PS_REGNUM)],
&mips_greg_packet[MIPS_R_SR], MIPS_GREG_SIZE);
- bcopy (®isters[REGISTER_BYTE (LO_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (LO_REGNUM)],
&mips_greg_packet[MIPS_R_LO], MIPS_GREG_SIZE);
- bcopy (®isters[REGISTER_BYTE (HI_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (HI_REGNUM)],
&mips_greg_packet[MIPS_R_HI], MIPS_GREG_SIZE);
- bcopy (®isters[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);
{
/* Copy the floating point data registers. */
- bcopy (®isters[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 (®isters[REGISTER_BYTE (FCRCS_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)],
&mips_fpreg_packet[MIPS_R_FPCSR],
REGISTER_RAW_SIZE (FCRCS_REGNUM));
as defined in "tm-sparc.h". */
bcopy (&sparc_greg_packet[SPARC_R_G0],
- ®isters[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],
- ®isters[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 (®isters[REGISTER_BYTE (SP_REGNUM)],
+ sp = extract_address (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)],
REGISTER_RAW_SIZE (SP_REGNUM));
- write_memory (sp, ®isters[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.
net_read_registers (sparc_fpreg_packet, SPARC_FPREG_PLEN,
PTRACE_GETFPREGS);
bcopy (&sparc_fpreg_packet[SPARC_R_FP0],
- ®isters[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],
- ®isters[REGISTER_BYTE (FPS_REGNUM)], 1 * SPARC_FPREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (FPS_REGNUM)],
+ 1 * SPARC_FPREG_SIZE);
}
else
{
- bzero (®isters[REGISTER_BYTE (FP0_REGNUM)], 32 * SPARC_FPREG_SIZE);
- bzero (®isters[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. */
}
if (in_gp_regs)
{
- bcopy (®isters[REGISTER_BYTE (G0_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (G0_REGNUM)],
&sparc_greg_packet[SPARC_R_G0], 32 * SPARC_GREG_SIZE);
- bcopy (®isters[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);
if (regno < 0 || (L0_REGNUM <= regno && regno <= I7_REGNUM))
{
- sp = extract_address (®isters[REGISTER_BYTE (SP_REGNUM)],
+ sp = extract_address (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)],
REGISTER_RAW_SIZE (SP_REGNUM));
- write_memory (sp, ®isters[REGISTER_BYTE (L0_REGNUM)],
+ write_memory (sp, &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM));
}
}
if (in_fp_regs && target_has_fp)
{
- bcopy (®isters[REGISTER_BYTE (FP0_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
&sparc_fpreg_packet[SPARC_R_FP0], 32 * SPARC_FPREG_SIZE);
- bcopy (®isters[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,
addr = prev_sp + fdata.gpr_offset;
for (ii = fdata.saved_gpr; ii <= 31; ++ii)
{
- read_memory (addr, ®isters[REGISTER_BYTE (ii)], wordsize);
+ read_memory (addr, &deprecated_registers[REGISTER_BYTE (ii)],
+ wordsize);
addr += wordsize;
}
}
addr = prev_sp + fdata.fpr_offset;
for (ii = fdata.saved_fpr; ii <= 31; ++ii)
{
- read_memory (addr, ®isters[REGISTER_BYTE (ii + FP0_REGNUM)], 8);
+ read_memory (addr, &deprecated_registers[REGISTER_BYTE (ii + FP0_REGNUM)], 8);
addr += 8;
}
}
printf_unfiltered (
"Fatal Error: a floating point parameter #%d with a size > 8 is found!\n", argno);
- memcpy (®isters[REGISTER_BYTE (FP0_REGNUM + 1 + f_argno)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM + 1 + f_argno)],
VALUE_CONTENTS (arg),
len);
++f_argno;
/* Argument takes more than one register. */
while (argbytes < len)
{
- memset (®isters[REGISTER_BYTE (ii + 3)], 0, reg_size);
- memcpy (®isters[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);
{
/* Argument can fit in one register. No problem. */
int adj = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? reg_size - len : 0;
- memset (®isters[REGISTER_BYTE (ii + 3)], 0, reg_size);
- memcpy ((char *)®isters[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;
printf_unfiltered (
"Fatal Error: a floating point parameter #%d with a size > 8 is found!\n", argno);
- memcpy (®isters[REGISTER_BYTE (FP0_REGNUM + 1 + f_argno)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM + 1 + f_argno)],
VALUE_CONTENTS (arg),
len);
++f_argno;
{ /* Not writing all the regs */
/* save new register value */
char* old_value = (char*) alloca (REGISTER_SIZE);
- memcpy (old_value, ®isters[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)
td_err_string (val));
/* restore new register value */
- memcpy (®isters[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 */
(PTRACE_ARG3_TYPE) & inferior_registers, 0))
perror ("ptrace_getregs");
- registers[REGISTER_BYTE (0)] = 0;
- memcpy (®isters[REGISTER_BYTE (1)], &inferior_registers.r_g1,
- 15 * REGISTER_RAW_SIZE (G0_REGNUM));
- *(int *) ®isters[REGISTER_BYTE (PS_REGNUM)] = inferior_registers.r_ps;
- *(int *) ®isters[REGISTER_BYTE (PC_REGNUM)] = inferior_registers.r_pc;
- *(int *) ®isters[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 *) ®isters[REGISTER_BYTE (Y_REGNUM)] = inferior_registers.r_y;
for (i = G0_REGNUM; i <= O7_REGNUM; i++)
(PTRACE_ARG3_TYPE) & inferior_fp_registers,
0))
perror ("ptrace_getfpregs");
- memcpy (®isters[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
- sizeof inferior_fp_registers.fpu_fr);
- memcpy (®isters[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;
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, ®isters[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),
- ®isters[i], REGISTER_RAW_SIZE (regno));
+ &deprecated_registers[i], REGISTER_RAW_SIZE (regno));
deprecated_register_valid[regno] = 1;
}
}
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,
- ®isters[REGISTER_BYTE (L0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM));
}
else
if (!deprecated_register_valid[regno])
internal_error (__FILE__, __LINE__, "failed internal consistency check");
target_write_memory (sp + REGISTER_BYTE (regno) - REGISTER_BYTE (L0_REGNUM),
- ®isters[REGISTER_BYTE (regno)],
+ &deprecated_registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno));
}
if (!deprecated_register_valid[G1_REGNUM])
internal_error (__FILE__, __LINE__, "failed internal consistency check");
- memcpy (&inferior_registers.r_g1, ®isters[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 *) ®isters[REGISTER_BYTE (PS_REGNUM)];
+ *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)];
inferior_registers.r_pc =
- *(int *) ®isters[REGISTER_BYTE (PC_REGNUM)];
+ *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
inferior_registers.r_npc =
- *(int *) ®isters[REGISTER_BYTE (NPC_REGNUM)];
+ *(int *) &deprecated_registers[REGISTER_BYTE (NPC_REGNUM)];
inferior_registers.r_y =
- *(int *) ®isters[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))
{
if (!deprecated_register_valid[FP0_REGNUM + 9])
internal_error (__FILE__, __LINE__, "failed internal consistency check");
- memcpy (&inferior_fp_registers, ®isters[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,
- ®isters[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))
#define gregs ((struct regs *)core_reg_sect)
/* G0 *always* holds 0. */
- *(int *) ®isters[REGISTER_BYTE (0)] = 0;
+ *(int *) &deprecated_registers[REGISTER_BYTE (0)] = 0;
/* The globals and output registers. */
- memcpy (®isters[REGISTER_BYTE (G1_REGNUM)], &gregs->r_g1,
+ memcpy (&deprecated_registers[REGISTER_BYTE (G1_REGNUM)], &gregs->r_g1,
15 * REGISTER_RAW_SIZE (G1_REGNUM));
- *(int *) ®isters[REGISTER_BYTE (PS_REGNUM)] = gregs->r_ps;
- *(int *) ®isters[REGISTER_BYTE (PC_REGNUM)] = gregs->r_pc;
- *(int *) ®isters[REGISTER_BYTE (NPC_REGNUM)] = gregs->r_npc;
- *(int *) ®isters[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
{
int sp;
- sp = *(int *) ®isters[REGISTER_BYTE (SP_REGNUM)];
- if (0 != target_read_memory (sp, ®isters[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 */
#define fpuregs ((struct fpu *) core_reg_sect)
if (core_reg_size >= sizeof (struct fpu))
{
- memcpy (®isters[REGISTER_BYTE (FP0_REGNUM)], fpuregs->fpu_regs,
- sizeof (fpuregs->fpu_regs));
- memcpy (®isters[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");
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) ®isters[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));
}
if (!(GDB_TARGET_IS_SPARC64)) /* FIXME: does Sparc64 have this register? */
if ((regno == -1) || (regno == FPS_REGNUM))
{
- from = (char *)®isters[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));
}
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 (®isters[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 *) ®isters[REGISTER_BYTE (PS_REGNUM)] = inferior_registers.r_ps;
- *(int *) ®isters[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 (®isters[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);
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, ®isters[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 *) ®isters[REGISTER_BYTE (PS_REGNUM)];
- inferior_registers.r_pc = *(int *) ®isters[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,
- ®isters[REGISTER_BYTE (FPC_REGNUM)],
+ &&deprecated_registers[REGISTER_BYTE (FPC_REGNUM)],
sizeof inferior_fp_registers -
sizeof inferior_fp_registers.fps_regs);
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 *) ®s->r_ps);
supply_register (PC_REGNUM, (char *) ®s->r_pc);
{
if (FP0_REGNUM >= 0)
{
- memcpy (®isters[REGISTER_BYTE (FP0_REGNUM)],
+ memcpy (&&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
fpustruct->f_fpstatus.fps_regs,
sizeof fpustruct->f_fpstatus.fps_regs);
- memcpy (®isters[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);
to the registers array to solve this properly. */
mptrace (XPT_RREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0);
- regs.pr_eax = *(int *) ®isters[REGISTER_BYTE (0)];
- regs.pr_ebx = *(int *) ®isters[REGISTER_BYTE (5)];
- regs.pr_ecx = *(int *) ®isters[REGISTER_BYTE (2)];
- regs.pr_edx = *(int *) ®isters[REGISTER_BYTE (1)];
- regs.pr_esi = *(int *) ®isters[REGISTER_BYTE (6)];
- regs.pr_edi = *(int *) ®isters[REGISTER_BYTE (7)];
- regs.pr_esp = *(int *) ®isters[REGISTER_BYTE (14)];
- regs.pr_ebp = *(int *) ®isters[REGISTER_BYTE (15)];
- regs.pr_eip = *(int *) ®isters[REGISTER_BYTE (16)];
- regs.pr_flags = *(int *) ®isters[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 *) ®isters[REGISTER_BYTE (FP1_REGNUM + i)];
+ *(int *) &deprecated_registers[REGISTER_BYTE (FP1_REGNUM + i)];
}
- memcpy (regs.pr_fpu.fpu_stack[0], ®isters[REGISTER_BYTE (ST0_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[1], ®isters[REGISTER_BYTE (ST1_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[2], ®isters[REGISTER_BYTE (ST2_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[3], ®isters[REGISTER_BYTE (ST3_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[4], ®isters[REGISTER_BYTE (ST4_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[5], ®isters[REGISTER_BYTE (ST5_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[6], ®isters[REGISTER_BYTE (ST6_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[7], ®isters[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);
}
deprecated_registers_fetched ();
mptrace (XPT_RREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0);
- *(int *) ®isters[REGISTER_BYTE (EAX_REGNUM)] = regs.pr_eax;
- *(int *) ®isters[REGISTER_BYTE (EBX_REGNUM)] = regs.pr_ebx;
- *(int *) ®isters[REGISTER_BYTE (ECX_REGNUM)] = regs.pr_ecx;
- *(int *) ®isters[REGISTER_BYTE (EDX_REGNUM)] = regs.pr_edx;
- *(int *) ®isters[REGISTER_BYTE (ESI_REGNUM)] = regs.pr_esi;
- *(int *) ®isters[REGISTER_BYTE (EDI_REGNUM)] = regs.pr_edi;
- *(int *) ®isters[REGISTER_BYTE (EBP_REGNUM)] = regs.pr_ebp;
- *(int *) ®isters[REGISTER_BYTE (ESP_REGNUM)] = regs.pr_esp;
- *(int *) ®isters[REGISTER_BYTE (EIP_REGNUM)] = regs.pr_eip;
- *(int *) ®isters[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 *) ®isters[REGISTER_BYTE (FP1_REGNUM + i)] =
+ *(int *) &deprecated_registers[REGISTER_BYTE (FP1_REGNUM + i)] =
regs.pr_fpa.fpa_regs[i];
}
- memcpy (®isters[REGISTER_BYTE (ST0_REGNUM)], regs.pr_fpu.fpu_stack[0], 10);
- memcpy (®isters[REGISTER_BYTE (ST1_REGNUM)], regs.pr_fpu.fpu_stack[1], 10);
- memcpy (®isters[REGISTER_BYTE (ST2_REGNUM)], regs.pr_fpu.fpu_stack[2], 10);
- memcpy (®isters[REGISTER_BYTE (ST3_REGNUM)], regs.pr_fpu.fpu_stack[3], 10);
- memcpy (®isters[REGISTER_BYTE (ST4_REGNUM)], regs.pr_fpu.fpu_stack[4], 10);
- memcpy (®isters[REGISTER_BYTE (ST5_REGNUM)], regs.pr_fpu.fpu_stack[5], 10);
- memcpy (®isters[REGISTER_BYTE (ST6_REGNUM)], regs.pr_fpu.fpu_stack[6], 10);
- memcpy (®isters[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);
}
\f
/* FIXME: This should be merged with i387-tdep.c as well. */
return;
}
- regval = extract_unsigned_integer (®isters[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]))