Use regcache_raw_collect instead of regcache_collect.
* regcache.h (regcache_collect): Delete declaration.
* regcache.c (regcache_colect): Delete function.
* win32-nat.c (do_child_store_inferior_registers): Update.
* sol-thread.c (sol_thread_store_registers): Update.
* shnbsd-tdep.c (shnbsd_fill_reg): Update.
* rs6000-nat.c (store_register): Update.
* remote.c (store_register_using_P, remote_store_registers): Update.
* ppcnbsd-tdep.c (ppcnbsd_fill_reg): Update.
* ppc-linux-nat.c (store_altivec_register, store_spe_register)
(fill_vrregset, store_spe_registers, fill_gregset)
(fill_gregset): Update.
* nto-procfs.c (procfs_store_registers): Update.
* mipsnbsd-tdep.c (mipsnbsd_fill_reg): Update.
* mips-linux-tdep.c (fill_gregset, mips64_fill_gregset): Update.
* m68klinux-nat.c (store_register, fill_gregset): Update.
* m68k-tdep.c (fill_gregset): Update.
* infptrace.c (store_register): Update.
* i386-nto-tdep.c (i386nto_regset_fill): Update.
* i386-linux-nat.c (store_register, fill_gregset): Update.
* hppa-linux-nat.c (fill_gregset): Update.
* go32-nat.c (store_register): Update.
* armnbsd-nat.c (store_register, store_regs, store_fp_register)
(store_fp_regs): Update.
* arm-linux-nat.c (store_nwfpe_single, store_nwfpe_double)
(store_nwfpe_extended, store_fpregister, store_fpregs)
(store_register, store_regs, fill_gregset, fill_fpregset): Update.
* alpha-tdep.c (alpha_fill_int_regs, alpha_fill_fp_regs): Update.
* aix-thread.c (fill_gprs64, fill_fprs, fill_sprs64, fill_sprs32)
(store_regs_user_thread, store_regs_kernel_thread): Update.
+2004-07-23 Andrew Cagney <cagney@gnu.org>
+
+ Use regcache_raw_collect instead of regcache_collect.
+ * regcache.h (regcache_collect): Delete declaration.
+ * regcache.c (regcache_colect): Delete function.
+ * win32-nat.c (do_child_store_inferior_registers): Update.
+ * sol-thread.c (sol_thread_store_registers): Update.
+ * shnbsd-tdep.c (shnbsd_fill_reg): Update.
+ * rs6000-nat.c (store_register): Update.
+ * remote.c (store_register_using_P, remote_store_registers): Update.
+ * ppcnbsd-tdep.c (ppcnbsd_fill_reg): Update.
+ * ppc-linux-nat.c (store_altivec_register, store_spe_register)
+ (fill_vrregset, store_spe_registers, fill_gregset)
+ (fill_gregset): Update.
+ * nto-procfs.c (procfs_store_registers): Update.
+ * mipsnbsd-tdep.c (mipsnbsd_fill_reg): Update.
+ * mips-linux-tdep.c (fill_gregset, mips64_fill_gregset): Update.
+ * m68klinux-nat.c (store_register, fill_gregset): Update.
+ * m68k-tdep.c (fill_gregset): Update.
+ * infptrace.c (store_register): Update.
+ * i386-nto-tdep.c (i386nto_regset_fill): Update.
+ * i386-linux-nat.c (store_register, fill_gregset): Update.
+ * hppa-linux-nat.c (fill_gregset): Update.
+ * go32-nat.c (store_register): Update.
+ * armnbsd-nat.c (store_register, store_regs, store_fp_register)
+ (store_fp_regs): Update.
+ * arm-linux-nat.c (store_nwfpe_single, store_nwfpe_double)
+ (store_nwfpe_extended, store_fpregister, store_fpregs)
+ (store_register, store_regs, fill_gregset, fill_fpregset): Update.
+ * alpha-tdep.c (alpha_fill_int_regs, alpha_fill_fp_regs): Update.
+ * aix-thread.c (fill_gprs64, fill_fprs, fill_sprs64, fill_sprs32)
+ (store_regs_user_thread, store_regs_kernel_thread): Update.
+
2004-07-24 Mark Kettenis <kettenis@gnu.org>
* dwarf2-frame.c (struct dwarf2_cie): Delete `addr_size' member.
for (regno = 0; regno < ppc_num_gprs; regno++)
if (register_cached (tdep->ppc_gp0_regnum + regno))
- regcache_collect (tdep->ppc_gp0_regnum + regno, vals + regno);
+ regcache_raw_collect (current_regcache, tdep->ppc_gp0_regnum + regno,
+ vals + regno);
}
static void
for (regno = 0; regno < ppc_num_gprs; regno++)
if (register_cached (tdep->ppc_gp0_regnum + regno))
- regcache_collect (tdep->ppc_gp0_regnum + regno, vals + regno);
+ regcache_raw_collect (current_regcache, tdep->ppc_gp0_regnum + regno,
+ vals + regno);
}
/* Store the floating point registers into a double array. */
regno < tdep->ppc_fp0_regnum + ppc_num_fprs;
regno++)
if (register_cached (regno))
- regcache_collect (regno, vals + regno);
+ regcache_raw_collect (current_regcache, regno, vals + regno);
}
/* Store the special registers into the specified 64-bit and 32-bit
gdb_assert (sizeof (*iar) == DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM));
if (register_cached (PC_REGNUM))
- regcache_collect (PC_REGNUM, iar);
+ regcache_raw_collect (current_regcache, PC_REGNUM, iar);
if (register_cached (tdep->ppc_ps_regnum))
- regcache_collect (tdep->ppc_ps_regnum, msr);
+ regcache_raw_collect (current_regcache, tdep->ppc_ps_regnum, msr);
if (register_cached (tdep->ppc_cr_regnum))
- regcache_collect (tdep->ppc_cr_regnum, cr);
+ regcache_raw_collect (current_regcache, tdep->ppc_cr_regnum, cr);
if (register_cached (tdep->ppc_lr_regnum))
- regcache_collect (tdep->ppc_lr_regnum, lr);
+ regcache_raw_collect (current_regcache, tdep->ppc_lr_regnum, lr);
if (register_cached (tdep->ppc_ctr_regnum))
- regcache_collect (tdep->ppc_ctr_regnum, ctr);
+ regcache_raw_collect (current_regcache, tdep->ppc_ctr_regnum, ctr);
if (register_cached (tdep->ppc_xer_regnum))
- regcache_collect (tdep->ppc_xer_regnum, xer);
+ regcache_raw_collect (current_regcache, tdep->ppc_xer_regnum, xer);
if (tdep->ppc_fpscr_regnum >= 0
&& register_cached (tdep->ppc_fpscr_regnum))
- regcache_collect (tdep->ppc_fpscr_regnum, fpscr);
+ regcache_raw_collect (current_regcache, tdep->ppc_fpscr_regnum, fpscr);
}
static void
gdb_assert (sizeof (*iar) == DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM));
if (register_cached (PC_REGNUM))
- regcache_collect (PC_REGNUM, iar);
+ regcache_raw_collect (current_regcache, PC_REGNUM, iar);
if (register_cached (tdep->ppc_ps_regnum))
- regcache_collect (tdep->ppc_ps_regnum, msr);
+ regcache_raw_collect (current_regcache, tdep->ppc_ps_regnum, msr);
if (register_cached (tdep->ppc_cr_regnum))
- regcache_collect (tdep->ppc_cr_regnum, cr);
+ regcache_raw_collect (current_regcache, tdep->ppc_cr_regnum, cr);
if (register_cached (tdep->ppc_lr_regnum))
- regcache_collect (tdep->ppc_lr_regnum, lr);
+ regcache_raw_collect (current_regcache, tdep->ppc_lr_regnum, lr);
if (register_cached (tdep->ppc_ctr_regnum))
- regcache_collect (tdep->ppc_ctr_regnum, ctr);
+ regcache_raw_collect (current_regcache, tdep->ppc_ctr_regnum, ctr);
if (register_cached (tdep->ppc_xer_regnum))
- regcache_collect (tdep->ppc_xer_regnum, xer);
+ regcache_raw_collect (current_regcache, tdep->ppc_xer_regnum, xer);
if (tdep->ppc_fpscr_regnum >= 0
&& register_cached (tdep->ppc_fpscr_regnum))
- regcache_collect (tdep->ppc_fpscr_regnum, fpscr);
+ regcache_raw_collect (current_regcache, tdep->ppc_fpscr_regnum, fpscr);
}
/* Store all registers into pthread PDTID, which doesn't have a kernel
{
if (arch64)
{
- regcache_collect (tdep->ppc_gp0_regnum + i, (void *) &int64);
+ regcache_raw_collect (current_regcache, tdep->ppc_gp0_regnum + i,
+ (void *) &int64);
ctx.gpr[i] = int64;
}
else
{
- regcache_collect (tdep->ppc_gp0_regnum + i, (void *) &int32);
+ regcache_raw_collect (current_regcache, tdep->ppc_gp0_regnum + i,
+ (void *) &int32);
ctx.gpr[i] = int32;
}
}
if (tdep->ppc_mq_regnum >= 0)
if (register_cached (tdep->ppc_mq_regnum))
- regcache_collect (tdep->ppc_mq_regnum, &sprs32.pt_mq);
+ regcache_raw_collect (current_regcache, tdep->ppc_mq_regnum,
+ &sprs32.pt_mq);
ptrace32 (PTT_WRITE_SPRS, tid, (int *) &sprs32, 0, NULL);
}
for (i = 0; i < 31; ++i)
if (regno == i || regno == -1)
- regcache_collect (i, (char *)r0_r30 + i*8);
+ regcache_raw_collect (current_regcache, i, (char *)r0_r30 + i*8);
if (regno == ALPHA_PC_REGNUM || regno == -1)
- regcache_collect (ALPHA_PC_REGNUM, pc);
+ regcache_raw_collect (current_regcache, ALPHA_PC_REGNUM, pc);
if (unique && (regno == ALPHA_UNIQUE_REGNUM || regno == -1))
- regcache_collect (ALPHA_UNIQUE_REGNUM, unique);
+ regcache_raw_collect (current_regcache, ALPHA_UNIQUE_REGNUM, unique);
}
void
for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; ++i)
if (regno == i || regno == -1)
- regcache_collect (i, (char *)f0_f30 + (i - ALPHA_FP0_REGNUM) * 8);
+ regcache_raw_collect (current_regcache, i,
+ (char *)f0_f30 + (i - ALPHA_FP0_REGNUM) * 8);
if (regno == ALPHA_FPCR_REGNUM || regno == -1)
- regcache_collect (ALPHA_FPCR_REGNUM, fpcr);
+ regcache_raw_collect (current_regcache, ALPHA_FPCR_REGNUM, fpcr);
}
\f
{
unsigned int mem[3];
- regcache_collect (ARM_F0_REGNUM + fn, (char *) &mem[0]);
+ regcache_raw_collect (current_regcache, ARM_F0_REGNUM + fn,
+ (char *) &mem[0]);
fpa11->fpreg[fn].fSingle = mem[0];
fpa11->fType[fn] = typeSingle;
}
{
unsigned int mem[3];
- regcache_collect (ARM_F0_REGNUM + fn, (char *) &mem[0]);
+ regcache_raw_collect (current_regcache, ARM_F0_REGNUM + fn,
+ (char *) &mem[0]);
fpa11->fpreg[fn].fDouble[1] = mem[0];
fpa11->fpreg[fn].fDouble[0] = mem[1];
fpa11->fType[fn] = typeDouble;
{
unsigned int mem[3];
- regcache_collect (ARM_F0_REGNUM + fn, (char *) &mem[0]);
+ regcache_raw_collect (current_regcache, ARM_F0_REGNUM + fn,
+ (char *) &mem[0]);
fpa11->fpreg[fn].fExtended[0] = mem[0]; /* sign & exponent */
fpa11->fpreg[fn].fExtended[2] = mem[1]; /* ls bits */
fpa11->fpreg[fn].fExtended[1] = mem[2]; /* ms bits */
/* Store fpsr. */
if (ARM_FPS_REGNUM == regno && register_cached (ARM_FPS_REGNUM))
- regcache_collect (ARM_FPS_REGNUM, (char *) &fp.fpsr);
+ regcache_raw_collect (current_regcache, ARM_FPS_REGNUM, (char *) &fp.fpsr);
/* Store the floating point register. */
if (regno >= ARM_F0_REGNUM && regno <= ARM_F7_REGNUM)
/* Store fpsr. */
if (register_cached (ARM_FPS_REGNUM))
- regcache_collect (ARM_FPS_REGNUM, (char *) &fp.fpsr);
+ regcache_raw_collect (current_regcache, ARM_FPS_REGNUM, (char *) &fp.fpsr);
/* Store the floating point registers. */
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
}
if (regno >= ARM_A1_REGNUM && regno <= ARM_PC_REGNUM)
- regcache_collect (regno, (char *) ®s[regno]);
+ regcache_raw_collect (current_regcache, regno, (char *) ®s[regno]);
ret = ptrace (PTRACE_SETREGS, tid, 0, ®s);
if (ret < 0)
for (regno = ARM_A1_REGNUM; regno <= ARM_PC_REGNUM; regno++)
{
if (register_cached (regno))
- regcache_collect (regno, (char *) ®s[regno]);
+ regcache_raw_collect (current_regcache, regno, (char *) ®s[regno]);
}
ret = ptrace (PTRACE_SETREGS, tid, 0, ®s);
{
int regnum;
for (regnum = ARM_A1_REGNUM; regnum <= ARM_PC_REGNUM; regnum++)
- regcache_collect (regnum, (char *) &(*gregsetp)[regnum]);
+ regcache_raw_collect (current_regcache, regnum,
+ (char *) &(*gregsetp)[regnum]);
}
else if (regno >= ARM_A1_REGNUM && regno <= ARM_PC_REGNUM)
- regcache_collect (regno, (char *) &(*gregsetp)[regno]);
+ regcache_raw_collect (current_regcache, regno,
+ (char *) &(*gregsetp)[regno]);
if (ARM_PS_REGNUM == regno || -1 == regno)
{
if (arm_apcs_32)
- regcache_collect (ARM_PS_REGNUM,
- (char *) &(*gregsetp)[ARM_CPSR_REGNUM]);
+ regcache_raw_collect (current_regcache, ARM_PS_REGNUM,
+ (char *) &(*gregsetp)[ARM_CPSR_REGNUM]);
else
- regcache_collect (ARM_PC_REGNUM,
- (char *) &(*gregsetp)[ARM_PC_REGNUM]);
+ regcache_raw_collect (current_regcache, ARM_PC_REGNUM,
+ (char *) &(*gregsetp)[ARM_PC_REGNUM]);
}
}
/* Store fpsr. */
if (ARM_FPS_REGNUM == regno || -1 == regno)
- regcache_collect (ARM_FPS_REGNUM, (char *) &fp->fpsr);
+ regcache_raw_collect (current_regcache, ARM_FPS_REGNUM,
+ (char *) &fp->fpsr);
}
/* Fill GDB's register array with the floating-point register values
switch (regno)
{
case ARM_SP_REGNUM:
- regcache_collect (ARM_SP_REGNUM, (char *) &inferior_registers.r_sp);
+ regcache_raw_collect (current_regcache, ARM_SP_REGNUM,
+ (char *) &inferior_registers.r_sp);
break;
case ARM_LR_REGNUM:
- regcache_collect (ARM_LR_REGNUM, (char *) &inferior_registers.r_lr);
+ regcache_raw_collect (current_regcache, ARM_LR_REGNUM,
+ (char *) &inferior_registers.r_lr);
break;
case ARM_PC_REGNUM:
if (arm_apcs_32)
- regcache_collect (ARM_PC_REGNUM, (char *) &inferior_registers.r_pc);
+ regcache_raw_collect (current_regcache, ARM_PC_REGNUM,
+ (char *) &inferior_registers.r_pc);
else
{
unsigned pc_val;
- regcache_collect (ARM_PC_REGNUM, (char *) &pc_val);
+ regcache_raw_collect (current_regcache, ARM_PC_REGNUM,
+ (char *) &pc_val);
pc_val = ADDR_BITS_REMOVE (pc_val);
inferior_registers.r_pc
case ARM_PS_REGNUM:
if (arm_apcs_32)
- regcache_collect (ARM_PS_REGNUM, (char *) &inferior_registers.r_cpsr);
+ regcache_raw_collect (current_regcache, ARM_PS_REGNUM,
+ (char *) &inferior_registers.r_cpsr);
else
{
unsigned psr_val;
- regcache_collect (ARM_PS_REGNUM, (char *) &psr_val);
+ regcache_raw_collect (current_regcache, ARM_PS_REGNUM,
+ (char *) &psr_val);
psr_val ^= ADDR_BITS_REMOVE (psr_val);
inferior_registers.r_pc = ADDR_BITS_REMOVE (inferior_registers.r_pc);
break;
default:
- regcache_collect (regno, (char *) &inferior_registers.r[regno]);
+ regcache_raw_collect (current_regcache, regno,
+ (char *) &inferior_registers.r[regno]);
break;
}
for (regno = ARM_A1_REGNUM; regno < ARM_SP_REGNUM; regno++)
- regcache_collect (regno, (char *) &inferior_registers.r[regno]);
+ regcache_raw_collect (current_regcache, regno,
+ (char *) &inferior_registers.r[regno]);
- regcache_collect (ARM_SP_REGNUM, (char *) &inferior_registers.r_sp);
- regcache_collect (ARM_LR_REGNUM, (char *) &inferior_registers.r_lr);
+ regcache_raw_collect (current_regcache, ARM_SP_REGNUM,
+ (char *) &inferior_registers.r_sp);
+ regcache_raw_collect (current_regcache, ARM_LR_REGNUM,
+ (char *) &inferior_registers.r_lr);
if (arm_apcs_32)
{
- regcache_collect (ARM_PC_REGNUM, (char *) &inferior_registers.r_pc);
- regcache_collect (ARM_PS_REGNUM, (char *) &inferior_registers.r_cpsr);
+ regcache_raw_collect (current_regcache, ARM_PC_REGNUM,
+ (char *) &inferior_registers.r_pc);
+ regcache_raw_collect (current_regcache, ARM_PS_REGNUM,
+ (char *) &inferior_registers.r_cpsr);
}
else
{
unsigned pc_val;
unsigned psr_val;
- regcache_collect (ARM_PC_REGNUM, (char *) &pc_val);
- regcache_collect (ARM_PS_REGNUM, (char *) &psr_val);
+ regcache_raw_collect (current_regcache, ARM_PC_REGNUM,
+ (char *) &pc_val);
+ regcache_raw_collect (current_regcache, ARM_PS_REGNUM,
+ (char *) &psr_val);
pc_val = ADDR_BITS_REMOVE (pc_val);
psr_val ^= ADDR_BITS_REMOVE (psr_val);
switch (regno)
{
case ARM_FPS_REGNUM:
- regcache_collect (ARM_FPS_REGNUM,
- (char *) &inferior_fp_registers.fpr_fpsr);
+ regcache_raw_collect (current_regcache, ARM_FPS_REGNUM,
+ (char *) &inferior_fp_registers.fpr_fpsr);
break;
default:
- regcache_collect
- (regno, (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
+ regcache_raw_collect (current_regcache, regno,
+ (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
break;
}
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
- regcache_collect
- (regno, (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
+ regcache_raw_collect (current_regcache, regno,
+ (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
- regcache_collect (ARM_FPS_REGNUM, (char *) &inferior_fp_registers.fpr_fpsr);
+ regcache_raw_collect (current_regcache, ARM_FPS_REGNUM,
+ (char *) &inferior_fp_registers.fpr_fpsr);
ret = ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) &inferior_fp_registers, 0);
store_register (int regno)
{
if (regno < FP0_REGNUM)
- regcache_collect (regno, (char *) &a_tss + regno_mapping[regno].tss_ofs);
+ regcache_raw_collect (current_regcache, regno,
+ (char *) &a_tss + regno_mapping[regno].tss_ofs);
else if (i386_fp_regnum_p (regno) || i386_fpc_regnum_p (regno))
i387_fill_fsave ((char *) &npx, regno);
else
if (regno == -1 || regno == mregno)
{
- regcache_collect(mregno, &(*gregsetp)[i]);
+ regcache_raw_collect(current_regcache, mregno, &(*gregsetp)[i]);
}
}
}
char *to = (char *) &((*fpregsetp)[(i - HPPA_FP0_REGNUM) / 2]);
if ((i - HPPA_FP0_REGNUM) & 1)
to += 4;
- regcache_collect (i, to);
+ regcache_raw_collect (current_regcache, i, to);
}
}
tid = PIDGET (inferior_ptid); /* Not a threaded program. */
errno = 0;
- regcache_collect (regno, &val);
+ regcache_raw_collect (current_regcache, regno, &val);
ptrace (PTRACE_POKEUSER, tid, register_addr (regno, 0), val);
if (errno != 0)
error ("Couldn't write register %s (#%d): %s.", REGISTER_NAME (regno),
for (i = 0; i < I386_NUM_GREGS; i++)
if (regno == -1 || regno == i)
- regcache_collect (i, regp + regmap[i]);
+ regcache_raw_collect (current_regcache, i, regp + regmap[i]);
if ((regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM)
&& I386_LINUX_ORIG_EAX_REGNUM < NUM_REGS)
- regcache_collect (I386_LINUX_ORIG_EAX_REGNUM, regp + ORIG_EAX);
+ regcache_raw_collect (current_regcache, I386_LINUX_ORIG_EAX_REGNUM,
+ regp + ORIG_EAX);
}
#ifdef HAVE_PTRACE_GETREGS
{
int offset = nto_reg_offset (regno);
if (offset != -1)
- regcache_collect (regno, data + offset);
+ regcache_raw_collect (current_regcache, regno, data + offset);
}
}
else if (regset == NTO_REG_FLOAT)
regaddr = register_addr (regno, offset);
/* Put the contents of regno into a local buffer */
- regcache_collect (regno, buf);
+ regcache_raw_collect (current_regcache, regno, buf);
/* Store the local buffer into the inferior a chunk at the time. */
for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
for (regi = 0; regi < R_PC; regi++)
{
if (regno == -1 || regno == regi)
- regcache_collect (regi, regp + regi);
+ regcache_raw_collect (current_regcache, regi, regp + regi);
}
if (regno == -1 || regno == PS_REGNUM)
- regcache_collect (PS_REGNUM, regp + R_PS);
+ regcache_raw_collect (current_regcache, PS_REGNUM, regp + R_PS);
if (regno == -1 || regno == PC_REGNUM)
- regcache_collect (PC_REGNUM, regp + R_PC);
+ regcache_raw_collect (current_regcache, PC_REGNUM, regp + R_PC);
}
#if defined (FP0_REGNUM)
for (regi = FP0_REGNUM; regi < M68K_FPC_REGNUM; regi++)
{
if (regno == -1 || regno == regi)
- regcache_collect (regi, &fpregsetp->f_fpregs[regi - FP0_REGNUM][0]);
+ regcache_raw_collect (current_regcache, regi,
+ &fpregsetp->f_fpregs[regi - FP0_REGNUM][0]);
}
if (regno == -1 || regno == M68K_FPC_REGNUM)
- regcache_collect (M68K_FPC_REGNUM, &fpregsetp->f_pcr);
+ regcache_raw_collect (current_regcache, M68K_FPC_REGNUM,
+ &fpregsetp->f_pcr);
if (regno == -1 || regno == M68K_FPS_REGNUM)
- regcache_collect (M68K_FPS_REGNUM, &fpregsetp->f_psr);
+ regcache_raw_collect (current_regcache, M68K_FPS_REGNUM,
+ &fpregsetp->f_psr);
if (regno == -1 || regno == M68K_FPI_REGNUM)
- regcache_collect (M68K_FPI_REGNUM, &fpregsetp->f_fpiaddr);
+ regcache_raw_collect (current_regcache, M68K_FPI_REGNUM,
+ &fpregsetp->f_fpiaddr);
}
#endif /* defined (FP0_REGNUM) */
regaddr = register_addr (regno, offset);
/* Put the contents of regno into a local buffer */
- regcache_collect (regno, buf);
+ regcache_raw_collect (current_regcache, regno, buf);
/* Store the local buffer into the inferior a chunk at the time. */
for (i = 0; i < register_size (current_gdbarch, regno);
for (i = 0; i < NUM_GREGS; i++)
if (regno == -1 || regno == i)
- regcache_collect (i, regp + regmap[i]);
+ regcache_raw_collect (current_regcache, i, regp + regmap[i]);
}
#ifdef HAVE_PTRACE_GETREGS
/* Fill in the floating-point registers. */
for (i = FP0_REGNUM; i < FP0_REGNUM + 8; i++)
if (regno == -1 || regno == i)
- regcache_collect (i, FPREG_ADDR (fpregsetp, i - FP0_REGNUM));
+ regcache_raw_collect (current_regcache, i,
+ FPREG_ADDR (fpregsetp, i - FP0_REGNUM));
/* Fill in the floating-point control registers. */
for (i = M68K_FPC_REGNUM; i <= M68K_FPI_REGNUM; i++)
if (regno == -1 || regno == i)
- regcache_collect (i, (char *) &fpregsetp->fpcntl[i - M68K_FPC_REGNUM]);
+ regcache_raw_collect (current_regcache, i,
+ (char *) &fpregsetp->fpcntl[i - M68K_FPC_REGNUM]);
}
#ifdef HAVE_PTRACE_GETREGS
if (regno < 32)
{
dst = regp + regno + EF_REG0;
- regcache_collect (regno, dst);
+ regcache_raw_collect (current_regcache, regno, dst);
return;
}
if (regaddr != -1)
{
dst = regp + regaddr;
- regcache_collect (regno, dst);
+ regcache_raw_collect (current_regcache, regno, dst);
}
}
if (regno < 32)
{
dst = regp + regno + MIPS64_EF_REG0;
- regcache_collect (regno, dst);
+ regcache_raw_collect (current_regcache, regno, dst);
return;
}
if (regaddr != -1)
{
dst = regp + regaddr;
- regcache_collect (regno, dst);
+ regcache_raw_collect (current_regcache, regno, dst);
}
}
for (i = 0; i <= PC_REGNUM; i++)
if ((regno == i || regno == -1) && ! CANNOT_STORE_REGISTER (i))
- regcache_collect (i, regs + (i * mips_isa_regsize (current_gdbarch)));
+ regcache_raw_collect (current_regcache, i,
+ regs + (i * mips_isa_regsize (current_gdbarch)));
}
void
for (i = FP0_REGNUM; i <= mips_regnum (current_gdbarch)->fp_control_status;
i++)
if ((regno == i || regno == -1) && ! CANNOT_STORE_REGISTER (i))
- regcache_collect (i, fpregs + ((i - FP0_REGNUM) * mips_isa_regsize (current_gdbarch)));
+ regcache_raw_collect (current_regcache, i,
+ fpregs + ((i - FP0_REGNUM) * mips_isa_regsize (current_gdbarch)));
}
static void
if (len < 1)
return;
- regcache_collect (regno, (char *) ® + off);
+ regcache_raw_collect (current_regcache, regno, (char *) ® + off);
err = devctl (ctl_fd, dev_set, ®, regsize, 0);
if (err != EOK)
if (regno == (tdep->ppc_vrsave_regnum - 1))
offset = vrregsize - DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vrsave_regnum);
- regcache_collect (regno,
- regs + (regno - tdep->ppc_vr0_regnum) * vrregsize + offset);
+ regcache_raw_collect (current_regcache, regno,
+ regs + (regno - tdep->ppc_vr0_regnum) * vrregsize + offset);
ret = ptrace (PTRACE_SETVRREGS, tid, 0, ®s);
if (ret < 0)
&& tdep->ppc_ev0_regnum <= regno && regno <= tdep->ppc_ev31_regnum)
{
char buf[MAX_REGISTER_SIZE];
- regcache_collect (regno, buf);
+ regcache_raw_collect (current_regcache, regno, buf);
write_spliced_spe_reg (tid, regno, &evrregs, buf);
}
else if (tdep->ppc_acc_regnum >= 0
{
gdb_assert (sizeof (evrregs.acc)
== register_size (current_gdbarch, regno));
- regcache_collect (regno, &evrregs.acc);
+ regcache_raw_collect (current_regcache, regno, &evrregs.acc);
}
else if (tdep->ppc_spefscr_regnum >= 0
&& regno == tdep->ppc_spefscr_regnum)
{
gdb_assert (sizeof (evrregs.spefscr)
== register_size (current_gdbarch, regno));
- regcache_collect (regno, &evrregs.spefscr);
+ regcache_raw_collect (current_regcache, regno, &evrregs.spefscr);
}
else
gdb_assert (0);
/* The last 2 registers of this set are only 32 bit long, not
128, but only VSCR is fetched as a 16 bytes quantity. */
if (i == (num_of_vrregs - 2))
- regcache_collect (tdep->ppc_vr0_regnum + i,
- *vrregsetp + i * vrregsize + offset);
+ regcache_raw_collect (current_regcache, tdep->ppc_vr0_regnum + i,
+ *vrregsetp + i * vrregsize + offset);
else
- regcache_collect (tdep->ppc_vr0_regnum + i, *vrregsetp + i * vrregsize);
+ regcache_raw_collect (current_regcache, tdep->ppc_vr0_regnum + i,
+ *vrregsetp + i * vrregsize);
}
}
{
char buf[MAX_REGISTER_SIZE];
- regcache_collect (tdep->ppc_ev0_regnum + i, buf);
+ regcache_raw_collect (current_regcache, tdep->ppc_ev0_regnum + i, buf);
write_spliced_spe_reg (tid, tdep->ppc_ev0_regnum + i, &evrregs, buf);
}
gdb_assert (sizeof (evrregs.acc)
== register_size (current_gdbarch, tdep->ppc_acc_regnum));
- regcache_collect (tdep->ppc_acc_regnum, &evrregs.acc);
+ regcache_raw_collect (current_regcache, tdep->ppc_acc_regnum, &evrregs.acc);
gdb_assert (sizeof (evrregs.spefscr)
== register_size (current_gdbarch, tdep->ppc_spefscr_regnum));
- regcache_collect (tdep->ppc_acc_regnum, &evrregs.spefscr);
+ regcache_raw_collect (current_regcache, tdep->ppc_acc_regnum, &evrregs.spefscr);
set_spe_registers (tid, &evrregs);
}
if ((regno == -1) || regno == tdep->ppc_lr_regnum)
right_fill_reg (tdep->ppc_lr_regnum, regp + PT_LNK);
if ((regno == -1) || regno == tdep->ppc_cr_regnum)
- regcache_collect (tdep->ppc_cr_regnum, regp + PT_CCR);
+ regcache_raw_collect (current_regcache, tdep->ppc_cr_regnum,
+ regp + PT_CCR);
if ((regno == -1) || regno == tdep->ppc_xer_regnum)
- regcache_collect (tdep->ppc_xer_regnum, regp + PT_XER);
+ regcache_raw_collect (current_regcache, tdep->ppc_xer_regnum,
+ regp + PT_XER);
if ((regno == -1) || regno == tdep->ppc_ctr_regnum)
right_fill_reg (tdep->ppc_ctr_regnum, regp + PT_CTR);
#ifdef PT_MQ
for (regi = 0; regi < ppc_num_fprs; regi++)
{
if ((regno == -1) || (regno == tdep->ppc_fp0_regnum + regi))
- regcache_collect (tdep->ppc_fp0_regnum + regi, fpp + 8 * regi);
+ regcache_raw_collect (current_regcache, tdep->ppc_fp0_regnum + regi,
+ fpp + 8 * regi);
}
if (regno == -1 || regno == tdep->ppc_fpscr_regnum)
right_fill_reg (tdep->ppc_fpscr_regnum, (fpp + 8 * 32));
for (i = 0; i < ppc_num_gprs; i++)
{
if (regno == tdep->ppc_gp0_regnum + i || regno == -1)
- regcache_collect (tdep->ppc_gp0_regnum + i,
- regs + REG_FIXREG_OFFSET (i));
+ regcache_raw_collect (current_regcache, tdep->ppc_gp0_regnum + i,
+ regs + REG_FIXREG_OFFSET (i));
}
if (regno == tdep->ppc_lr_regnum || regno == -1)
- regcache_collect (tdep->ppc_lr_regnum, regs + REG_LR_OFFSET);
+ regcache_raw_collect (current_regcache, tdep->ppc_lr_regnum,
+ regs + REG_LR_OFFSET);
if (regno == tdep->ppc_cr_regnum || regno == -1)
- regcache_collect (tdep->ppc_cr_regnum, regs + REG_CR_OFFSET);
+ regcache_raw_collect (current_regcache, tdep->ppc_cr_regnum,
+ regs + REG_CR_OFFSET);
if (regno == tdep->ppc_xer_regnum || regno == -1)
- regcache_collect (tdep->ppc_xer_regnum, regs + REG_XER_OFFSET);
+ regcache_raw_collect (current_regcache, tdep->ppc_xer_regnum,
+ regs + REG_XER_OFFSET);
if (regno == tdep->ppc_ctr_regnum || regno == -1)
- regcache_collect (tdep->ppc_ctr_regnum, regs + REG_CTR_OFFSET);
+ regcache_raw_collect (current_regcache, tdep->ppc_ctr_regnum,
+ regs + REG_CTR_OFFSET);
if (regno == PC_REGNUM || regno == -1)
- regcache_collect (PC_REGNUM, regs + REG_PC_OFFSET);
+ regcache_raw_collect (current_regcache, PC_REGNUM, regs + REG_PC_OFFSET);
}
void
for (i = 0; i < ppc_num_fprs; i++)
{
if (regno == tdep->ppc_fp0_regnum + i || regno == -1)
- regcache_collect (tdep->ppc_fp0_regnum + i,
- fpregs + FPREG_FPR_OFFSET (i));
+ regcache_raw_collect (current_regcache, tdep->ppc_fp0_regnum + i,
+ fpregs + FPREG_FPR_OFFSET (i));
}
if (regno == tdep->ppc_fpscr_regnum || regno == -1)
- regcache_collect (tdep->ppc_fpscr_regnum, fpregs + FPREG_FPSCR_OFFSET);
+ regcache_raw_collect (current_regcache, tdep->ppc_fpscr_regnum,
+ fpregs + FPREG_FPSCR_OFFSET);
}
static void
inferior_ptid = save_ptid;
}
-void
-regcache_collect (int regnum, void *buf)
-{
- regcache_raw_collect (current_regcache, regnum, buf);
-}
-
/* Supply register REGNUM, whose contents are stored in BUF, to REGCACHE. */
void
target. These functions are called by the target in response to a
target_fetch_registers() or target_store_registers(). */
-extern void regcache_collect (int regnum, void *buf);
extern void regcache_raw_supply (struct regcache *regcache,
int regnum, const void *buf);
extern void regcache_raw_collect (const struct regcache *regcache,
sprintf (buf, "P%s=", phex_nz (reg->pnum, 0));
p = buf + strlen (buf);
- regcache_collect (reg->regnum, regp);
+ regcache_raw_collect (current_regcache, reg->regnum, regp);
bin2hex (regp, p, DEPRECATED_REGISTER_RAW_SIZE (reg->regnum));
remote_send (buf, rs->remote_packet_size);
{
struct packet_reg *r = &rs->regs[i];
if (r->in_g_packet)
- regcache_collect (r->regnum, regs + r->offset);
+ regcache_raw_collect (current_regcache, r->regnum, regs + r->offset);
}
}
int nr, isfloat;
/* Fetch the register's value from the register cache. */
- regcache_collect (regno, addr);
+ regcache_raw_collect (current_regcache, regno, addr);
/* -1 can be a successful return value, so infer errors from errno. */
errno = 0;
int i;
if (regno == PC_REGNUM || regno == -1)
- regcache_collect (PC_REGNUM, regs + (0 * 4));
+ regcache_raw_collect (current_regcache, PC_REGNUM, regs + (0 * 4));
if (regno == SR_REGNUM || regno == -1)
- regcache_collect (SR_REGNUM, regs + (1 * 4));
+ regcache_raw_collect (current_regcache, SR_REGNUM, regs + (1 * 4));
if (regno == PR_REGNUM || regno == -1)
- regcache_collect (PR_REGNUM, regs + (2 * 4));
+ regcache_raw_collect (current_regcache, PR_REGNUM, regs + (2 * 4));
if (regno == MACH_REGNUM || regno == -1)
- regcache_collect (MACH_REGNUM, regs + (3 * 4));
+ regcache_raw_collect (current_regcache, MACH_REGNUM, regs + (3 * 4));
if (regno == MACL_REGNUM || regno == -1)
- regcache_collect (MACL_REGNUM, regs + (4 * 4));
+ regcache_raw_collect (current_regcache, MACL_REGNUM, regs + (4 * 4));
if ((regno >= R0_REGNUM && regno <= (R0_REGNUM + 15)) || regno == -1)
{
for (i = R0_REGNUM; i <= (R0_REGNUM + 15); i++)
if (regno == i || regno == -1)
- regcache_collect (i, regs + regmap[i - R0_REGNUM]);
+ regcache_raw_collect (current_regcache, i,
+ regs + regmap[i - R0_REGNUM]);
}
}
char old_value[MAX_REGISTER_SIZE];
/* Save new register value. */
- regcache_collect (regnum, old_value);
+ regcache_raw_collect (current_regcache, regnum, old_value);
val = p_td_thr_getgregs (&thandle, gregset);
if (val != TD_OK)
if (!current_thread)
/* Windows sometimes uses a non-existent thread id in its events */;
else if (r >= 0)
- regcache_collect (r, ((char *) ¤t_thread->context) + mappings[r]);
+ regcache_raw_collect (current_regcache, r,
+ ((char *) ¤t_thread->context) + mappings[r]);
else
{
for (r = 0; r < NUM_REGS; r++)
if (!current_thread)
/* Windows sometimes uses a non-existent thread id in its events */;
else if (r >= 0)
- regcache_collect (r, ((char *) ¤t_thread->context) + mappings[r]);
+ regcache_raw_collect (current_regcache, r,
+ ((char *) ¤t_thread->context) + mappings[r]);
else
{
for (r = 0; r < NUM_REGS; r++)