+2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
+
+ * regcache.h (regcache_raw_collect): Remove, update callers to
+ use regcache::raw_collect.
+ * regcache.c (regcache_raw_collect): Remove.
+
2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
* regcache.h (regcache_raw_supply): Remove, update callers to
for (regno = ARM_A1_REGNUM; regno <= ARM_PC_REGNUM; regno++)
{
if (REG_VALID == regcache->get_register_status (regno))
- regcache_raw_collect (regcache, regno, ®s[regno]);
+ regcache->raw_collect (regno, ®s[regno]);
}
if (arm_apcs_32
{
uint32_t cpsr = regs[ARM_CPSR_GREGNUM];
- regcache_raw_collect (regcache, ARM_PS_REGNUM,
- ®s[ARM_CPSR_GREGNUM]);
+ regcache->raw_collect (ARM_PS_REGNUM, ®s[ARM_CPSR_GREGNUM]);
/* Keep reserved bits bit 20 to bit 23. */
regs[ARM_CPSR_GREGNUM] = ((regs[ARM_CPSR_GREGNUM] & 0xff0fffff)
| (cpsr & 0x00f00000));
int regno;
for (regno = 0; regno < vfp_register_count; regno++)
- regcache_raw_collect (regcache, regno + ARM_D0_REGNUM, regs + regno * 8);
+ regcache->raw_collect (regno + ARM_D0_REGNUM, regs + regno * 8);
- regcache_raw_collect (regcache, ARM_FPSCR_REGNUM, regs + 32 * 8);
+ regcache->raw_collect (ARM_FPSCR_REGNUM, regs + 32 * 8);
}
for (regno = AARCH64_X0_REGNUM; regno <= AARCH64_CPSR_REGNUM; regno++)
if (REG_VALID == regcache->get_register_status (regno))
- regcache_raw_collect (regcache, regno,
- ®s[regno - AARCH64_X0_REGNUM]);
+ regcache->raw_collect (regno, ®s[regno - AARCH64_X0_REGNUM]);
}
ret = ptrace (PTRACE_SETREGSET, tid, NT_PRSTATUS, &iovec);
for (regno = AARCH64_V0_REGNUM; regno <= AARCH64_V31_REGNUM; regno++)
if (REG_VALID == regcache->get_register_status (regno))
- regcache_raw_collect (regcache, regno,
- (char *) ®s.vregs[regno - AARCH64_V0_REGNUM]);
+ regcache->raw_collect
+ (regno, (char *) ®s.vregs[regno - AARCH64_V0_REGNUM]);
if (REG_VALID == regcache->get_register_status (AARCH64_FPSR_REGNUM))
- regcache_raw_collect (regcache, AARCH64_FPSR_REGNUM,
- (char *) ®s.fpsr);
+ regcache->raw_collect (AARCH64_FPSR_REGNUM, (char *) ®s.fpsr);
if (REG_VALID == regcache->get_register_status (AARCH64_FPCR_REGNUM))
- regcache_raw_collect (regcache, AARCH64_FPCR_REGNUM,
- (char *) ®s.fpcr);
+ regcache->raw_collect (AARCH64_FPCR_REGNUM, (char *) ®s.fpcr);
}
if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 32)
for (regno = 0; regno < ppc_num_gprs; regno++)
if (REG_VALID == regcache->get_register_status
(tdep->ppc_gp0_regnum + regno))
- regcache_raw_collect (regcache, tdep->ppc_gp0_regnum + regno,
- vals + regno);
+ regcache->raw_collect (tdep->ppc_gp0_regnum + regno, vals + regno);
}
static void
for (regno = 0; regno < ppc_num_gprs; regno++)
if (REG_VALID == regcache->get_register_status
(tdep->ppc_gp0_regnum + regno))
- regcache_raw_collect (regcache, tdep->ppc_gp0_regnum + regno,
- vals + regno);
+ regcache->raw_collect (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 (REG_VALID == regcache->get_register_status (regno))
- regcache_raw_collect (regcache, regno,
- vals + regno - tdep->ppc_fp0_regnum);
+ regcache->raw_collect (regno, vals + regno - tdep->ppc_fp0_regnum);
}
/* Store the special registers into the specified 64-bit and 32-bit
(gdbarch, gdbarch_pc_regnum (gdbarch)));
if (REG_VALID == regcache->get_register_status (gdbarch_pc_regnum (gdbarch)))
- regcache_raw_collect (regcache, gdbarch_pc_regnum (gdbarch), iar);
+ regcache->raw_collect (gdbarch_pc_regnum (gdbarch), iar);
if (REG_VALID == regcache->get_register_status (tdep->ppc_ps_regnum))
- regcache_raw_collect (regcache, tdep->ppc_ps_regnum, msr);
+ regcache->raw_collect (tdep->ppc_ps_regnum, msr);
if (REG_VALID == regcache->get_register_status (tdep->ppc_cr_regnum))
- regcache_raw_collect (regcache, tdep->ppc_cr_regnum, cr);
+ regcache->raw_collect (tdep->ppc_cr_regnum, cr);
if (REG_VALID == regcache->get_register_status (tdep->ppc_lr_regnum))
- regcache_raw_collect (regcache, tdep->ppc_lr_regnum, lr);
+ regcache->raw_collect (tdep->ppc_lr_regnum, lr);
if (REG_VALID == regcache->get_register_status (tdep->ppc_ctr_regnum))
- regcache_raw_collect (regcache, tdep->ppc_ctr_regnum, ctr);
+ regcache->raw_collect (tdep->ppc_ctr_regnum, ctr);
if (REG_VALID == regcache->get_register_status (tdep->ppc_xer_regnum))
- regcache_raw_collect (regcache, tdep->ppc_xer_regnum, xer);
+ regcache->raw_collect (tdep->ppc_xer_regnum, xer);
if (tdep->ppc_fpscr_regnum >= 0
&& REG_VALID == regcache->get_register_status (tdep->ppc_fpscr_regnum))
- regcache_raw_collect (regcache, tdep->ppc_fpscr_regnum, fpscr);
+ regcache->raw_collect (tdep->ppc_fpscr_regnum, fpscr);
}
static void
gdbarch_pc_regnum (gdbarch)));
if (REG_VALID == regcache->get_register_status (gdbarch_pc_regnum (gdbarch)))
- regcache_raw_collect (regcache, gdbarch_pc_regnum (gdbarch), iar);
+ regcache->raw_collect (gdbarch_pc_regnum (gdbarch), iar);
if (REG_VALID == regcache->get_register_status (tdep->ppc_ps_regnum))
- regcache_raw_collect (regcache, tdep->ppc_ps_regnum, msr);
+ regcache->raw_collect (tdep->ppc_ps_regnum, msr);
if (REG_VALID == regcache->get_register_status (tdep->ppc_cr_regnum))
- regcache_raw_collect (regcache, tdep->ppc_cr_regnum, cr);
+ regcache->raw_collect (tdep->ppc_cr_regnum, cr);
if (REG_VALID == regcache->get_register_status (tdep->ppc_lr_regnum))
- regcache_raw_collect (regcache, tdep->ppc_lr_regnum, lr);
+ regcache->raw_collect (tdep->ppc_lr_regnum, lr);
if (REG_VALID == regcache->get_register_status (tdep->ppc_ctr_regnum))
- regcache_raw_collect (regcache, tdep->ppc_ctr_regnum, ctr);
+ regcache->raw_collect (tdep->ppc_ctr_regnum, ctr);
if (REG_VALID == regcache->get_register_status (tdep->ppc_xer_regnum))
- regcache_raw_collect (regcache, tdep->ppc_xer_regnum, xer);
+ regcache->raw_collect (tdep->ppc_xer_regnum, xer);
if (tdep->ppc_fpscr_regnum >= 0
&& REG_VALID == regcache->get_register_status (tdep->ppc_fpscr_regnum))
- regcache_raw_collect (regcache, tdep->ppc_fpscr_regnum, fpscr);
+ regcache->raw_collect (tdep->ppc_fpscr_regnum, fpscr);
}
/* Store all registers into pthread PDTID, which doesn't have a kernel
{
if (arch64)
{
- regcache_raw_collect (regcache, tdep->ppc_gp0_regnum + i,
- (void *) &int64);
+ regcache->raw_collect (tdep->ppc_gp0_regnum + i, (void *) &int64);
ctx.gpr[i] = int64;
}
else
{
- regcache_raw_collect (regcache, tdep->ppc_gp0_regnum + i,
- (void *) &int32);
+ regcache->raw_collect (tdep->ppc_gp0_regnum + i, (void *) &int32);
ctx.gpr[i] = int32;
}
}
if (tdep->ppc_mq_regnum >= 0)
if (REG_VALID == regcache->get_register_status
(tdep->ppc_mq_regnum))
- regcache_raw_collect (regcache, tdep->ppc_mq_regnum,
- &sprs32.pt_mq);
+ regcache->raw_collect (tdep->ppc_mq_regnum, &sprs32.pt_mq);
ptrace32 (PTT_WRITE_SPRS, tid, (uintptr_t) &sprs32, 0, NULL);
}
for (i = 0; i < 31; ++i)
if (regno == i || regno == -1)
- regcache_raw_collect (regcache, i, regs + i * 8);
+ regcache->raw_collect (i, regs + i * 8);
if (regno == ALPHA_PC_REGNUM || regno == -1)
- regcache_raw_collect (regcache, ALPHA_PC_REGNUM, pc);
+ regcache->raw_collect (ALPHA_PC_REGNUM, pc);
if (unique && (regno == ALPHA_UNIQUE_REGNUM || regno == -1))
- regcache_raw_collect (regcache, ALPHA_UNIQUE_REGNUM, unique);
+ regcache->raw_collect (ALPHA_UNIQUE_REGNUM, unique);
}
void
for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; ++i)
if (regno == i || regno == -1)
- regcache_raw_collect (regcache, i,
- regs + (i - ALPHA_FP0_REGNUM) * 8);
+ regcache->raw_collect (i, regs + (i - ALPHA_FP0_REGNUM) * 8);
if (regno == ALPHA_FPCR_REGNUM || regno == -1)
- regcache_raw_collect (regcache, ALPHA_FPCR_REGNUM, fpcr);
+ regcache->raw_collect (ALPHA_FPCR_REGNUM, fpcr);
}
\f
{
register_t base;
- regcache_raw_collect (regcache, AMD64_FSBASE_REGNUM, &base);
+ regcache->raw_collect (AMD64_FSBASE_REGNUM, &base);
if (ptrace (PT_SETFSBASE, pid, (PTRACE_TYPE_ARG3) &base, 0) == -1)
perror_with_name (_("Couldn't write segment register fs_base"));
{
register_t base;
- regcache_raw_collect (regcache, AMD64_GSBASE_REGNUM, &base);
+ regcache->raw_collect (AMD64_GSBASE_REGNUM, &base);
if (ptrace (PT_SETGSBASE, pid, (PTRACE_TYPE_ARG3) &base, 0) == -1)
perror_with_name (_("Couldn't write segment register gs_base"));
if (regnum == -1 || regnum == AMD64_FSBASE_REGNUM)
{
- regcache_raw_collect (regcache, AMD64_FSBASE_REGNUM, &base);
+ regcache->raw_collect (AMD64_FSBASE_REGNUM, &base);
if (ptrace (PTRACE_ARCH_PRCTL, tid, base, ARCH_SET_FS) < 0)
perror_with_name (_("Couldn't write segment register fs_base"));
if (regnum == -1 || regnum == AMD64_GSBASE_REGNUM)
{
- regcache_raw_collect (regcache, AMD64_GSBASE_REGNUM, &base);
+ regcache->raw_collect (AMD64_GSBASE_REGNUM, &base);
if (ptrace (PTRACE_ARCH_PRCTL, tid, base, ARCH_SET_GS) < 0)
perror_with_name (_("Couldn't write segment register gs_base"));
}
int offset = amd64_native_gregset_reg_offset (gdbarch, i);
if (offset != -1)
- regcache_raw_collect (regcache, i, regs + offset);
+ regcache->raw_collect (i, regs + offset);
}
}
}
/* Calculate the stack pointer (frame pointer) that will be
stored into the thread structure. */
offset = amd64obsd_uthread_reg_offset[AMD64_RIP_REGNUM] + 8;
- regcache_raw_collect (regcache, AMD64_RSP_REGNUM, buf);
+ regcache->raw_collect (AMD64_RSP_REGNUM, buf);
sp = extract_unsigned_integer (buf, 8, byte_order) - offset;
/* Store the stack pointer. */
sp = read_memory_unsigned_integer (sp_addr, 8, byte_order);
/* Write the register into the stack frame. */
- regcache_raw_collect (regcache, i, buf);
+ regcache->raw_collect (i, buf);
write_memory (sp + amd64obsd_uthread_reg_offset[i], buf, 8);
}
}
if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 64)
{
if (regnum == -1 || regnum == I387_FISEG_REGNUM (tdep))
- regcache_raw_collect (regcache, I387_FISEG_REGNUM (tdep), regs + 12);
+ regcache->raw_collect (I387_FISEG_REGNUM (tdep), regs + 12);
if (regnum == -1 || regnum == I387_FOSEG_REGNUM (tdep))
- regcache_raw_collect (regcache, I387_FOSEG_REGNUM (tdep), regs + 20);
+ regcache->raw_collect (I387_FOSEG_REGNUM (tdep), regs + 20);
}
}
if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 64)
{
if (regnum == -1 || regnum == I387_FISEG_REGNUM (tdep))
- regcache_raw_collect (regcache, I387_FISEG_REGNUM (tdep),
+ regcache->raw_collect (I387_FISEG_REGNUM (tdep),
regs + 12);
if (regnum == -1 || regnum == I387_FOSEG_REGNUM (tdep))
- regcache_raw_collect (regcache, I387_FOSEG_REGNUM (tdep),
+ regcache->raw_collect (I387_FOSEG_REGNUM (tdep),
regs + 20);
}
}
/* Store fpsr. */
if (REG_VALID == regcache->get_register_status (ARM_FPS_REGNUM))
- regcache_raw_collect (regcache, ARM_FPS_REGNUM, fp + NWFPE_FPSR_OFFSET);
+ regcache->raw_collect (ARM_FPS_REGNUM, fp + NWFPE_FPSR_OFFSET);
/* Store the floating point registers. */
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
for (regno = 0; regno < 16; regno++)
if (REG_VALID == regcache->get_register_status (regno + ARM_WR0_REGNUM))
- regcache_raw_collect (regcache, regno + ARM_WR0_REGNUM,
- ®buf[regno * 8]);
+ regcache->raw_collect (regno + ARM_WR0_REGNUM, ®buf[regno * 8]);
for (regno = 0; regno < 2; regno++)
if (REG_VALID == regcache->get_register_status (regno + ARM_WCSSF_REGNUM))
- regcache_raw_collect (regcache, regno + ARM_WCSSF_REGNUM,
- ®buf[16 * 8 + regno * 4]);
+ regcache->raw_collect (regno + ARM_WCSSF_REGNUM,
+ ®buf[16 * 8 + regno * 4]);
for (regno = 0; regno < 4; regno++)
if (REG_VALID == regcache->get_register_status (regno + ARM_WCGR0_REGNUM))
- regcache_raw_collect (regcache, regno + ARM_WCGR0_REGNUM,
- ®buf[16 * 8 + 2 * 4 + regno * 4]);
+ regcache->raw_collect (regno + ARM_WCGR0_REGNUM,
+ ®buf[16 * 8 + 2 * 4 + regno * 4]);
ret = ptrace (PTRACE_SETWMMXREGS, tid, 0, regbuf);
for (regno = ARM_A1_REGNUM; regno < ARM_PC_REGNUM; regno++)
if (regnum == -1 || regnum == regno)
- regcache_raw_collect (regcache, regno,
+ regcache->raw_collect (regno,
gregs + INT_REGISTER_SIZE * regno);
if (regnum == ARM_PS_REGNUM || regnum == -1)
{
if (arm_apcs_32)
- regcache_raw_collect (regcache, ARM_PS_REGNUM,
+ regcache->raw_collect (ARM_PS_REGNUM,
gregs + INT_REGISTER_SIZE * ARM_CPSR_GREGNUM);
else
- regcache_raw_collect (regcache, ARM_PS_REGNUM,
+ regcache->raw_collect (ARM_PS_REGNUM,
gregs + INT_REGISTER_SIZE * ARM_PC_REGNUM);
}
if (regnum == ARM_PC_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, ARM_PC_REGNUM,
- gregs + INT_REGISTER_SIZE * ARM_PC_REGNUM);
+ regcache->raw_collect (ARM_PC_REGNUM,
+ gregs + INT_REGISTER_SIZE * ARM_PC_REGNUM);
}
/* Support for register format used by the NWFPE FPA emulator. */
gdb_byte reg_tag;
gdb_byte buf[FP_REGISTER_SIZE];
- regcache_raw_collect (regcache, regno, buf);
+ regcache->raw_collect (regno, buf);
/* NOTE drow/2006-06-07: This code uses the tag already in the
register buffer. I've preserved that when moving the code
collect_nwfpe_register (regcache, regno, regs);
if (regnum == ARM_FPS_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, ARM_FPS_REGNUM,
- regs + INT_REGISTER_SIZE * ARM_FPS_REGNUM);
+ regcache->raw_collect (ARM_FPS_REGNUM,
+ regs + INT_REGISTER_SIZE * ARM_FPS_REGNUM);
}
/* Support VFP register format. */
int regno;
if (regnum == ARM_FPSCR_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, ARM_FPSCR_REGNUM, regs + 32 * 8);
+ regcache->raw_collect (ARM_FPSCR_REGNUM, regs + 32 * 8);
for (regno = ARM_D0_REGNUM; regno <= ARM_D31_REGNUM; regno++)
if (regnum == -1 || regnum == regno)
- regcache_raw_collect (regcache, regno,
- regs + (regno - ARM_D0_REGNUM) * 8);
+ regcache->raw_collect (regno, regs + (regno - ARM_D0_REGNUM) * 8);
}
static const struct regset arm_linux_gregset =
switch (regno)
{
case ARM_SP_REGNUM:
- regcache_raw_collect (regcache, ARM_SP_REGNUM,
- (char *) &inferior_registers.r_sp);
+ regcache->raw_collect (ARM_SP_REGNUM, (char *) &inferior_registers.r_sp);
break;
case ARM_LR_REGNUM:
- regcache_raw_collect (regcache, ARM_LR_REGNUM,
- (char *) &inferior_registers.r_lr);
+ regcache->raw_collect (ARM_LR_REGNUM, (char *) &inferior_registers.r_lr);
break;
case ARM_PC_REGNUM:
if (arm_apcs_32)
- regcache_raw_collect (regcache, ARM_PC_REGNUM,
- (char *) &inferior_registers.r_pc);
+ regcache->raw_collect (ARM_PC_REGNUM,
+ (char *) &inferior_registers.r_pc);
else
{
unsigned pc_val;
- regcache_raw_collect (regcache, ARM_PC_REGNUM,
- (char *) &pc_val);
+ regcache->raw_collect (ARM_PC_REGNUM, (char *) &pc_val);
pc_val = gdbarch_addr_bits_remove (gdbarch, pc_val);
inferior_registers.r_pc ^= gdbarch_addr_bits_remove
case ARM_PS_REGNUM:
if (arm_apcs_32)
- regcache_raw_collect (regcache, ARM_PS_REGNUM,
- (char *) &inferior_registers.r_cpsr);
+ regcache->raw_collect (ARM_PS_REGNUM,
+ (char *) &inferior_registers.r_cpsr);
else
{
unsigned psr_val;
- regcache_raw_collect (regcache, ARM_PS_REGNUM,
- (char *) &psr_val);
+ regcache->raw_collect (ARM_PS_REGNUM, (char *) &psr_val);
psr_val ^= gdbarch_addr_bits_remove (gdbarch, psr_val);
inferior_registers.r_pc = gdbarch_addr_bits_remove
break;
default:
- regcache_raw_collect (regcache, regno,
- (char *) &inferior_registers.r[regno]);
+ regcache->raw_collect (regno, (char *) &inferior_registers.r[regno]);
break;
}
for (regno = ARM_A1_REGNUM; regno < ARM_SP_REGNUM; regno++)
- regcache_raw_collect (regcache, regno,
- (char *) &inferior_registers.r[regno]);
+ regcache->raw_collect (regno, (char *) &inferior_registers.r[regno]);
- regcache_raw_collect (regcache, ARM_SP_REGNUM,
- (char *) &inferior_registers.r_sp);
- regcache_raw_collect (regcache, ARM_LR_REGNUM,
- (char *) &inferior_registers.r_lr);
+ regcache->raw_collect (ARM_SP_REGNUM, (char *) &inferior_registers.r_sp);
+ regcache->raw_collect (ARM_LR_REGNUM, (char *) &inferior_registers.r_lr);
if (arm_apcs_32)
{
- regcache_raw_collect (regcache, ARM_PC_REGNUM,
- (char *) &inferior_registers.r_pc);
- regcache_raw_collect (regcache, ARM_PS_REGNUM,
- (char *) &inferior_registers.r_cpsr);
+ regcache->raw_collect (ARM_PC_REGNUM, (char *) &inferior_registers.r_pc);
+ regcache->raw_collect (ARM_PS_REGNUM,
+ (char *) &inferior_registers.r_cpsr);
}
else
{
unsigned pc_val;
unsigned psr_val;
- regcache_raw_collect (regcache, ARM_PC_REGNUM,
- (char *) &pc_val);
- regcache_raw_collect (regcache, ARM_PS_REGNUM,
- (char *) &psr_val);
+ regcache->raw_collect (ARM_PC_REGNUM, (char *) &pc_val);
+ regcache->raw_collect (ARM_PS_REGNUM, (char *) &psr_val);
pc_val = gdbarch_addr_bits_remove (gdbarch, pc_val);
psr_val ^= gdbarch_addr_bits_remove (gdbarch, psr_val);
switch (regno)
{
case ARM_FPS_REGNUM:
- regcache_raw_collect (regcache, ARM_FPS_REGNUM,
- (char *) &inferior_fp_registers.fpr_fpsr);
+ regcache->raw_collect (ARM_FPS_REGNUM,
+ (char *) &inferior_fp_registers.fpr_fpsr);
break;
default:
- regcache_raw_collect (regcache, regno,
- (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
+ regcache->raw_collect
+ (regno, (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
break;
}
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
- regcache_raw_collect (regcache, regno,
- (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
+ regcache->raw_collect
+ (regno, (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
- regcache_raw_collect (regcache, ARM_FPS_REGNUM,
- (char *) &inferior_fp_registers.fpr_fpsr);
+ regcache->raw_collect (ARM_FPS_REGNUM,
+ (char *) &inferior_fp_registers.fpr_fpsr);
ret = ptrace (PT_SETFPREGS, ptid_get_pid (regcache->ptid ()),
(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
{
struct gdbarch *gdbarch = regcache->arch ();
if (regno < gdbarch_fp0_regnum (gdbarch))
- regcache_raw_collect (regcache, regno,
- (char *) &a_tss + regno_mapping[regno].tss_ofs);
+ regcache->raw_collect (regno,
+ (char *) &a_tss + regno_mapping[regno].tss_ofs);
else if (i386_fp_regnum_p (gdbarch, regno) || i386_fpc_regnum_p (gdbarch,
regno))
i387_collect_fsave (regcache, regno, &npx);
tid = get_ptrace_pid (regcache->ptid ());
errno = 0;
- regcache_raw_collect (regcache, regno, &val);
+ regcache->raw_collect (regno, &val);
ptrace (PTRACE_POKEUSER, tid, hppa_linux_register_addr (regno, 0), val);
if (errno != 0)
error (_("Couldn't write register %s (#%d): %s."),
int mregno = greg_map[i];
if (regno == -1 || regno == mregno)
- {
- regcache_raw_collect(regcache, mregno, &(*gregsetp)[i]);
- }
+ regcache->raw_collect (mregno, &(*gregsetp)[i]);
}
}
char *to = (char *) &((*fpregsetp)[(i - HPPA_FP0_REGNUM) / 2]);
if ((i - HPPA_FP0_REGNUM) & 1)
to += 4;
- regcache_raw_collect (regcache, i, to);
+ regcache->raw_collect (i, to);
}
}
for (i = HPPA_R1_REGNUM; i <= HPPA_R31_REGNUM; i++)
{
if (regnum == -1 || regnum == i)
- regcache_raw_collect (regcache, i, regs + i * 4);
+ regcache->raw_collect (i, regs + i * 4);
}
if (regnum == -1 || regnum == HPPA_IPSW_REGNUM)
- regcache_raw_collect (regcache, HPPA_IPSW_REGNUM, regs);
+ regcache->raw_collect (HPPA_IPSW_REGNUM, regs);
if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
+ regcache->raw_collect (HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
+ regcache->raw_collect (HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
- regcache_raw_collect (regcache, HPPA_SAR_REGNUM, regs + 32 * 4);
+ regcache->raw_collect (HPPA_SAR_REGNUM, regs + 32 * 4);
if (regnum == -1 || regnum == HPPA_PCSQ_HEAD_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
+ regcache->raw_collect (HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
if (regnum == -1 || regnum == HPPA_PCSQ_TAIL_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
+ regcache->raw_collect (HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
+ regcache->raw_collect (HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
+ regcache->raw_collect (HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
if (regnum == -1 || regnum == HPPA_IPSW_REGNUM)
- regcache_raw_collect (regcache, HPPA_IPSW_REGNUM, regs);
+ regcache->raw_collect (HPPA_IPSW_REGNUM, regs);
if (regnum == -1 || regnum == HPPA_SR4_REGNUM)
- regcache_raw_collect (regcache, HPPA_SR4_REGNUM, regs + 41 * 4);
+ regcache->raw_collect (HPPA_SR4_REGNUM, regs + 41 * 4);
if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 1)
- regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 1, regs + 37 * 4);
+ regcache->raw_collect (HPPA_SR4_REGNUM + 1, regs + 37 * 4);
if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 2)
- regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 2, regs + 38 * 4);
+ regcache->raw_collect (HPPA_SR4_REGNUM + 2, regs + 38 * 4);
if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 3)
- regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 3, regs + 39 * 4);
+ regcache->raw_collect (HPPA_SR4_REGNUM + 3, regs + 39 * 4);
if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 4)
- regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 4, regs + 40 * 4);
+ regcache->raw_collect (HPPA_SR4_REGNUM + 4, regs + 40 * 4);
}
/* Collect the floating-point registers from REGCACHE and store them
{
if (regnum == -1 || regnum == i || regnum == i + 1)
{
- regcache_raw_collect (regcache, i, regs);
- regcache_raw_collect (regcache, i + 1, regs + 4);
+ regcache->raw_collect (i, regs);
+ regcache->raw_collect (i + 1, regs + 4);
}
}
}
for (i = HPPA_R1_REGNUM; i <= HPPA_R31_REGNUM; i++)
{
if (regnum == -1 || regnum == i)
- regcache_raw_collect (regcache, i, regs + i * 4);
+ regcache->raw_collect (i, regs + i * 4);
}
if (sizeof(struct reg) >= 46 * 4)
{
if (regnum == -1 || regnum == HPPA_IPSW_REGNUM)
- regcache_raw_collect (regcache, HPPA_IPSW_REGNUM, regs);
+ regcache->raw_collect (HPPA_IPSW_REGNUM, regs);
if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
- regcache_raw_collect (regcache, HPPA_SAR_REGNUM, regs + 32 * 4);
+ regcache->raw_collect (HPPA_SAR_REGNUM, regs + 32 * 4);
if (regnum == -1 || regnum == HPPA_PCSQ_HEAD_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
+ regcache->raw_collect (HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
if (regnum == -1 || regnum == HPPA_PCSQ_TAIL_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
+ regcache->raw_collect (HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
+ regcache->raw_collect (HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
+ regcache->raw_collect (HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
if (regnum == -1 || regnum == HPPA_SR0_REGNUM)
- regcache_raw_collect (regcache, HPPA_SR0_REGNUM, regs + 37 * 4);
+ regcache->raw_collect (HPPA_SR0_REGNUM, regs + 37 * 4);
if (regnum == -1 || regnum == HPPA_SR1_REGNUM)
- regcache_raw_collect (regcache, HPPA_SR1_REGNUM, regs + 38 * 4);
+ regcache->raw_collect (HPPA_SR1_REGNUM, regs + 38 * 4);
if (regnum == -1 || regnum == HPPA_SR2_REGNUM)
- regcache_raw_collect (regcache, HPPA_SR2_REGNUM, regs + 39 * 4);
+ regcache->raw_collect (HPPA_SR2_REGNUM, regs + 39 * 4);
if (regnum == -1 || regnum == HPPA_SR3_REGNUM)
- regcache_raw_collect (regcache, HPPA_SR3_REGNUM, regs + 40 * 4);
+ regcache->raw_collect (HPPA_SR3_REGNUM, regs + 40 * 4);
if (regnum == -1 || regnum == HPPA_SR4_REGNUM)
- regcache_raw_collect (regcache, HPPA_SR4_REGNUM, regs + 41 * 4);
+ regcache->raw_collect (HPPA_SR4_REGNUM, regs + 41 * 4);
if (regnum == -1 || regnum == HPPA_SR5_REGNUM)
- regcache_raw_collect (regcache, HPPA_SR5_REGNUM, regs + 42 * 4);
+ regcache->raw_collect (HPPA_SR5_REGNUM, regs + 42 * 4);
if (regnum == -1 || regnum == HPPA_SR6_REGNUM)
- regcache_raw_collect (regcache, HPPA_SR6_REGNUM, regs + 43 * 4);
+ regcache->raw_collect (HPPA_SR6_REGNUM, regs + 43 * 4);
if (regnum == -1 || regnum == HPPA_SR7_REGNUM)
- regcache_raw_collect (regcache, HPPA_SR7_REGNUM, regs + 44 * 4);
+ regcache->raw_collect (HPPA_SR7_REGNUM, regs + 44 * 4);
if (regnum == -1 || regnum == HPPA_CR26_REGNUM)
- regcache_raw_collect (regcache, HPPA_CR26_REGNUM, regs + 45 * 4);
+ regcache->raw_collect (HPPA_CR26_REGNUM, regs + 45 * 4);
if (regnum == -1 || regnum == HPPA_CR27_REGNUM)
- regcache_raw_collect (regcache, HPPA_CR27_REGNUM, regs + 46 * 4);
+ regcache->raw_collect (HPPA_CR27_REGNUM, regs + 46 * 4);
}
else
{
if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
- regcache_raw_collect (regcache, HPPA_SAR_REGNUM, regs);
+ regcache->raw_collect (HPPA_SAR_REGNUM, regs);
if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4);
+ regcache->raw_collect (HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4);
if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4);
+ regcache->raw_collect (HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4);
}
}
{
if (regnum == -1 || regnum == i || regnum == i + 1)
{
- regcache_raw_collect (regcache, i, regs);
- regcache_raw_collect (regcache, i + 1, regs + 4);
+ regcache->raw_collect (i, regs);
+ regcache->raw_collect (i + 1, regs + 4);
}
}
}
int offset = i386bsd_r_reg_offset[i];
if (offset != -1)
- regcache_raw_collect (regcache, i, regs + offset);
+ regcache->raw_collect (i, regs + offset);
}
}
}
for (i = 0; i < I386_NUM_GREGS; i++)
if (regno == -1 || regno == i)
- regcache_raw_collect
- (regcache, i,
- (char *)&gp_regs + i386_darwin_thread_state_reg_offset[i]);
+ regcache->raw_collect
+ (i, (char *) &gp_regs + i386_darwin_thread_state_reg_offset[i]);
ret = thread_set_state (current_thread, x86_THREAD_STATE32,
(thread_state_t) &gp_regs,
for (i = 0; i < I386_NUM_GREGS; i++)
if (REG_VALID == regcache->get_register_status (i))
- regcache_raw_collect (regcache, i, REG_ADDR (state, i));
+ regcache->raw_collect (i, REG_ADDR (state, i));
}
else
{
gdbarch_register_name (gdbarch, regno));
gdb_assert (REG_VALID == regcache->get_register_status (regno));
- regcache_raw_collect (regcache, regno, REG_ADDR (state, regno));
+ regcache->raw_collect (regno, REG_ADDR (state, regno));
}
/* Restore the T bit. */
tid = get_ptrace_pid (regcache->ptid ());
errno = 0;
- regcache_raw_collect (regcache, regno, &val);
+ regcache->raw_collect (regno, &val);
ptrace (PTRACE_POKEUSER, tid,
i386_linux_gregset_reg_offset[regno], val);
if (errno != 0)
for (i = 0; i < I386_NUM_GREGS; i++)
if (regno == -1 || regno == i)
- regcache_raw_collect (regcache, i,
- regp + i386_linux_gregset_reg_offset[i]);
+ regcache->raw_collect (i, regp + i386_linux_gregset_reg_offset[i]);
if ((regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM)
&& I386_LINUX_ORIG_EAX_REGNUM
< gdbarch_num_regs (regcache->arch ()))
- regcache_raw_collect (regcache, I386_LINUX_ORIG_EAX_REGNUM, regp
- + i386_linux_gregset_reg_offset[I386_LINUX_ORIG_EAX_REGNUM]);
+ regcache->raw_collect
+ (I386_LINUX_ORIG_EAX_REGNUM,
+ regp + i386_linux_gregset_reg_offset[I386_LINUX_ORIG_EAX_REGNUM]);
}
#ifdef HAVE_PTRACE_GETREGS
{
int offset = nto_reg_offset (regno);
if (offset != -1)
- regcache_raw_collect (regcache, regno, data + offset);
+ regcache->raw_collect (regno, data + offset);
}
}
else if (regset == NTO_REG_FLOAT)
/* Calculate the stack pointer (frame pointer) that will be
stored into the thread structure. */
offset = i386obsd_uthread_reg_offset[I386_EIP_REGNUM] + 4;
- regcache_raw_collect (regcache, I386_ESP_REGNUM, buf);
+ regcache->raw_collect (I386_ESP_REGNUM, buf);
sp = extract_unsigned_integer (buf, 4, byte_order) - offset;
/* Store the stack pointer. */
sp = read_memory_unsigned_integer (sp_addr, 4, byte_order);
/* Write the register into the stack frame. */
- regcache_raw_collect (regcache, i, buf);
+ regcache->raw_collect (i, buf);
write_memory (sp + i386obsd_uthread_reg_offset[i], buf, 4);
}
}
{
if ((regnum == i || regnum == -1)
&& tdep->gregset_reg_offset[i] != -1)
- regcache_raw_collect (regcache, i, regs + tdep->gregset_reg_offset[i]);
+ regcache->raw_collect (i, regs + tdep->gregset_reg_offset[i]);
}
}
for (i = 0; i < I386_NUM_GREGS; i++)
if (regnum == -1 || regnum == i)
- regcache_raw_collect (regcache, i, regp + regmap[i]);
+ regcache->raw_collect (i, regp + regmap[i]);
}
#endif /* HAVE_GREGSET_T */
{
gdb_byte buf[4];
- regcache_raw_collect (regcache, i, buf);
+ regcache->raw_collect (i, buf);
if (i == I387_FOP_REGNUM (tdep))
{
memcpy (FSAVE_ADDR (tdep, regs, i), buf, 2);
}
else
- regcache_raw_collect (regcache, i, FSAVE_ADDR (tdep, regs, i));
+ regcache->raw_collect (i, FSAVE_ADDR (tdep, regs, i));
}
}
\f
{
gdb_byte buf[4];
- regcache_raw_collect (regcache, i, buf);
+ regcache->raw_collect (i, buf);
if (i == I387_FOP_REGNUM (tdep))
{
memcpy (FXSAVE_ADDR (tdep, regs, i), buf, 2);
}
else
- regcache_raw_collect (regcache, i, FXSAVE_ADDR (tdep, regs, i));
+ regcache->raw_collect (i, FXSAVE_ADDR (tdep, regs, i));
}
if (regnum == I387_MXCSR_REGNUM (tdep) || regnum == -1)
- regcache_raw_collect (regcache, I387_MXCSR_REGNUM (tdep),
+ regcache->raw_collect (I387_MXCSR_REGNUM (tdep),
FXSAVE_MXCSR_ADDR (regs));
}
for (i = I387_PKRU_REGNUM (tdep);
i < I387_PKEYSEND_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = XSAVE_PKEYS_ADDR (tdep, regs, i);
if (memcmp (raw, p, 4) != 0)
{
for (i = I387_ZMM0H_REGNUM (tdep);
i < I387_ZMMENDH_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = XSAVE_AVX512_ZMM_H_ADDR (tdep, regs, i);
if (memcmp (raw, p, 32) != 0)
{
for (i = I387_K0_REGNUM (tdep);
i < I387_KEND_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = XSAVE_AVX512_K_ADDR (tdep, regs, i);
if (memcmp (raw, p, 8) != 0)
{
for (i = I387_YMM16H_REGNUM (tdep);
i < I387_YMMH_AVX512_END_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = XSAVE_YMM_AVX512_ADDR (tdep, regs, i);
if (memcmp (raw, p, 16) != 0)
{
for (i = I387_XMM16_REGNUM (tdep);
i < I387_XMM_AVX512_END_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = XSAVE_XMM_AVX512_ADDR (tdep, regs, i);
if (memcmp (raw, p, 16) != 0)
{
for (i = I387_BND0R_REGNUM (tdep);
i < I387_BNDCFGU_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = XSAVE_MPX_ADDR (tdep, regs, i);
if (memcmp (raw, p, 16))
{
for (i = I387_BNDCFGU_REGNUM (tdep);
i < I387_MPXEND_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = XSAVE_MPX_ADDR (tdep, regs, i);
if (memcmp (raw, p, 8))
{
for (i = I387_YMM0H_REGNUM (tdep);
i < I387_YMMENDH_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = XSAVE_AVXH_ADDR (tdep, regs, i);
if (memcmp (raw, p, 16))
{
for (i = I387_XMM0_REGNUM (tdep);
i < I387_MXCSR_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = FXSAVE_ADDR (tdep, regs, i);
if (memcmp (raw, p, 16))
{
if ((tdep->xcr0 & X86_XSTATE_AVX) || (tdep->xcr0 & X86_XSTATE_SSE))
{
i = I387_MXCSR_REGNUM (tdep);
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = FXSAVE_MXCSR_ADDR (regs);
if (memcmp (raw, p, 4))
{
for (i = I387_ST0_REGNUM (tdep);
i < I387_FCTRL_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = FXSAVE_ADDR (tdep, regs, i);
if (memcmp (raw, p, 10))
{
else
{
/* Check if REGNUM is changed. */
- regcache_raw_collect (regcache, regnum, raw);
+ regcache->raw_collect (regnum, raw);
switch (regclass)
{
case mpx:
if (regnum < I387_BNDCFGU_REGNUM (tdep))
{
- regcache_raw_collect (regcache, regnum, raw);
+ regcache->raw_collect (regnum, raw);
p = XSAVE_MPX_ADDR (tdep, regs, regnum);
if (memcmp (raw, p, 16))
{
{
gdb_byte buf[4];
- regcache_raw_collect (regcache, i, buf);
+ regcache->raw_collect (i, buf);
if (i == I387_FOP_REGNUM (tdep))
{
{
int regsize;
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
regsize = regcache_register_size (regcache, i);
p = FXSAVE_ADDR (tdep, regs, i);
if (memcmp (raw, p, regsize))
#define COPY_REG(_idx_,_regi_) \
if ((regno == -1) || regno == _regi_) \
- regcache_raw_collect (regcache, _regi_, regp + _idx_)
+ regcache->raw_collect (_regi_, regp + _idx_)
for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++)
{
for (regi = IA64_FR0_REGNUM; regi <= IA64_FR127_REGNUM; regi++)
{
if ((regno == -1) || (regno == regi))
- regcache_raw_collect (regcache, regi,
- &((*fpregsetp)[regi - IA64_FR0_REGNUM]));
+ regcache->raw_collect (regi, &((*fpregsetp)[regi - IA64_FR0_REGNUM]));
}
}
buf = (PTRACE_TYPE_RET *) alloca (size);
/* Write the register contents into the inferior a chunk at a time. */
- regcache_raw_collect (regcache, regnum, buf);
+ regcache->raw_collect (regnum, buf);
for (i = 0; i < size / sizeof (PTRACE_TYPE_RET); i++)
{
errno = 0;
buf = (gdb_byte *) alloca (size);
/* Write the register contents into the inferior a chunk at a time. */
- regcache_raw_collect (regcache, regnum, buf);
+ regcache->raw_collect (regnum, buf);
for (i = 0; i < size; i += sizeof (PTRACE_TYPE_RET))
{
size_t chunk = std::min (sizeof (PTRACE_TYPE_RET), size - i);
continue;
if (i != M32R_SP_REGNUM)
- regcache_raw_collect (regcache, i, regp + regmap[i]);
+ regcache->raw_collect (i, regp + regmap[i]);
else if (psw & 0x8000)
- regcache_raw_collect (regcache, i, regp + SPU_REGMAP);
+ regcache->raw_collect (i, regp + SPU_REGMAP);
else
- regcache_raw_collect (regcache, i, regp + SPI_REGMAP);
+ regcache->raw_collect (i, regp + SPI_REGMAP);
}
}
ULONGEST psw;
gdb_byte buf[4];
- regcache_raw_collect (regcache, PSW_REGNUM, buf);
+ regcache->raw_collect (PSW_REGNUM, buf);
psw = extract_unsigned_integer (buf, 4, byte_order);
for (i = 0; i < ARRAY_SIZE (m32r_pt_regs_offset); i++)
case CBR_REGNUM:
break;
case M32R_SP_REGNUM:
- regcache_raw_collect (regcache, i, regs
- + ((psw & 0x80) ? SPU_OFFSET : SPI_OFFSET));
+ regcache->raw_collect
+ (i, regs + ((psw & 0x80) ? SPU_OFFSET : SPI_OFFSET));
break;
default:
- regcache_raw_collect (regcache, i,
- regs + m32r_pt_regs_offset[i]);
+ regcache->raw_collect (i, regs + m32r_pt_regs_offset[i]);
}
}
}
for (i = M68K_D0_REGNUM; i <= M68K_PC_REGNUM; i++)
{
if (regnum == -1 || regnum == i)
- regcache_raw_collect (regcache, i, regs + i * 4);
+ regcache->raw_collect (i, regs + i * 4);
}
}
for (i = M68K_FP0_REGNUM; i <= M68K_FPI_REGNUM; i++)
{
if (regnum == -1 || regnum == i)
- regcache_raw_collect (regcache, i,
- regs + m68kbsd_fpreg_offset (gdbarch, i));
+ regcache->raw_collect (i, regs + m68kbsd_fpreg_offset (gdbarch, i));
}
}
\f
regaddr = 4 * regmap[regno];
/* Put the contents of regno into a local buffer. */
- regcache_raw_collect (regcache, regno, buf);
+ regcache->raw_collect (regno, buf);
/* Store the local buffer into the inferior a chunk at the time. */
for (i = 0; i < register_size (gdbarch, regno); i += sizeof (long))
for (i = 0; i < NUM_GREGS; i++)
if (regno == -1 || regno == i)
- regcache_raw_collect (regcache, i, regp + regmap[i]);
+ regcache->raw_collect (i, regp + regmap[i]);
}
#ifdef HAVE_PTRACE_GETREGS
for (i = gdbarch_fp0_regnum (gdbarch);
i < gdbarch_fp0_regnum (gdbarch) + 8; i++)
if (regno == -1 || regno == i)
- regcache_raw_collect (regcache, i,
- FPREG_ADDR (fpregsetp,
- i - gdbarch_fp0_regnum (gdbarch)));
+ regcache->raw_collect
+ (i, FPREG_ADDR (fpregsetp, i - gdbarch_fp0_regnum (gdbarch)));
/* Fill in the floating-point control registers. */
for (i = M68K_FPC_REGNUM; i <= M68K_FPI_REGNUM; i++)
if (regno == -1 || regno == i)
- regcache_raw_collect (regcache, i,
- &fpregsetp->fpcntl[i - M68K_FPC_REGNUM]);
+ regcache->raw_collect (i, &fpregsetp->fpcntl[i - M68K_FPC_REGNUM]);
}
#ifdef HAVE_PTRACE_GETREGS
if (regno > 0 && regno < 32)
{
dst = regp + regno + EF_REG0;
- regcache_raw_collect (regcache, regno, dst);
+ regcache->raw_collect (regno, dst);
return;
}
if (regaddr != -1)
{
dst = regp + regaddr;
- regcache_raw_collect (regcache, regno, dst);
+ regcache->raw_collect (regno, dst);
}
}
to = (gdb_byte *) (*fpregsetp + (regi & ~1));
if ((gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) != (regi & 1))
to += 4;
- regcache_raw_collect (regcache, regno, to);
+ regcache->raw_collect (regno, to);
}
else
{
to = (gdb_byte *) (*fpregsetp + regno
- gdbarch_fp0_regnum (gdbarch));
- regcache_raw_collect (regcache, regno, to);
+ regcache->raw_collect (regno, to);
}
}
else if (regno == mips_regnum (gdbarch)->fp_control_status)
for (i = 0; i <= gdbarch_pc_regnum (gdbarch); i++)
if ((regno == i || regno == -1)
&& ! gdbarch_cannot_store_register (gdbarch, i))
- regcache_raw_collect (regcache, i,
- regs + (i * mips_isa_regsize (gdbarch)));
+ regcache->raw_collect (i, regs + (i * mips_isa_regsize (gdbarch)));
}
void
i++)
if ((regno == i || regno == -1)
&& ! gdbarch_cannot_store_register (gdbarch, i))
- regcache_raw_collect (regcache, i,
- fpregs + ((i - gdbarch_fp0_regnum (gdbarch))
- * mips_isa_regsize (gdbarch)));
+ regcache->raw_collect
+ (i, (fpregs + ((i - gdbarch_fp0_regnum (gdbarch))
+ * mips_isa_regsize (gdbarch))));
}
#if 0
for (i = MIPS_ZERO_REGNUM; i <= MIPS_PC_REGNUM; i++)
{
if (regnum == -1 || regnum == i)
- regcache_raw_collect (regcache, i, regs + i * 8);
+ regcache->raw_collect (i, regs + i * 8);
}
for (i = MIPS_FP0_REGNUM; i <= MIPS_FSR_REGNUM; i++)
{
if (regnum == -1 || regnum == i)
- regcache_raw_collect (regcache, i, regs + (i + 2) * 8);
+ regcache->raw_collect (i, regs + (i + 2) * 8);
}
}
\f
switch (regnum) {
case E_D0_REGNUM:
- regcache_raw_collect (regcache, E_D0_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D0));
+ regcache->raw_collect (E_D0_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D0));
break;
case E_D1_REGNUM:
- regcache_raw_collect (regcache, E_D1_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D1));
+ regcache->raw_collect (E_D1_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D1));
break;
case E_D2_REGNUM:
- regcache_raw_collect (regcache, E_D2_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D2));
+ regcache->raw_collect (E_D2_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D2));
break;
case E_D3_REGNUM:
- regcache_raw_collect (regcache, E_D3_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D3));
+ regcache->raw_collect (E_D3_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D3));
break;
case E_A0_REGNUM:
- regcache_raw_collect (regcache, E_A0_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A0));
+ regcache->raw_collect (E_A0_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A0));
break;
case E_A1_REGNUM:
- regcache_raw_collect (regcache, E_A1_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A1));
+ regcache->raw_collect (E_A1_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A1));
break;
case E_A2_REGNUM:
- regcache_raw_collect (regcache, E_A2_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A2));
+ regcache->raw_collect (E_A2_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A2));
break;
case E_A3_REGNUM:
- regcache_raw_collect (regcache, E_A3_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A3));
+ regcache->raw_collect (E_A3_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A3));
break;
case E_SP_REGNUM:
- regcache_raw_collect (regcache, E_SP_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_SP));
+ regcache->raw_collect (E_SP_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_SP));
break;
case E_PC_REGNUM:
- regcache_raw_collect (regcache, E_PC_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_PC));
+ regcache->raw_collect (E_PC_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_PC));
break;
case E_MDR_REGNUM:
- regcache_raw_collect (regcache, E_MDR_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDR));
+ regcache->raw_collect (E_MDR_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDR));
break;
case E_PSW_REGNUM:
- regcache_raw_collect (regcache, E_PSW_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_EPSW));
+ regcache->raw_collect (E_PSW_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_EPSW));
break;
case E_LIR_REGNUM:
- regcache_raw_collect (regcache, E_LIR_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LIR));
+ regcache->raw_collect (E_LIR_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LIR));
break;
case E_LAR_REGNUM:
- regcache_raw_collect (regcache, E_LAR_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LAR));
+ regcache->raw_collect (E_LAR_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LAR));
break;
case E_MDRQ_REGNUM:
- regcache_raw_collect (regcache, E_MDRQ_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDRQ));
+ regcache->raw_collect (E_MDRQ_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDRQ));
break;
case E_E0_REGNUM:
- regcache_raw_collect (regcache, E_E0_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E0));
+ regcache->raw_collect (E_E0_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E0));
break;
case E_E1_REGNUM:
- regcache_raw_collect (regcache, E_E1_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E1));
+ regcache->raw_collect (E_E1_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E1));
break;
case E_E2_REGNUM:
- regcache_raw_collect (regcache, E_E2_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E2));
+ regcache->raw_collect (E_E2_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E2));
break;
case E_E3_REGNUM:
- regcache_raw_collect (regcache, E_E3_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E3));
+ regcache->raw_collect (E_E3_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E3));
break;
case E_E4_REGNUM:
- regcache_raw_collect (regcache, E_E4_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E4));
+ regcache->raw_collect (E_E4_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E4));
break;
case E_E5_REGNUM:
- regcache_raw_collect (regcache, E_E5_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E5));
+ regcache->raw_collect (E_E5_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E5));
break;
case E_E6_REGNUM:
- regcache_raw_collect (regcache, E_E6_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E6));
+ regcache->raw_collect (E_E6_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E6));
break;
case E_E7_REGNUM:
- regcache_raw_collect (regcache, E_E7_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E7));
+ regcache->raw_collect (E_E7_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E7));
break;
/* ssp, msp, and usp are inaccessible. */
/* The gregset struct has noplace to put this: do nothing. */
break;
case E_MCRH_REGNUM:
- regcache_raw_collect (regcache, E_MCRH_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRH));
+ regcache->raw_collect (E_MCRH_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRH));
break;
case E_MCRL_REGNUM:
- regcache_raw_collect (regcache, E_MCRL_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRL));
+ regcache->raw_collect (E_MCRL_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRL));
break;
case E_MCVF_REGNUM:
- regcache_raw_collect (regcache, E_MCVF_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCVF));
+ regcache->raw_collect (E_MCVF_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCVF));
break;
case E_FPCR_REGNUM:
/* FPCR is numbered among the GP regs, but handled as an FP reg.
E_FPCR_REGNUM, fpregs, len);
}
else if (regnum == E_FPCR_REGNUM)
- regcache_raw_collect (regcache, E_FPCR_REGNUM,
- &fpregset->fpcr);
+ regcache->raw_collect (E_FPCR_REGNUM, &fpregset->fpcr);
else if (E_FS0_REGNUM <= regnum
&& regnum < E_FS0_REGNUM + MN10300_ELF_NFPREG)
- regcache_raw_collect (regcache, regnum,
- &fpregset->fpregs[regnum - E_FS0_REGNUM]);
+ regcache->raw_collect (regnum, &fpregset->fpregs[regnum - E_FS0_REGNUM]);
return;
}
if (regnum == -1 || regnum == regno)
{
if (reg_offsets[regno] != -1)
- regcache_raw_collect (regcache, regno,
- gregs + 4 * reg_offsets[regno]);
+ regcache->raw_collect (regno, gregs + 4 * reg_offsets[regno]);
}
}
if (len < 1)
return;
- regcache_raw_collect (regcache, regno, (char *) ® + off);
+ regcache->raw_collect (regno, (char *) ® + off);
err = devctl (ctl_fd, dev_set, ®, regsize, 0);
if (err != EOK)
int i;
for (i = 0; i < ppc_num_gprs; i++)
- regcache_raw_collect (regcache,
- tdep->ppc_ev0_upper_regnum + i,
- &evrregs.evr[i]);
+ regcache->raw_collect (tdep->ppc_ev0_upper_regnum + i,
+ &evrregs.evr[i]);
}
else if (tdep->ppc_ev0_upper_regnum <= regno
&& regno < tdep->ppc_ev0_upper_regnum + ppc_num_gprs)
- regcache_raw_collect (regcache, regno,
- &evrregs.evr[regno - tdep->ppc_ev0_upper_regnum]);
+ regcache->raw_collect (regno,
+ &evrregs.evr[regno - tdep->ppc_ev0_upper_regnum]);
if (regno == -1
|| regno == tdep->ppc_acc_regnum)
- regcache_raw_collect (regcache,
- tdep->ppc_acc_regnum,
- &evrregs.acc);
+ regcache->raw_collect (tdep->ppc_acc_regnum,
+ &evrregs.acc);
if (regno == -1
|| regno == tdep->ppc_spefscr_regnum)
- regcache_raw_collect (regcache,
- tdep->ppc_spefscr_regnum,
- &evrregs.spefscr);
+ regcache->raw_collect (tdep->ppc_spefscr_regnum,
+ &evrregs.spefscr);
/* Write back the modified register set. */
set_spe_registers (tid, &evrregs);
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE)
{
/* Little-endian values always sit at the left end of the buffer. */
- regcache_raw_collect (regcache, regno, buf);
+ regcache->raw_collect (regno, buf);
}
else if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
{
/* Big-endian values sit at the right end of the buffer. */
size_t padding = (bytes_to_transfer - register_size (gdbarch, regno));
- regcache_raw_collect (regcache, regno, buf + padding);
+ regcache->raw_collect (regno, buf + padding);
}
for (i = 0; i < bytes_to_transfer; i += sizeof (long))
else
return;
- regcache_raw_collect (regcache, regnum, buf);
+ regcache->raw_collect (regnum, buf);
write_memory (register_address,
buf,
buf_size);
m_register_status[regnum] = REG_VALID;
}
-/* Collect register REGNUM from REGCACHE and store its contents in BUF. */
-
-void
-regcache_raw_collect (const struct regcache *regcache, int regnum, void *buf)
-{
- gdb_assert (regcache != NULL && buf != NULL);
- regcache->raw_collect (regnum, buf);
-}
-
void
regcache::raw_collect (int regnum, void *buf) const
{
/* For regcache_read_pc see common/common-regcache.h. */
extern void regcache_write_pc (struct regcache *regcache, CORE_ADDR pc);
-/* Transfer a raw register [0..NUM_REGS) between the regcache and the
- target. These functions are called by the target in response to a
- target_fetch_registers() or target_store_registers(). */
-
-extern void regcache_raw_collect (const struct regcache *regcache,
- int regnum, void *buf);
-
/* Mapping between register numbers and offsets in a buffer, for use
in the '*regset' functions below. In an array of
'regcache_map_entry' each element is interpreted like follows:
void raw_update (int regnum) override;
+ /* Collect register REGNUM from REGCACHE and store its contents in BUF. */
void raw_collect (int regnum, void *buf) const;
void raw_collect_integer (int regnum, gdb_byte *addr, int addr_len,
xsnprintf (buf, get_remote_packet_size (), "P%s=", phex_nz (reg->pnum, 0));
p = buf + strlen (buf);
- regcache_raw_collect (regcache, reg->regnum, regp);
+ regcache->raw_collect (reg->regnum, regp);
bin2hex (regp, p, register_size (gdbarch, reg->regnum));
putpkt (rs->buf);
getpkt (&rs->buf, &rs->buf_size, 0);
struct packet_reg *r = &rsa->regs[i];
if (r->in_g_packet)
- regcache_raw_collect (regcache, r->regnum, regs + r->offset);
+ regcache->raw_collect (r->regnum, regs + r->offset);
}
}
pid_t pid = ptid_get_pid (regcache->ptid ());
/* Fetch the register's value from the register cache. */
- regcache_raw_collect (regcache, regno, addr);
+ regcache->raw_collect (regno, addr);
/* -1 can be a successful return value, so infer errors from errno. */
errno = 0;
regsize - gdb_regsize);
}
}
- regcache_raw_collect (regcache, regnum, regs + offset);
+ regcache->raw_collect (regnum, regs + offset);
}
}
if (regno == -1 || regno == S390_PSWM_REGNUM)
{
pswm &= 0x80000000;
- regcache_raw_collect (regcache, S390_PSWM_REGNUM, buf);
+ regcache->raw_collect (S390_PSWM_REGNUM, buf);
pswm |= (extract_unsigned_integer (buf, 4, byte_order)
& 0xfff7ffff) << 32;
}
if (regno == -1 || regno == S390_PSWA_REGNUM)
{
- regcache_raw_collect (regcache, S390_PSWA_REGNUM, buf);
+ regcache->raw_collect (S390_PSWA_REGNUM, buf);
pswa = extract_unsigned_integer (buf, 4, byte_order);
pswm ^= (pswm ^ pswa) & 0x80000000;
pswa &= 0x7fffffff;
{
if ((regnum == -1 || regnum == regmap[i].regnum)
&& regmap[i].offset + 4 <= len)
- regcache_raw_collect (regcache, regmap[i].regnum,
+ regcache->raw_collect (regmap[i].regnum,
(char *)regs + regmap[i].offset);
}
}
{
CORE_ADDR fp_addr = addr + SPARC32OBSD_UTHREAD_FP_OFFSET;
- regcache_raw_collect (regcache, SPARC_SP_REGNUM, buf);
+ regcache->raw_collect (SPARC_SP_REGNUM, buf);
write_memory (fp_addr,buf, 4);
}
{
CORE_ADDR i7, i7_addr = addr + SPARC32OBSD_UTHREAD_PC_OFFSET;
- regcache_raw_collect (regcache, SPARC32_PC_REGNUM, buf);
+ regcache->raw_collect (SPARC32_PC_REGNUM, buf);
i7 = extract_unsigned_integer (buf, 4, byte_order) - 8;
write_memory_unsigned_integer (i7_addr, 4, byte_order, i7);
return;
}
- regcache_raw_collect (regcache, SPARC_SP_REGNUM, buf);
+ regcache->raw_collect (SPARC_SP_REGNUM, buf);
sp = extract_unsigned_integer (buf, 4, byte_order);
sparc_collect_rwindow (regcache, sp, regnum);
}
else
return;
- regcache_raw_collect (regcache, regnum, buf);
+ regcache->raw_collect (regnum, buf);
write_memory (register_address,
buf,
buf_size);
{
if (regnum == -1 || regnum == SPARC_SP_REGNUM || regnum == i)
{
- regcache_raw_collect (regcache, i, buf);
+ regcache->raw_collect (i, buf);
/* Handle StackGhost. */
if (i == SPARC_I7_REGNUM)
{
if (regnum == -1 || regnum == SPARC_SP_REGNUM || regnum == i)
{
- regcache_raw_collect (regcache, i, buf);
+ regcache->raw_collect (i, buf);
/* Handle StackGhost. */
if (i == SPARC_I7_REGNUM)
int i;
if (regnum == SPARC32_PSR_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC32_PSR_REGNUM,
- regs + gregmap->r_psr_offset);
+ regcache->raw_collect (SPARC32_PSR_REGNUM, regs + gregmap->r_psr_offset);
if (regnum == SPARC32_PC_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC32_PC_REGNUM,
- regs + gregmap->r_pc_offset);
+ regcache->raw_collect (SPARC32_PC_REGNUM, regs + gregmap->r_pc_offset);
if (regnum == SPARC32_NPC_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC32_NPC_REGNUM,
- regs + gregmap->r_npc_offset);
+ regcache->raw_collect (SPARC32_NPC_REGNUM, regs + gregmap->r_npc_offset);
if (regnum == SPARC32_Y_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC32_Y_REGNUM,
- regs + gregmap->r_y_offset);
+ regcache->raw_collect (SPARC32_Y_REGNUM, regs + gregmap->r_y_offset);
if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_O7_REGNUM) || regnum == -1)
{
for (i = SPARC_G1_REGNUM; i <= SPARC_O7_REGNUM; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_collect (regcache, i, regs + offset);
+ regcache->raw_collect (i, regs + offset);
offset += 4;
}
}
for (i = SPARC_L0_REGNUM; i <= SPARC_I7_REGNUM; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_collect (regcache, i, regs + offset);
+ regcache->raw_collect (i, regs + offset);
offset += 4;
}
}
for (i = 0; i < 32; i++)
{
if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1)
- regcache_raw_collect (regcache, SPARC_F0_REGNUM + i,
- regs + fpregmap->r_f0_offset + (i * 4));
+ regcache->raw_collect (SPARC_F0_REGNUM + i,
+ regs + fpregmap->r_f0_offset + (i * 4));
}
if (regnum == SPARC32_FSR_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC32_FSR_REGNUM,
- regs + fpregmap->r_fsr_offset);
+ regcache->raw_collect (SPARC32_FSR_REGNUM,
+ regs + fpregmap->r_fsr_offset);
}
\f
{
CORE_ADDR fp_addr = addr + SPARC64OBSD_UTHREAD_FP_OFFSET;
- regcache_raw_collect (regcache, SPARC_SP_REGNUM, buf);
+ regcache->raw_collect (SPARC_SP_REGNUM, buf);
write_memory (fp_addr,buf, 8);
}
{
CORE_ADDR i7, i7_addr = addr + SPARC64OBSD_UTHREAD_PC_OFFSET;
- regcache_raw_collect (regcache, SPARC64_PC_REGNUM, buf);
+ regcache->raw_collect (SPARC64_PC_REGNUM, buf);
i7 = extract_unsigned_integer (buf, 8, byte_order) - 8;
write_memory_unsigned_integer (i7_addr, 8, byte_order, i7);
return;
}
- regcache_raw_collect (regcache, SPARC_SP_REGNUM, buf);
+ regcache->raw_collect (SPARC_SP_REGNUM, buf);
sp = extract_unsigned_integer (buf, 8, byte_order);
sparc_collect_rwindow (regcache, sp, regnum);
}
gdb_byte buf[8];
tstate = extract_unsigned_integer (regs + offset, 8, byte_order);
- regcache_raw_collect (regcache, SPARC32_PSR_REGNUM, buf);
+ regcache->raw_collect (SPARC32_PSR_REGNUM, buf);
psr = extract_unsigned_integer (buf, 4, byte_order);
tstate |= (psr & PSR_ICC) << 12;
if ((psr & (PSR_VERS | PSR_IMPL)) == PSR_V8PLUS)
}
if (regnum == SPARC32_PC_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC32_PC_REGNUM,
- regs + gregmap->r_pc_offset + 4);
+ regcache->raw_collect (SPARC32_PC_REGNUM,
+ regs + gregmap->r_pc_offset + 4);
if (regnum == SPARC32_NPC_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC32_NPC_REGNUM,
- regs + gregmap->r_npc_offset + 4);
+ regcache->raw_collect (SPARC32_NPC_REGNUM,
+ regs + gregmap->r_npc_offset + 4);
if (regnum == SPARC32_Y_REGNUM || regnum == -1)
{
int offset = gregmap->r_y_offset + 8 - gregmap->r_y_size;
- regcache_raw_collect (regcache, SPARC32_Y_REGNUM, regs + offset);
+ regcache->raw_collect (SPARC32_Y_REGNUM, regs + offset);
}
}
else
{
if (regnum == SPARC64_STATE_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC64_STATE_REGNUM,
- regs + gregmap->r_tstate_offset);
+ regcache->raw_collect (SPARC64_STATE_REGNUM,
+ regs + gregmap->r_tstate_offset);
if (regnum == SPARC64_PC_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC64_PC_REGNUM,
- regs + gregmap->r_pc_offset);
+ regcache->raw_collect (SPARC64_PC_REGNUM,
+ regs + gregmap->r_pc_offset);
if (regnum == SPARC64_NPC_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC64_NPC_REGNUM,
- regs + gregmap->r_npc_offset);
+ regcache->raw_collect (SPARC64_NPC_REGNUM,
+ regs + gregmap->r_npc_offset);
if (regnum == SPARC64_Y_REGNUM || regnum == -1)
{
gdb_byte buf[8];
- regcache_raw_collect (regcache, SPARC64_Y_REGNUM, buf);
+ regcache->raw_collect (SPARC64_Y_REGNUM, buf);
memcpy (regs + gregmap->r_y_offset,
buf + 8 - gregmap->r_y_size, gregmap->r_y_size);
}
if ((regnum == SPARC64_FPRS_REGNUM || regnum == -1)
&& gregmap->r_fprs_offset != -1)
- regcache_raw_collect (regcache, SPARC64_FPRS_REGNUM,
- regs + gregmap->r_fprs_offset);
+ regcache->raw_collect (SPARC64_FPRS_REGNUM,
+ regs + gregmap->r_fprs_offset);
}
for (i = SPARC_G1_REGNUM; i <= SPARC_O7_REGNUM; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_collect (regcache, i, regs + offset);
+ regcache->raw_collect (i, regs + offset);
offset += 8;
}
}
for (i = SPARC_L0_REGNUM; i <= SPARC_I7_REGNUM; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_collect (regcache, i, regs + offset);
+ regcache->raw_collect (i, regs + offset);
offset += 8;
}
}
{
if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1)
regcache->raw_supply (SPARC_F0_REGNUM + i,
- regs + fpregmap->r_f0_offset + (i * 4));
+ regs + fpregmap->r_f0_offset + (i * 4));
}
if (sparc32)
for (i = 0; i < 32; i++)
{
if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1)
- regcache_raw_collect (regcache, SPARC_F0_REGNUM + i,
- regs + fpregmap->r_f0_offset + (i * 4));
+ regcache->raw_collect (SPARC_F0_REGNUM + i,
+ regs + fpregmap->r_f0_offset + (i * 4));
}
if (sparc32)
{
if (regnum == SPARC32_FSR_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC32_FSR_REGNUM,
- regs + fpregmap->r_fsr_offset);
+ regcache->raw_collect (SPARC32_FSR_REGNUM,
+ regs + fpregmap->r_fsr_offset);
}
else
{
for (i = 0; i < 16; i++)
{
if (regnum == (SPARC64_F32_REGNUM + i) || regnum == -1)
- regcache_raw_collect (regcache, SPARC64_F32_REGNUM + i,
- (regs + fpregmap->r_f0_offset
- + (32 * 4) + (i * 8)));
+ regcache->raw_collect (SPARC64_F32_REGNUM + i,
+ (regs + fpregmap->r_f0_offset
+ + (32 * 4) + (i * 8)));
}
if (regnum == SPARC64_FSR_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC64_FSR_REGNUM,
- regs + fpregmap->r_fsr_offset);
+ regcache->raw_collect (SPARC64_FSR_REGNUM,
+ regs + fpregmap->r_fsr_offset);
}
}
if (regno == -1 || regno == SPU_PC_REGNUM)
{
gdb_byte buf[4];
- regcache_raw_collect (regcache, SPU_PC_REGNUM, buf);
+ regcache->raw_collect (SPU_PC_REGNUM, buf);
store_ppc_memory (addr, buf, 4);
}
ULONGEST len;
for (i = 0; i < SPU_NUM_GPRS; i++)
- regcache_raw_collect (regcache, i, buf + i*16);
+ regcache->raw_collect (i, buf + i*16);
xsnprintf (annex, sizeof annex, "%d/regs", fd);
spu_proc_xfer_spu (annex, NULL, buf, 0, sizeof buf, &len);
if (regno == -1 || regno == SPU_PC_REGNUM)
{
gdb_byte buf[4];
- regcache_raw_collect (regcache, SPU_PC_REGNUM, buf);
+ regcache->raw_collect (SPU_PC_REGNUM, buf);
target_write (ops_beneath, TARGET_OBJECT_MEMORY, NULL,
buf, spufs_addr, sizeof buf);
int i;
for (i = 0; i < SPU_NUM_GPRS; i++)
- regcache_raw_collect (regcache, i, buf + i*16);
+ regcache->raw_collect (i, buf + i*16);
xsnprintf (annex, sizeof annex, "%d/regs", spufs_fd);
target_write (ops_beneath, TARGET_OBJECT_SPU, annex,
for (i = 0; i < sizeof (regmap) / sizeof (regmap[0]); i++)
if (regmap[i] >= 0)
- regcache_raw_collect (regcache, i, regp + regmap[i]);
+ regcache->raw_collect (i, regp + regmap[i]);
}
/* Transfering floating-point registers between GDB, inferiors and cores. */
for (i = 0; i <= VAX_NUM_REGS; i++)
{
if (regnum == -1 || regnum == i)
- regcache_raw_collect (regcache, i, regs + i * 4);
+ regcache->raw_collect (i, regs + i * 4);
}
}
\f
windows_thread_info *th, int r)
{
if (r >= 0)
- regcache_raw_collect (regcache, r,
- ((char *) &th->context) + mappings[r]);
+ regcache->raw_collect (r, ((char *) &th->context) + mappings[r]);
else
{
for (r = 0; r < gdbarch_num_regs (regcache->arch ()); r++)
struct gdbarch *gdbarch = regcache->arch ();
if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1)
- regcache_raw_collect (regcache, gdbarch_pc_regnum (gdbarch), ®s->pc);
+ regcache->raw_collect (gdbarch_pc_regnum (gdbarch), ®s->pc);
if (regnum == gdbarch_ps_regnum (gdbarch) || regnum == -1)
- regcache_raw_collect (regcache, gdbarch_ps_regnum (gdbarch), ®s->ps);
+ regcache->raw_collect (gdbarch_ps_regnum (gdbarch), ®s->ps);
if (regnum == gdbarch_tdep (gdbarch)->wb_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->wb_regnum,
- ®s->windowbase);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->wb_regnum,
+ ®s->windowbase);
if (regnum == gdbarch_tdep (gdbarch)->ws_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->ws_regnum,
- ®s->windowstart);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->ws_regnum,
+ ®s->windowstart);
if (regnum == gdbarch_tdep (gdbarch)->lbeg_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->lbeg_regnum,
- ®s->lbeg);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->lbeg_regnum,
+ ®s->lbeg);
if (regnum == gdbarch_tdep (gdbarch)->lend_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->lend_regnum,
- ®s->lend);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->lend_regnum,
+ ®s->lend);
if (regnum == gdbarch_tdep (gdbarch)->lcount_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->lcount_regnum,
- ®s->lcount);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->lcount_regnum,
+ ®s->lcount);
if (regnum == gdbarch_tdep (gdbarch)->sar_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->sar_regnum,
- ®s->sar);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->sar_regnum,
+ ®s->sar);
if (regnum == gdbarch_tdep (gdbarch)->threadptr_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->threadptr_regnum,
- ®s->threadptr);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->threadptr_regnum,
+ ®s->threadptr);
if (regnum >=gdbarch_tdep (gdbarch)->ar_base
&& regnum < gdbarch_tdep (gdbarch)->ar_base
+ gdbarch_tdep (gdbarch)->num_aregs)
- regcache_raw_collect (regcache,regnum,
- ®s->ar[regnum - gdbarch_tdep (gdbarch)->ar_base]);
+ regcache->raw_collect (regnum,
+ ®s->ar[regnum - gdbarch_tdep (gdbarch)->ar_base]);
else if (regnum == -1)
{
for (i = 0; i < gdbarch_tdep (gdbarch)->num_aregs; ++i)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->ar_base + i,
- ®s->ar[i]);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->ar_base + i,
+ ®s->ar[i]);
}
if (regnum >= gdbarch_tdep (gdbarch)->a0_base
&& regnum < gdbarch_tdep (gdbarch)->a0_base + C0_NREGS)
- regcache_raw_collect (regcache, regnum,
- ®s->ar[(4 * regs->windowbase + regnum
- - gdbarch_tdep (gdbarch)->a0_base)
+ regcache->raw_collect (regnum,
+ ®s->ar[(4 * regs->windowbase + regnum
+ - gdbarch_tdep (gdbarch)->a0_base)
% gdbarch_tdep (gdbarch)->num_aregs]);
else if (regnum == -1)
{
for (i = 0; i < C0_NREGS; ++i)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->a0_base + i,
- ®s->ar[(4 * regs->windowbase + i)
- % gdbarch_tdep (gdbarch)->num_aregs]);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->a0_base + i,
+ (®s->ar[(4 * regs->windowbase + i)
+ % gdbarch_tdep (gdbarch)->num_aregs]));
}
}
for (ptr = xtensa_regmap_table; ptr->name; ptr++)
if (regnum == ptr->gdb_regnum || regnum == -1)
- regcache_raw_collect (regcache, ptr->gdb_regnum,
- xtregs + ptr->ptrace_offset);
+ regcache->raw_collect (ptr->gdb_regnum, xtregs + ptr->ptrace_offset);
if (ptrace (PTRACE_SETXTREGS, tid, 0, (long)&xtregs) < 0)
perror_with_name (_("Couldn't write extended registers"));