+2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
+
+ * regcache.h (regcache_raw_supply): Remove, update callers to
+ use detached_regcache::raw_supply.
+ * regcache.c (regcache_raw_supply): Remove.
+
2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
* regcache.h (regcache_cooked_write_part): Remove, update
int regno;
for (regno = ARM_A1_REGNUM; regno < ARM_PC_REGNUM; regno++)
- regcache_raw_supply (regcache, regno, ®s[regno]);
+ regcache->raw_supply (regno, ®s[regno]);
if (arm_apcs_32)
{
/* Clear reserved bits bit 20 to bit 23. */
regs[ARM_CPSR_GREGNUM] &= 0xff0fffff;
- regcache_raw_supply (regcache, ARM_PS_REGNUM, ®s[ARM_CPSR_GREGNUM]);
+ regcache->raw_supply (ARM_PS_REGNUM, ®s[ARM_CPSR_GREGNUM]);
}
else
- regcache_raw_supply (regcache, ARM_PS_REGNUM, ®s[ARM_PC_REGNUM]);
+ regcache->raw_supply (ARM_PS_REGNUM, ®s[ARM_PC_REGNUM]);
regs[ARM_PC_REGNUM] = gdbarch_addr_bits_remove
(regcache->arch (), regs[ARM_PC_REGNUM]);
- regcache_raw_supply (regcache, ARM_PC_REGNUM, ®s[ARM_PC_REGNUM]);
+ regcache->raw_supply (ARM_PC_REGNUM, ®s[ARM_PC_REGNUM]);
}
/* Collect GP registers from REGCACHE to buffer REGS. ARM_APCS_32 is
int regno;
for (regno = 0; regno < vfp_register_count; regno++)
- regcache_raw_supply (regcache, regno + ARM_D0_REGNUM,
- regs + regno * 8);
+ regcache->raw_supply (regno + ARM_D0_REGNUM, regs + regno * 8);
- regcache_raw_supply (regcache, ARM_FPSCR_REGNUM,
- regs + 32 * 8);
+ regcache->raw_supply (ARM_FPSCR_REGNUM, regs + 32 * 8);
}
/* Collect VFP registers from REGCACHE to buffer REGS.
int regno;
for (regno = AARCH64_X0_REGNUM; regno <= AARCH64_CPSR_REGNUM; regno++)
- regcache_raw_supply (regcache, regno, ®s[regno - AARCH64_X0_REGNUM]);
+ regcache->raw_supply (regno, ®s[regno - AARCH64_X0_REGNUM]);
}
}
perror_with_name (_("Unable to fetch vFP/SIMD registers."));
for (regno = AARCH64_V0_REGNUM; regno <= AARCH64_V31_REGNUM; regno++)
- regcache_raw_supply (regcache, regno,
- ®s.vregs[regno - AARCH64_V0_REGNUM]);
+ regcache->raw_supply (regno, ®s.vregs[regno - AARCH64_V0_REGNUM]);
- regcache_raw_supply (regcache, AARCH64_FPSR_REGNUM, ®s.fpsr);
- regcache_raw_supply (regcache, AARCH64_FPCR_REGNUM, ®s.fpcr);
+ regcache->raw_supply (AARCH64_FPSR_REGNUM, ®s.fpsr);
+ regcache->raw_supply (AARCH64_FPCR_REGNUM, ®s.fpcr);
}
}
int regno;
for (regno = 0; regno < ppc_num_gprs; regno++)
- regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + regno,
- (char *) (vals + regno));
+ regcache->raw_supply (tdep->ppc_gp0_regnum + regno,
+ (char *) (vals + regno));
}
/* Record that 32-bit register REGNO contains VAL. */
static void
supply_reg32 (struct regcache *regcache, int regno, uint32_t val)
{
- regcache_raw_supply (regcache, regno, (char *) &val);
+ regcache->raw_supply (regno, (char *) &val);
}
/* Record that the floating-point registers contain VALS. */
for (regno = tdep->ppc_fp0_regnum;
regno < tdep->ppc_fp0_regnum + ppc_num_fprs;
regno++)
- regcache_raw_supply (regcache, regno,
- (char *) (vals + regno - tdep->ppc_fp0_regnum));
+ regcache->raw_supply (regno,
+ (char *) (vals + regno - tdep->ppc_fp0_regnum));
}
/* Predicate to test whether given register number is a "special" register. */
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch),
- (char *) &iar);
- regcache_raw_supply (regcache, tdep->ppc_ps_regnum, (char *) &msr);
- regcache_raw_supply (regcache, tdep->ppc_cr_regnum, (char *) &cr);
- regcache_raw_supply (regcache, tdep->ppc_lr_regnum, (char *) &lr);
- regcache_raw_supply (regcache, tdep->ppc_ctr_regnum, (char *) &ctr);
- regcache_raw_supply (regcache, tdep->ppc_xer_regnum, (char *) &xer);
+ regcache->raw_supply (gdbarch_pc_regnum (gdbarch), (char *) &iar);
+ regcache->raw_supply (tdep->ppc_ps_regnum, (char *) &msr);
+ regcache->raw_supply (tdep->ppc_cr_regnum, (char *) &cr);
+ regcache->raw_supply (tdep->ppc_lr_regnum, (char *) &lr);
+ regcache->raw_supply (tdep->ppc_ctr_regnum, (char *) &ctr);
+ regcache->raw_supply (tdep->ppc_xer_regnum, (char *) &xer);
if (tdep->ppc_fpscr_regnum >= 0)
- regcache_raw_supply (regcache, tdep->ppc_fpscr_regnum,
- (char *) &fpscr);
+ regcache->raw_supply (tdep->ppc_fpscr_regnum, (char *) &fpscr);
}
/* Record that the special registers contain the specified 32-bit
struct gdbarch *gdbarch = regcache->arch ();
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch),
- (char *) &iar);
- regcache_raw_supply (regcache, tdep->ppc_ps_regnum, (char *) &msr);
- regcache_raw_supply (regcache, tdep->ppc_cr_regnum, (char *) &cr);
- regcache_raw_supply (regcache, tdep->ppc_lr_regnum, (char *) &lr);
- regcache_raw_supply (regcache, tdep->ppc_ctr_regnum, (char *) &ctr);
- regcache_raw_supply (regcache, tdep->ppc_xer_regnum, (char *) &xer);
+ regcache->raw_supply (gdbarch_pc_regnum (gdbarch), (char *) &iar);
+ regcache->raw_supply (tdep->ppc_ps_regnum, (char *) &msr);
+ regcache->raw_supply (tdep->ppc_cr_regnum, (char *) &cr);
+ regcache->raw_supply (tdep->ppc_lr_regnum, (char *) &lr);
+ regcache->raw_supply (tdep->ppc_ctr_regnum, (char *) &ctr);
+ regcache->raw_supply (tdep->ppc_xer_regnum, (char *) &xer);
if (tdep->ppc_fpscr_regnum >= 0)
- regcache_raw_supply (regcache, tdep->ppc_fpscr_regnum,
- (char *) &fpscr);
+ regcache->raw_supply (tdep->ppc_fpscr_regnum, (char *) &fpscr);
}
/* Fetch all registers from pthread PDTID, which doesn't have a kernel
sprs32.pt_fpscr);
if (tdep->ppc_mq_regnum >= 0)
- regcache_raw_supply (regcache, tdep->ppc_mq_regnum,
- (char *) &sprs32.pt_mq);
+ regcache->raw_supply (tdep->ppc_mq_regnum, (char *) &sprs32.pt_mq);
}
}
}
if (pcb->pcb_hw.apcb_ksp == 0)
return 0;
- regcache_raw_supply (regcache, ALPHA_SP_REGNUM, &pcb->pcb_hw.apcb_ksp);
+ regcache->raw_supply (ALPHA_SP_REGNUM, &pcb->pcb_hw.apcb_ksp);
for (regnum = ALPHA_S0_REGNUM; regnum < ALPHA_A0_REGNUM; regnum++)
- regcache_raw_supply (regcache, regnum,
- &pcb->pcb_context[regnum - ALPHA_S0_REGNUM]);
- regcache_raw_supply (regcache, ALPHA_RA_REGNUM, &pcb->pcb_context[7]);
+ regcache->raw_supply (regnum, &pcb->pcb_context[regnum - ALPHA_S0_REGNUM]);
+ regcache->raw_supply (ALPHA_RA_REGNUM, &pcb->pcb_context[7]);
return 1;
}
for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_supply (regcache, i, regs + (i - ALPHA_FP0_REGNUM) * 8);
+ regcache->raw_supply (i, regs + (i - ALPHA_FP0_REGNUM) * 8);
}
if (regnum == ALPHA_FPCR_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, ALPHA_FPCR_REGNUM, regs + 32 * 8);
+ regcache->raw_supply (ALPHA_FPCR_REGNUM, regs + 32 * 8);
}
/* Supply register REGNUM from the buffer specified by GREGS and LEN
for (i = 0; i < ARRAY_SIZE(regmap); i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_supply (regcache, i, regs + regmap[i] * 8);
+ regcache->raw_supply (i, regs + regmap[i] * 8);
}
if (regnum == ALPHA_PC_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, ALPHA_PC_REGNUM, regs + 31 * 8);
+ regcache->raw_supply (ALPHA_PC_REGNUM, regs + 31 * 8);
if (len >= ALPHANBSD_SIZEOF_GREGS + ALPHANBSD_SIZEOF_FPREGS)
{
for (i = 0; i < ALPHA_ZERO_REGNUM; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_supply (regcache, i, regs + i * 8);
+ regcache->raw_supply (i, regs + i * 8);
}
if (regnum == ALPHA_PC_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, ALPHA_PC_REGNUM, regs + 31 * 8);
+ regcache->raw_supply (ALPHA_PC_REGNUM, regs + 31 * 8);
}
/* NetBSD/alpha register sets. */
for (i = 0; i < 31; ++i)
if (regno == i || regno == -1)
- regcache_raw_supply (regcache, i, regs + i * 8);
+ regcache->raw_supply (i, regs + i * 8);
if (regno == ALPHA_ZERO_REGNUM || regno == -1)
{
const gdb_byte zero[8] = { 0 };
- regcache_raw_supply (regcache, ALPHA_ZERO_REGNUM, zero);
+ regcache->raw_supply (ALPHA_ZERO_REGNUM, zero);
}
if (regno == ALPHA_PC_REGNUM || regno == -1)
- regcache_raw_supply (regcache, ALPHA_PC_REGNUM, pc);
+ regcache->raw_supply (ALPHA_PC_REGNUM, pc);
if (regno == ALPHA_UNIQUE_REGNUM || regno == -1)
- regcache_raw_supply (regcache, ALPHA_UNIQUE_REGNUM, unique);
+ regcache->raw_supply (ALPHA_UNIQUE_REGNUM, unique);
}
void
for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; ++i)
if (regno == i || regno == -1)
- regcache_raw_supply (regcache, i,
- regs + (i - ALPHA_FP0_REGNUM) * 8);
+ regcache->raw_supply (i, regs + (i - ALPHA_FP0_REGNUM) * 8);
if (regno == ALPHA_FPCR_REGNUM || regno == -1)
- regcache_raw_supply (regcache, ALPHA_FPCR_REGNUM, fpcr);
+ regcache->raw_supply (ALPHA_FPCR_REGNUM, fpcr);
}
void
if (ptrace (PT_GETFSBASE, pid, (PTRACE_TYPE_ARG3) &base, 0) == -1)
perror_with_name (_("Couldn't get segment register fs_base"));
- regcache_raw_supply (regcache, AMD64_FSBASE_REGNUM, &base);
+ regcache->raw_supply (AMD64_FSBASE_REGNUM, &base);
if (regnum != -1)
return;
}
if (ptrace (PT_GETGSBASE, pid, (PTRACE_TYPE_ARG3) &base, 0) == -1)
perror_with_name (_("Couldn't get segment register gs_base"));
- regcache_raw_supply (regcache, AMD64_GSBASE_REGNUM, &base);
+ regcache->raw_supply (AMD64_GSBASE_REGNUM, &base);
if (regnum != -1)
return;
}
return 0;
pcb->pcb_rsp += 8;
- regcache_raw_supply (regcache, AMD64_RIP_REGNUM, &pcb->pcb_rip);
- regcache_raw_supply (regcache, AMD64_RBX_REGNUM, &pcb->pcb_rbx);
- regcache_raw_supply (regcache, AMD64_RSP_REGNUM, &pcb->pcb_rsp);
- regcache_raw_supply (regcache, AMD64_RBP_REGNUM, &pcb->pcb_rbp);
- regcache_raw_supply (regcache, 12, &pcb->pcb_r12);
- regcache_raw_supply (regcache, 13, &pcb->pcb_r13);
- regcache_raw_supply (regcache, 14, &pcb->pcb_r14);
- regcache_raw_supply (regcache, 15, &pcb->pcb_r15);
+ regcache->raw_supply (AMD64_RIP_REGNUM, &pcb->pcb_rip);
+ regcache->raw_supply (AMD64_RBX_REGNUM, &pcb->pcb_rbx);
+ regcache->raw_supply (AMD64_RSP_REGNUM, &pcb->pcb_rsp);
+ regcache->raw_supply (AMD64_RBP_REGNUM, &pcb->pcb_rbp);
+ regcache->raw_supply (12, &pcb->pcb_r12);
+ regcache->raw_supply (13, &pcb->pcb_r13);
+ regcache->raw_supply (14, &pcb->pcb_r14);
+ regcache->raw_supply (15, &pcb->pcb_r15);
#if (__FreeBSD_version < 800075) && (__FreeBSD_kernel_version < 800075)
/* struct pcb provides the pcb_ds/pcb_es/pcb_fs/pcb_gs fields only
up until __FreeBSD_version 800074: The removal of these fields
occurred on 2009-04-01 while the __FreeBSD_version number was
bumped to 800075 on 2009-04-06. So 800075 is the closest version
number where we should not try to access these fields. */
- regcache_raw_supply (regcache, AMD64_DS_REGNUM, &pcb->pcb_ds);
- regcache_raw_supply (regcache, AMD64_ES_REGNUM, &pcb->pcb_es);
- regcache_raw_supply (regcache, AMD64_FS_REGNUM, &pcb->pcb_fs);
- regcache_raw_supply (regcache, AMD64_GS_REGNUM, &pcb->pcb_gs);
+ regcache->raw_supply (AMD64_DS_REGNUM, &pcb->pcb_ds);
+ regcache->raw_supply (AMD64_ES_REGNUM, &pcb->pcb_es);
+ regcache->raw_supply (AMD64_FS_REGNUM, &pcb->pcb_fs);
+ regcache->raw_supply (AMD64_GS_REGNUM, &pcb->pcb_gs);
#endif
return 1;
if (ptrace (PTRACE_ARCH_PRCTL, tid, &base, ARCH_GET_FS) < 0)
perror_with_name (_("Couldn't get segment register fs_base"));
- regcache_raw_supply (regcache, AMD64_FSBASE_REGNUM, &base);
+ regcache->raw_supply (AMD64_FSBASE_REGNUM, &base);
}
if (regnum == -1 || regnum == AMD64_GSBASE_REGNUM)
if (ptrace (PTRACE_ARCH_PRCTL, tid, &base, ARCH_GET_GS) < 0)
perror_with_name (_("Couldn't get segment register gs_base"));
- regcache_raw_supply (regcache, AMD64_GSBASE_REGNUM, &base);
+ regcache->raw_supply (AMD64_GSBASE_REGNUM, &base);
}
}
#endif
int offset = amd64_native_gregset_reg_offset (gdbarch, i);
if (offset != -1)
- regcache_raw_supply (regcache, i, regs + offset);
+ regcache->raw_supply (i, regs + offset);
}
}
}
{
/* Yes, we have a frame that matches cpu_switch(). */
pcb->pcb_rsp += sizeof (struct switchframe);
- regcache_raw_supply (regcache, 12, &sf.sf_r12);
- regcache_raw_supply (regcache, 13, &sf.sf_r13);
- regcache_raw_supply (regcache, 14, &sf.sf_r14);
- regcache_raw_supply (regcache, 15, &sf.sf_r15);
- regcache_raw_supply (regcache, AMD64_RBX_REGNUM, &sf.sf_rbx);
- regcache_raw_supply (regcache, AMD64_RIP_REGNUM, &sf.sf_rip);
+ regcache->raw_supply (12, &sf.sf_r12);
+ regcache->raw_supply (13, &sf.sf_r13);
+ regcache->raw_supply (14, &sf.sf_r14);
+ regcache->raw_supply (15, &sf.sf_r15);
+ regcache->raw_supply (AMD64_RBX_REGNUM, &sf.sf_rbx);
+ regcache->raw_supply (AMD64_RIP_REGNUM, &sf.sf_rip);
}
else
{
/* No, the pcb must have been last updated by savectx(). */
pcb->pcb_rsp += 8;
- regcache_raw_supply (regcache, AMD64_RIP_REGNUM, &sf);
+ regcache->raw_supply (AMD64_RIP_REGNUM, &sf);
}
- regcache_raw_supply (regcache, AMD64_RSP_REGNUM, &pcb->pcb_rsp);
- regcache_raw_supply (regcache, AMD64_RBP_REGNUM, &pcb->pcb_rbp);
+ regcache->raw_supply (AMD64_RSP_REGNUM, &pcb->pcb_rsp);
+ regcache->raw_supply (AMD64_RBP_REGNUM, &pcb->pcb_rbp);
return 1;
}
returned from _thread_machdep_switch. */
offset = amd64obsd_uthread_reg_offset[AMD64_RIP_REGNUM] + 8;
store_unsigned_integer (buf, 8, byte_order, sp + offset);
- regcache_raw_supply (regcache, AMD64_RSP_REGNUM, buf);
+ regcache->raw_supply (AMD64_RSP_REGNUM, buf);
}
for (i = 0; i < ARRAY_SIZE (amd64obsd_uthread_reg_offset); i++)
/* Read the saved register from the stack frame. */
read_memory (sp + amd64obsd_uthread_reg_offset[i], buf, 8);
- regcache_raw_supply (regcache, i, buf);
+ regcache->raw_supply (i, buf);
}
}
}
const gdb_byte *regs = (const gdb_byte *) fxsave;
if (regnum == -1 || regnum == I387_FISEG_REGNUM (tdep))
- regcache_raw_supply (regcache, I387_FISEG_REGNUM (tdep), regs + 12);
+ regcache->raw_supply (I387_FISEG_REGNUM (tdep), regs + 12);
if (regnum == -1 || regnum == I387_FOSEG_REGNUM (tdep))
- regcache_raw_supply (regcache, I387_FOSEG_REGNUM (tdep), regs + 20);
+ regcache->raw_supply (I387_FOSEG_REGNUM (tdep), regs + 20);
}
}
if (!(clear_bv & X86_XSTATE_X87))
{
if (regnum == -1 || regnum == I387_FISEG_REGNUM (tdep))
- regcache_raw_supply (regcache, I387_FISEG_REGNUM (tdep),
- regs + 12);
+ regcache->raw_supply (I387_FISEG_REGNUM (tdep), regs + 12);
if (regnum == -1 || regnum == I387_FOSEG_REGNUM (tdep))
- regcache_raw_supply (regcache, I387_FOSEG_REGNUM (tdep),
- regs + 20);
+ regcache->raw_supply (I387_FOSEG_REGNUM (tdep), regs + 20);
}
}
}
regs = (gdb_byte *) alloca (register_size (gdbarch, pc_regno));
store_unsigned_integer (regs, register_size (gdbarch, pc_regno),
gdbarch_byte_order (gdbarch), addr);
- regcache_raw_supply (regcache, pc_regno, regs);
+ regcache->raw_supply (pc_regno, regs);
}
int
for (i = ARM_F0_REGNUM; i <= ARM_FPS_REGNUM; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_supply (regcache, i, regs + armbsd_fpreg_offset (i));
+ regcache->raw_supply (i, regs + armbsd_fpreg_offset (i));
}
}
for (i = ARM_A1_REGNUM; i <= ARM_PC_REGNUM; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_supply (regcache, i, regs + i * 4);
+ regcache->raw_supply (i, regs + i * 4);
}
if (regnum == ARM_PS_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, i, regs + 16 * 4);
+ regcache->raw_supply (i, regs + 16 * 4);
if (len >= ARMBSD_SIZEOF_GREGS + ARMBSD_SIZEOF_FPREGS)
{
perror_with_name (_("Unable to fetch the floating point registers."));
/* Fetch fpsr. */
- regcache_raw_supply (regcache, ARM_FPS_REGNUM,
- fp + NWFPE_FPSR_OFFSET);
+ regcache->raw_supply (ARM_FPS_REGNUM, fp + NWFPE_FPSR_OFFSET);
/* Fetch the floating point registers. */
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
perror_with_name (_("Unable to fetch WMMX registers."));
for (regno = 0; regno < 16; regno++)
- regcache_raw_supply (regcache, regno + ARM_WR0_REGNUM,
- ®buf[regno * 8]);
+ regcache->raw_supply (regno + ARM_WR0_REGNUM, ®buf[regno * 8]);
for (regno = 0; regno < 2; regno++)
- regcache_raw_supply (regcache, regno + ARM_WCSSF_REGNUM,
- ®buf[16 * 8 + regno * 4]);
+ regcache->raw_supply (regno + ARM_WCSSF_REGNUM,
+ ®buf[16 * 8 + regno * 4]);
for (regno = 0; regno < 4; regno++)
- regcache_raw_supply (regcache, regno + ARM_WCGR0_REGNUM,
- ®buf[16 * 8 + 2 * 4 + regno * 4]);
+ regcache->raw_supply (regno + ARM_WCGR0_REGNUM,
+ ®buf[16 * 8 + 2 * 4 + regno * 4]);
}
static void
for (regno = ARM_A1_REGNUM; regno < ARM_PC_REGNUM; regno++)
if (regnum == -1 || regnum == regno)
- regcache_raw_supply (regcache, regno,
- gregs + INT_REGISTER_SIZE * regno);
+ regcache->raw_supply (regno, gregs + INT_REGISTER_SIZE * regno);
if (regnum == ARM_PS_REGNUM || regnum == -1)
{
if (arm_apcs_32)
- regcache_raw_supply (regcache, ARM_PS_REGNUM,
- gregs + INT_REGISTER_SIZE * ARM_CPSR_GREGNUM);
+ regcache->raw_supply (ARM_PS_REGNUM,
+ gregs + INT_REGISTER_SIZE * ARM_CPSR_GREGNUM);
else
- regcache_raw_supply (regcache, ARM_PS_REGNUM,
+ regcache->raw_supply (ARM_PS_REGNUM,
gregs + INT_REGISTER_SIZE * ARM_PC_REGNUM);
}
INT_REGISTER_SIZE, byte_order);
reg_pc = gdbarch_addr_bits_remove (gdbarch, reg_pc);
store_unsigned_integer (pc_buf, INT_REGISTER_SIZE, byte_order, reg_pc);
- regcache_raw_supply (regcache, ARM_PC_REGNUM, pc_buf);
+ regcache->raw_supply (ARM_PC_REGNUM, pc_buf);
}
}
break;
}
- regcache_raw_supply (regcache, regno, buf);
+ regcache->raw_supply (regno, buf);
}
void
int regno;
if (regnum == ARM_FPS_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, ARM_FPS_REGNUM,
+ regcache->raw_supply (ARM_FPS_REGNUM,
regs + NWFPE_FPSR_OFFSET);
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
int regno;
if (regnum == ARM_FPSCR_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, ARM_FPSCR_REGNUM, regs + 32 * 8);
+ regcache->raw_supply (ARM_FPSCR_REGNUM, regs + 32 * 8);
for (regno = ARM_D0_REGNUM; regno <= ARM_D31_REGNUM; regno++)
if (regnum == -1 || regnum == regno)
- regcache_raw_supply (regcache, regno,
- regs + (regno - ARM_D0_REGNUM) * 8);
+ regcache->raw_supply (regno, regs + (regno - ARM_D0_REGNUM) * 8);
}
static void
/* Integer registers. */
for (regno = ARM_A1_REGNUM; regno < ARM_SP_REGNUM; regno++)
- regcache_raw_supply (regcache, regno, (char *) &gregset->r[regno]);
+ regcache->raw_supply (regno, (char *) &gregset->r[regno]);
- regcache_raw_supply (regcache, ARM_SP_REGNUM,
- (char *) &gregset->r_sp);
- regcache_raw_supply (regcache, ARM_LR_REGNUM,
- (char *) &gregset->r_lr);
+ regcache->raw_supply (ARM_SP_REGNUM, (char *) &gregset->r_sp);
+ regcache->raw_supply (ARM_LR_REGNUM, (char *) &gregset->r_lr);
/* This is ok: we're running native... */
r_pc = gdbarch_addr_bits_remove (regcache->arch (), gregset->r_pc);
- regcache_raw_supply (regcache, ARM_PC_REGNUM, (char *) &r_pc);
+ regcache->raw_supply (ARM_PC_REGNUM, (char *) &r_pc);
if (arm_apcs_32)
- regcache_raw_supply (regcache, ARM_PS_REGNUM,
- (char *) &gregset->r_cpsr);
+ regcache->raw_supply (ARM_PS_REGNUM, (char *) &gregset->r_cpsr);
else
- regcache_raw_supply (regcache, ARM_PS_REGNUM,
- (char *) &gregset->r_pc);
+ regcache->raw_supply (ARM_PS_REGNUM, (char *) &gregset->r_pc);
}
static void
int regno;
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
- regcache_raw_supply (regcache, regno,
- (char *) &fparegset->fpr[regno - ARM_F0_REGNUM]);
+ regcache->raw_supply (regno,
+ (char *) &fparegset->fpr[regno - ARM_F0_REGNUM]);
- regcache_raw_supply (regcache, ARM_FPS_REGNUM,
- (char *) &fparegset->fpr_fpsr);
+ regcache->raw_supply (ARM_FPS_REGNUM, (char *) &fparegset->fpr_fpsr);
}
static void
switch (regno)
{
case ARM_SP_REGNUM:
- regcache_raw_supply (regcache, ARM_SP_REGNUM,
- (char *) &inferior_registers.r_sp);
+ regcache->raw_supply (ARM_SP_REGNUM, (char *) &inferior_registers.r_sp);
break;
case ARM_LR_REGNUM:
- regcache_raw_supply (regcache, ARM_LR_REGNUM,
- (char *) &inferior_registers.r_lr);
+ regcache->raw_supply (ARM_LR_REGNUM, (char *) &inferior_registers.r_lr);
break;
case ARM_PC_REGNUM:
inferior_registers.r_pc = gdbarch_addr_bits_remove
(regcache->arch (),
inferior_registers.r_pc);
- regcache_raw_supply (regcache, ARM_PC_REGNUM,
- (char *) &inferior_registers.r_pc);
+ regcache->raw_supply (ARM_PC_REGNUM, (char *) &inferior_registers.r_pc);
break;
case ARM_PS_REGNUM:
if (arm_apcs_32)
- regcache_raw_supply (regcache, ARM_PS_REGNUM,
- (char *) &inferior_registers.r_cpsr);
+ regcache->raw_supply (ARM_PS_REGNUM,
+ (char *) &inferior_registers.r_cpsr);
else
- regcache_raw_supply (regcache, ARM_PS_REGNUM,
- (char *) &inferior_registers.r_pc);
+ regcache->raw_supply (ARM_PS_REGNUM,
+ (char *) &inferior_registers.r_pc);
break;
default:
- regcache_raw_supply (regcache, regno,
- (char *) &inferior_registers.r[regno]);
+ regcache->raw_supply (regno, (char *) &inferior_registers.r[regno]);
break;
}
}
switch (regno)
{
case ARM_FPS_REGNUM:
- regcache_raw_supply (regcache, ARM_FPS_REGNUM,
- (char *) &inferior_fp_registers.fpr_fpsr);
+ regcache->raw_supply (ARM_FPS_REGNUM,
+ (char *) &inferior_fp_registers.fpr_fpsr);
break;
default:
- regcache_raw_supply (regcache, regno,
- (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
+ regcache->raw_supply
+ (regno, (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
break;
}
}
/* Mark all registers not found in the core as unavailable. */
for (i = 0; i < gdbarch_num_regs (regcache->arch ()); i++)
if (regcache->get_register_status (i) == REG_UNKNOWN)
- regcache_raw_supply (regcache, i, NULL);
+ regcache->raw_supply (i, NULL);
}
void
knows about the actual size of each register so that's no problem. */
for (i = 0; i < NUM_GENREGS + NUM_SPECREGS; i++)
{
- regcache_raw_supply (regcache, i, (char *)®p[i]);
+ regcache->raw_supply (i, (char *)®p[i]);
}
if (tdep->cris_version == 32)
/* Needed to set pseudo-register PC for CRISv32. */
/* FIXME: If ERP is in a delay slot at this point then the PC will
be wrong. Issue a warning to alert the user. */
- regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch),
- (char *)®p[ERP_REGNUM]);
+ regcache->raw_supply (gdbarch_pc_regnum (gdbarch),
+ (char *)®p[ERP_REGNUM]);
if (*(char *)®p[ERP_REGNUM] & 0x1)
fprintf_unfiltered (gdb_stderr, "Warning: PC in delay slot\n");
{
if (regno == regn)
{
- regcache_raw_supply (regcache, regno, regs + offset);
+ regcache->raw_supply (regno, regs + offset);
break;
}
else if (regno == -1)
{
- regcache_raw_supply (regcache, regn, regs + offset);
+ regcache->raw_supply (regn, regs + offset);
}
}
offset += regsize;
{
struct gdbarch *gdbarch = regcache->arch ();
if (regno < gdbarch_fp0_regnum (gdbarch))
- regcache_raw_supply (regcache, regno,
- (char *) &a_tss + regno_mapping[regno].tss_ofs);
+ regcache->raw_supply (regno,
+ (char *) &a_tss + regno_mapping[regno].tss_ofs);
else if (i386_fp_regnum_p (gdbarch, regno) || i386_fpc_regnum_p (gdbarch,
regno))
i387_supply_fsave (regcache, regno, &npx);
if (gdbarch_cannot_fetch_register (gdbarch, regno))
{
- regcache_raw_supply (regcache, regno, NULL);
+ regcache->raw_supply (regno, NULL);
return;
}
gdbarch_register_name (gdbarch, regno),
regno, safe_strerror (errno));
- regcache_raw_supply (regcache, regno, &val);
+ regcache->raw_supply (regno, &val);
}
/* Store one register. */
for (i = 0; i < sizeof (greg_map) / sizeof (greg_map[0]); i++, regp++)
{
int regno = greg_map[i];
- regcache_raw_supply (regcache, regno, regp);
+ regcache->raw_supply (regno, regp);
}
}
for (regi = 0; regi <= 31; regi++)
{
from = (const char *) &((*fpregsetp)[regi]);
- regcache_raw_supply (regcache, 2*regi + HPPA_FP0_REGNUM, from);
- regcache_raw_supply (regcache, 2*regi + HPPA_FP0_REGNUM + 1, from + 4);
+ regcache->raw_supply (2*regi + HPPA_FP0_REGNUM, from);
+ regcache->raw_supply (2*regi + HPPA_FP0_REGNUM + 1, from + 4);
}
}
int regnum;
for (regnum = HPPA_R1_REGNUM; regnum <= HPPA_R31_REGNUM; regnum++)
- regcache_raw_supply (regcache, regnum, regs + regnum * 4);
-
- regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs + 32 * 4);
- regcache_raw_supply (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
- regcache_raw_supply (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
- regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
- regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
- regcache_raw_supply (regcache, HPPA_IPSW_REGNUM, regs);
- regcache_raw_supply (regcache, HPPA_SR4_REGNUM, regs + 41 * 4);
- regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 1, regs + 37 * 4);
- regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 2, regs + 38 * 4);
- regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 3, regs + 39 * 4);
- regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 4, regs + 40 * 4);
+ regcache->raw_supply (regnum, regs + regnum * 4);
+
+ regcache->raw_supply (HPPA_SAR_REGNUM, regs + 32 * 4);
+ regcache->raw_supply (HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
+ regcache->raw_supply (HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
+ regcache->raw_supply (HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
+ regcache->raw_supply (HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
+ regcache->raw_supply (HPPA_IPSW_REGNUM, regs);
+ regcache->raw_supply (HPPA_SR4_REGNUM, regs + 41 * 4);
+ regcache->raw_supply (HPPA_SR4_REGNUM + 1, regs + 37 * 4);
+ regcache->raw_supply (HPPA_SR4_REGNUM + 2, regs + 38 * 4);
+ regcache->raw_supply (HPPA_SR4_REGNUM + 3, regs + 39 * 4);
+ regcache->raw_supply (HPPA_SR4_REGNUM + 4, regs + 40 * 4);
}
/* Supply the floating-point registers stored in FPREGS to REGCACHE. */
for (regnum = HPPA_FP0_REGNUM; regnum <= HPPA_FP31R_REGNUM;
regnum += 2, regs += 8)
{
- regcache_raw_supply (regcache, regnum, regs);
- regcache_raw_supply (regcache, regnum + 1, regs + 4);
+ regcache->raw_supply (regnum, regs);
+ regcache->raw_supply (regnum + 1, regs + 4);
}
}
for (i = 0; i < ARRAY_SIZE (hppanbsd_reg_offset); i++)
if (hppanbsd_reg_offset[i] != -1)
if (regnum == -1 || regnum == i)
- regcache_raw_supply (regcache, i, regs + hppanbsd_reg_offset[i]);
+ regcache->raw_supply (i, regs + hppanbsd_reg_offset[i]);
}
/* NetBSD/hppa register set. */
const char *regs = gregs;
int regnum;
- regcache_raw_supply (regcache, HPPA_R0_REGNUM, &zero);
+ regcache->raw_supply (HPPA_R0_REGNUM, &zero);
for (regnum = HPPA_R1_REGNUM; regnum <= HPPA_R31_REGNUM; regnum++)
- regcache_raw_supply (regcache, regnum, regs + regnum * 4);
+ regcache->raw_supply (regnum, regs + regnum * 4);
if (sizeof(struct reg) >= 46 * 4)
{
- regcache_raw_supply (regcache, HPPA_IPSW_REGNUM, regs);
- regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs + 32 * 4);
- regcache_raw_supply (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
- regcache_raw_supply (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
- regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
- regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
- regcache_raw_supply (regcache, HPPA_SR0_REGNUM, regs + 37 * 4);
- regcache_raw_supply (regcache, HPPA_SR1_REGNUM, regs + 38 * 4);
- regcache_raw_supply (regcache, HPPA_SR2_REGNUM, regs + 39 * 4);
- regcache_raw_supply (regcache, HPPA_SR3_REGNUM, regs + 40 * 4);
- regcache_raw_supply (regcache, HPPA_SR4_REGNUM, regs + 41 * 4);
- regcache_raw_supply (regcache, HPPA_SR5_REGNUM, regs + 42 * 4);
- regcache_raw_supply (regcache, HPPA_SR6_REGNUM, regs + 43 * 4);
- regcache_raw_supply (regcache, HPPA_SR7_REGNUM, regs + 44 * 4);
- regcache_raw_supply (regcache, HPPA_CR26_REGNUM, regs + 45 * 4);
- regcache_raw_supply (regcache, HPPA_CR27_REGNUM, regs + 46 * 4);
+ regcache->raw_supply (HPPA_IPSW_REGNUM, regs);
+ regcache->raw_supply (HPPA_SAR_REGNUM, regs + 32 * 4);
+ regcache->raw_supply (HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
+ regcache->raw_supply (HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
+ regcache->raw_supply (HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
+ regcache->raw_supply (HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
+ regcache->raw_supply (HPPA_SR0_REGNUM, regs + 37 * 4);
+ regcache->raw_supply (HPPA_SR1_REGNUM, regs + 38 * 4);
+ regcache->raw_supply (HPPA_SR2_REGNUM, regs + 39 * 4);
+ regcache->raw_supply (HPPA_SR3_REGNUM, regs + 40 * 4);
+ regcache->raw_supply (HPPA_SR4_REGNUM, regs + 41 * 4);
+ regcache->raw_supply (HPPA_SR5_REGNUM, regs + 42 * 4);
+ regcache->raw_supply (HPPA_SR6_REGNUM, regs + 43 * 4);
+ regcache->raw_supply (HPPA_SR7_REGNUM, regs + 44 * 4);
+ regcache->raw_supply (HPPA_CR26_REGNUM, regs + 45 * 4);
+ regcache->raw_supply (HPPA_CR27_REGNUM, regs + 46 * 4);
}
else
{
- regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs);
- regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4);
- regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4);
+ regcache->raw_supply (HPPA_SAR_REGNUM, regs);
+ regcache->raw_supply (HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4);
+ regcache->raw_supply (HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4);
}
}
for (regnum = HPPA_FP0_REGNUM; regnum <= HPPA_FP31R_REGNUM;
regnum += 2, regs += 8)
{
- regcache_raw_supply (regcache, regnum, regs);
- regcache_raw_supply (regcache, regnum + 1, regs + 4);
+ regcache->raw_supply (regnum, regs);
+ regcache->raw_supply (regnum + 1, regs + 4);
}
}
gdb_assert (len >= HPPAOBSD_SIZEOF_GREGS);
if (regnum == -1 || regnum == HPPA_R0_REGNUM)
- regcache_raw_supply (regcache, HPPA_R0_REGNUM, &zero);
+ regcache->raw_supply (HPPA_R0_REGNUM, &zero);
for (i = HPPA_R1_REGNUM, offset = 4; i <= HPPA_R31_REGNUM; i++, offset += 4)
{
if (regnum == -1 || regnum == i)
- regcache_raw_supply (regcache, i, regs + offset);
+ regcache->raw_supply (i, regs + offset);
}
if (len >= HPPANBSD_SIZEOF_GREGS)
{
if (regnum == -1 || regnum == HPPA_IPSW_REGNUM)
- regcache_raw_supply (regcache, HPPA_IPSW_REGNUM, regs);
+ regcache->raw_supply (HPPA_IPSW_REGNUM, regs);
if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
- regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs + 32 * 4);
+ regcache->raw_supply (HPPA_SAR_REGNUM, regs + 32 * 4);
if (regnum == -1 || regnum == HPPA_PCSQ_HEAD_REGNUM)
- regcache_raw_supply (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
+ regcache->raw_supply (HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
if (regnum == -1 || regnum == HPPA_PCSQ_TAIL_REGNUM)
- regcache_raw_supply (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
+ regcache->raw_supply (HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
- regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
+ regcache->raw_supply (HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
- regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
+ regcache->raw_supply (HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
if (regnum == -1 || regnum == HPPA_SR0_REGNUM)
- regcache_raw_supply (regcache, HPPA_SR0_REGNUM, regs + 37 * 4);
+ regcache->raw_supply (HPPA_SR0_REGNUM, regs + 37 * 4);
if (regnum == -1 || regnum == HPPA_SR1_REGNUM)
- regcache_raw_supply (regcache, HPPA_SR1_REGNUM, regs + 38 * 4);
+ regcache->raw_supply (HPPA_SR1_REGNUM, regs + 38 * 4);
if (regnum == -1 || regnum == HPPA_SR2_REGNUM)
- regcache_raw_supply (regcache, HPPA_SR2_REGNUM, regs + 39 * 4);
+ regcache->raw_supply (HPPA_SR2_REGNUM, regs + 39 * 4);
if (regnum == -1 || regnum == HPPA_SR3_REGNUM)
- regcache_raw_supply (regcache, HPPA_SR3_REGNUM, regs + 40 * 4);
+ regcache->raw_supply (HPPA_SR3_REGNUM, regs + 40 * 4);
if (regnum == -1 || regnum == HPPA_SR4_REGNUM)
- regcache_raw_supply (regcache, HPPA_SR4_REGNUM, regs + 41 * 4);
+ regcache->raw_supply (HPPA_SR4_REGNUM, regs + 41 * 4);
if (regnum == -1 || regnum == HPPA_SR5_REGNUM)
- regcache_raw_supply (regcache, HPPA_SR5_REGNUM, regs + 42 * 4);
+ regcache->raw_supply (HPPA_SR5_REGNUM, regs + 42 * 4);
if (regnum == -1 || regnum == HPPA_SR6_REGNUM)
- regcache_raw_supply (regcache, HPPA_SR6_REGNUM, regs + 43 * 4);
+ regcache->raw_supply (HPPA_SR6_REGNUM, regs + 43 * 4);
if (regnum == -1 || regnum == HPPA_SR7_REGNUM)
- regcache_raw_supply (regcache, HPPA_SR7_REGNUM, regs + 44 * 4);
+ regcache->raw_supply (HPPA_SR7_REGNUM, regs + 44 * 4);
if (regnum == -1 || regnum == HPPA_CR26_REGNUM)
- regcache_raw_supply (regcache, HPPA_CR26_REGNUM, regs + 45 * 4);
+ regcache->raw_supply (HPPA_CR26_REGNUM, regs + 45 * 4);
if (regnum == -1 || regnum == HPPA_CR27_REGNUM)
- regcache_raw_supply (regcache, HPPA_CR27_REGNUM, regs + 46 * 4);
+ regcache->raw_supply (HPPA_CR27_REGNUM, regs + 46 * 4);
}
else
{
if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
- regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs);
+ regcache->raw_supply (HPPA_SAR_REGNUM, regs);
if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
- regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4);
+ regcache->raw_supply (HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4);
if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
- regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4);
+ regcache->raw_supply (HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4);
}
}
for (i = HPPA_FP0_REGNUM; i <= HPPA_FP31R_REGNUM; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_supply (regcache, i, regs + (i - HPPA_FP0_REGNUM) * 4);
+ regcache->raw_supply (i, regs + (i - HPPA_FP0_REGNUM) * 4);
}
}
int offset = i386bsd_r_reg_offset[regnum];
if (offset != -1)
- regcache_raw_supply (regcache, regnum, regs + offset);
+ regcache->raw_supply (regnum, regs + offset);
}
}
MACH_CHECK_ERROR (ret);
}
for (i = 0; i < I386_NUM_GREGS; i++)
- regcache_raw_supply
- (regcache, i,
- (char *)&gp_regs + i386_darwin_thread_state_reg_offset[i]);
+ regcache->raw_supply
+ (i, (char *) &gp_regs + i386_darwin_thread_state_reg_offset[i]);
fetched++;
}
if (! fetched)
{
warning (_("unknown register %d"), regno);
- regcache_raw_supply (regcache, regno, NULL);
+ regcache->raw_supply (regno, NULL);
}
}
return 0;
pcb->pcb_esp += 4;
- regcache_raw_supply (regcache, I386_EDI_REGNUM, &pcb->pcb_edi);
- regcache_raw_supply (regcache, I386_ESI_REGNUM, &pcb->pcb_esi);
- regcache_raw_supply (regcache, I386_EBP_REGNUM, &pcb->pcb_ebp);
- regcache_raw_supply (regcache, I386_ESP_REGNUM, &pcb->pcb_esp);
- regcache_raw_supply (regcache, I386_EBX_REGNUM, &pcb->pcb_ebx);
- regcache_raw_supply (regcache, I386_EIP_REGNUM, &pcb->pcb_eip);
- regcache_raw_supply (regcache, I386_GS_REGNUM, &pcb->pcb_gs);
+ regcache->raw_supply (I386_EDI_REGNUM, &pcb->pcb_edi);
+ regcache->raw_supply (I386_ESI_REGNUM, &pcb->pcb_esi);
+ regcache->raw_supply (I386_EBP_REGNUM, &pcb->pcb_ebp);
+ regcache->raw_supply (I386_ESP_REGNUM, &pcb->pcb_esp);
+ regcache->raw_supply (I386_EBX_REGNUM, &pcb->pcb_ebx);
+ regcache->raw_supply (I386_EIP_REGNUM, &pcb->pcb_eip);
+ regcache->raw_supply (I386_GS_REGNUM, &pcb->pcb_gs);
return 1;
}
proc_debug (thread, "fetching all register");
for (i = 0; i < I386_NUM_GREGS; i++)
- regcache_raw_supply (regcache, i, REG_ADDR (state, i));
+ regcache->raw_supply (i, REG_ADDR (state, i));
thread->fetched_regs = ~0;
}
else
gdbarch_register_name (regcache->arch (),
regno));
- regcache_raw_supply (regcache, regno,
- REG_ADDR (state, regno));
+ regcache->raw_supply (regno, REG_ADDR (state, regno));
thread->fetched_regs |= (1 << regno);
}
}
gdbarch_register_name (gdbarch, check_regno));
if (regno >= 0 && regno != check_regno)
/* Update GDB's copy of the register. */
- regcache_raw_supply (regcache, check_regno,
- REG_ADDR (state, check_regno));
+ regcache->raw_supply (check_regno,
+ REG_ADDR (state, check_regno));
else
warning (_("... also writing this register! "
"Suspicious..."));
gdb_assert (!have_ptrace_getregs);
if (i386_linux_gregset_reg_offset[regno] == -1)
{
- regcache_raw_supply (regcache, regno, NULL);
+ regcache->raw_supply (regno, NULL);
return;
}
gdbarch_register_name (regcache->arch (), regno),
regno, safe_strerror (errno));
- regcache_raw_supply (regcache, regno, &val);
+ regcache->raw_supply (regno, &val);
}
/* Store one register. */
int i;
for (i = 0; i < I386_NUM_GREGS; i++)
- regcache_raw_supply (regcache, i,
- regp + i386_linux_gregset_reg_offset[i]);
+ regcache->raw_supply (i, regp + i386_linux_gregset_reg_offset[i]);
if (I386_LINUX_ORIG_EAX_REGNUM
< gdbarch_num_regs (regcache->arch ()))
- regcache_raw_supply (regcache, I386_LINUX_ORIG_EAX_REGNUM, regp
- + i386_linux_gregset_reg_offset[I386_LINUX_ORIG_EAX_REGNUM]);
+ regcache->raw_supply
+ (I386_LINUX_ORIG_EAX_REGNUM,
+ regp + i386_linux_gregset_reg_offset[I386_LINUX_ORIG_EAX_REGNUM]);
}
/* Fill register REGNO (if it is a general-purpose register) in
read_memory (pcb->pcb_esp, (gdb_byte *)&sf, sizeof sf);
pcb->pcb_esp += sizeof (struct switchframe);
- regcache_raw_supply (regcache, I386_EDI_REGNUM, &sf.sf_edi);
- regcache_raw_supply (regcache, I386_ESI_REGNUM, &sf.sf_esi);
- regcache_raw_supply (regcache, I386_EBP_REGNUM, &pcb->pcb_ebp);
- regcache_raw_supply (regcache, I386_ESP_REGNUM, &pcb->pcb_esp);
- regcache_raw_supply (regcache, I386_EBX_REGNUM, &sf.sf_ebx);
- regcache_raw_supply (regcache, I386_EIP_REGNUM, &sf.sf_eip);
+ regcache->raw_supply (I386_EDI_REGNUM, &sf.sf_edi);
+ regcache->raw_supply (I386_ESI_REGNUM, &sf.sf_esi);
+ regcache->raw_supply (I386_EBP_REGNUM, &pcb->pcb_ebp);
+ regcache->raw_supply (I386_ESP_REGNUM, &pcb->pcb_esp);
+ regcache->raw_supply (I386_EBX_REGNUM, &sf.sf_ebx);
+ regcache->raw_supply (I386_EIP_REGNUM, &sf.sf_eip);
return 1;
}
/* Yes, we have a frame that matches cpu_switch(). */
read_memory (pcb->pcb_esp, (gdb_byte *) &sf, sizeof sf);
pcb->pcb_esp += sizeof (struct switchframe);
- regcache_raw_supply (regcache, I386_EDI_REGNUM, &sf.sf_edi);
- regcache_raw_supply (regcache, I386_ESI_REGNUM, &sf.sf_esi);
- regcache_raw_supply (regcache, I386_EBX_REGNUM, &sf.sf_ebx);
- regcache_raw_supply (regcache, I386_EIP_REGNUM, &sf.sf_eip);
+ regcache->raw_supply (I386_EDI_REGNUM, &sf.sf_edi);
+ regcache->raw_supply (I386_ESI_REGNUM, &sf.sf_esi);
+ regcache->raw_supply (I386_EBX_REGNUM, &sf.sf_ebx);
+ regcache->raw_supply (I386_EIP_REGNUM, &sf.sf_eip);
}
else
#endif
pcb->pcb_esp = pcb->pcb_ebp;
pcb->pcb_ebp = read_memory_integer(pcb->pcb_esp, 4, byte_order);
sf.sf_eip = read_memory_integer(pcb->pcb_esp + 4, 4, byte_order);
- regcache_raw_supply (regcache, I386_EIP_REGNUM, &sf.sf_eip);
+ regcache->raw_supply (I386_EIP_REGNUM, &sf.sf_eip);
}
- regcache_raw_supply (regcache, I386_EBP_REGNUM, &pcb->pcb_ebp);
- regcache_raw_supply (regcache, I386_ESP_REGNUM, &pcb->pcb_esp);
+ regcache->raw_supply (I386_EBP_REGNUM, &pcb->pcb_ebp);
+ regcache->raw_supply (I386_ESP_REGNUM, &pcb->pcb_esp);
return 1;
}
returned from _thread_machdep_switch. */
offset = i386obsd_uthread_reg_offset[I386_EIP_REGNUM] + 4;
store_unsigned_integer (buf, 4, byte_order, sp + offset);
- regcache_raw_supply (regcache, I386_ESP_REGNUM, buf);
+ regcache->raw_supply (I386_ESP_REGNUM, buf);
}
for (i = 0; i < ARRAY_SIZE (i386obsd_uthread_reg_offset); i++)
/* Read the saved register from the stack frame. */
read_memory (sp + i386obsd_uthread_reg_offset[i], buf, 4);
- regcache_raw_supply (regcache, i, buf);
+ regcache->raw_supply (i, buf);
}
}
}
{
if ((regnum == i || regnum == -1)
&& tdep->gregset_reg_offset[i] != -1)
- regcache_raw_supply (regcache, i, regs + tdep->gregset_reg_offset[i]);
+ regcache->raw_supply (i, regs + tdep->gregset_reg_offset[i]);
}
}
int regnum;
for (regnum = 0; regnum < I386_NUM_GREGS; regnum++)
- regcache_raw_supply (regcache, regnum, regp + regmap[regnum]);
+ regcache->raw_supply (regnum, regp + regmap[regnum]);
}
/* Fill register REGNUM (if it is a general-purpose register) in
{
if (fsave == NULL)
{
- regcache_raw_supply (regcache, i, NULL);
+ regcache->raw_supply (i, NULL);
continue;
}
val[2] = val[3] = 0;
if (i == I387_FOP_REGNUM (tdep))
val[1] &= ((1 << 3) - 1);
- regcache_raw_supply (regcache, i, val);
+ regcache->raw_supply (i, val);
}
else
- regcache_raw_supply (regcache, i, FSAVE_ADDR (tdep, regs, i));
+ regcache->raw_supply (i, FSAVE_ADDR (tdep, regs, i));
}
/* Provide dummy values for the SSE registers. */
for (i = I387_XMM0_REGNUM (tdep); i < I387_MXCSR_REGNUM (tdep); i++)
if (regnum == -1 || regnum == i)
- regcache_raw_supply (regcache, i, NULL);
+ regcache->raw_supply (i, NULL);
if (regnum == -1 || regnum == I387_MXCSR_REGNUM (tdep))
{
gdb_byte buf[4];
store_unsigned_integer (buf, 4, byte_order, I387_MXCSR_INIT_VAL);
- regcache_raw_supply (regcache, I387_MXCSR_REGNUM (tdep), buf);
+ regcache->raw_supply (I387_MXCSR_REGNUM (tdep), buf);
}
}
{
if (regs == NULL)
{
- regcache_raw_supply (regcache, i, NULL);
+ regcache->raw_supply (i, NULL);
continue;
}
val[0] = ftag & 0xff;
val[1] = (ftag >> 8) & 0xff;
}
- regcache_raw_supply (regcache, i, val);
+ regcache->raw_supply (i, val);
}
else
- regcache_raw_supply (regcache, i, FXSAVE_ADDR (tdep, regs, i));
+ regcache->raw_supply (i, FXSAVE_ADDR (tdep, regs, i));
}
if (regnum == I387_MXCSR_REGNUM (tdep) || regnum == -1)
{
if (regs == NULL)
- regcache_raw_supply (regcache, I387_MXCSR_REGNUM (tdep), NULL);
+ regcache->raw_supply (I387_MXCSR_REGNUM (tdep), NULL);
else
- regcache_raw_supply (regcache, I387_MXCSR_REGNUM (tdep),
+ regcache->raw_supply (I387_MXCSR_REGNUM (tdep),
FXSAVE_MXCSR_ADDR (regs));
}
}
case pkeys:
if ((clear_bv & X86_XSTATE_PKRU))
- regcache_raw_supply (regcache, regnum, zero);
+ regcache->raw_supply (regnum, zero);
else
- regcache_raw_supply (regcache, regnum,
- XSAVE_PKEYS_ADDR (tdep, regs, regnum));
+ regcache->raw_supply (regnum, XSAVE_PKEYS_ADDR (tdep, regs, regnum));
return;
case avx512_zmm_h:
if ((clear_bv & (X86_XSTATE_ZMM_H | X86_XSTATE_ZMM)))
- regcache_raw_supply (regcache, regnum, zero);
+ regcache->raw_supply (regnum, zero);
else
- regcache_raw_supply (regcache, regnum,
- XSAVE_AVX512_ZMM_H_ADDR (tdep, regs, regnum));
+ regcache->raw_supply (regnum,
+ XSAVE_AVX512_ZMM_H_ADDR (tdep, regs, regnum));
return;
case avx512_k:
if ((clear_bv & X86_XSTATE_K))
- regcache_raw_supply (regcache, regnum, zero);
+ regcache->raw_supply (regnum, zero);
else
- regcache_raw_supply (regcache, regnum,
- XSAVE_AVX512_K_ADDR (tdep, regs, regnum));
+ regcache->raw_supply (regnum, XSAVE_AVX512_K_ADDR (tdep, regs, regnum));
return;
case avx512_ymmh_avx512:
if ((clear_bv & X86_XSTATE_ZMM))
- regcache_raw_supply (regcache, regnum, zero);
+ regcache->raw_supply (regnum, zero);
else
- regcache_raw_supply (regcache, regnum,
- XSAVE_YMM_AVX512_ADDR (tdep, regs, regnum));
+ regcache->raw_supply (regnum,
+ XSAVE_YMM_AVX512_ADDR (tdep, regs, regnum));
return;
case avx512_xmm_avx512:
if ((clear_bv & X86_XSTATE_ZMM))
- regcache_raw_supply (regcache, regnum, zero);
+ regcache->raw_supply (regnum, zero);
else
- regcache_raw_supply (regcache, regnum,
- XSAVE_XMM_AVX512_ADDR (tdep, regs, regnum));
+ regcache->raw_supply (regnum,
+ XSAVE_XMM_AVX512_ADDR (tdep, regs, regnum));
return;
case avxh:
if ((clear_bv & X86_XSTATE_AVX))
- regcache_raw_supply (regcache, regnum, zero);
+ regcache->raw_supply (regnum, zero);
else
- regcache_raw_supply (regcache, regnum,
- XSAVE_AVXH_ADDR (tdep, regs, regnum));
+ regcache->raw_supply (regnum, XSAVE_AVXH_ADDR (tdep, regs, regnum));
return;
case mpx:
if ((clear_bv & X86_XSTATE_BNDREGS))
- regcache_raw_supply (regcache, regnum, zero);
+ regcache->raw_supply (regnum, zero);
else
- regcache_raw_supply (regcache, regnum,
- XSAVE_MPX_ADDR (tdep, regs, regnum));
+ regcache->raw_supply (regnum, XSAVE_MPX_ADDR (tdep, regs, regnum));
return;
case sse:
if ((clear_bv & X86_XSTATE_SSE))
- regcache_raw_supply (regcache, regnum, zero);
+ regcache->raw_supply (regnum, zero);
else
- regcache_raw_supply (regcache, regnum,
- FXSAVE_ADDR (tdep, regs, regnum));
+ regcache->raw_supply (regnum, FXSAVE_ADDR (tdep, regs, regnum));
return;
case x87:
if ((clear_bv & X86_XSTATE_X87))
- regcache_raw_supply (regcache, regnum, zero);
+ regcache->raw_supply (regnum, zero);
else
- regcache_raw_supply (regcache, regnum,
- FXSAVE_ADDR (tdep, regs, regnum));
+ regcache->raw_supply (regnum, FXSAVE_ADDR (tdep, regs, regnum));
return;
case all:
for (i = I387_PKRU_REGNUM (tdep);
i < I387_PKEYSEND_REGNUM (tdep);
i++)
- regcache_raw_supply (regcache, i, zero);
+ regcache->raw_supply (i, zero);
}
else
{
for (i = I387_PKRU_REGNUM (tdep);
i < I387_PKEYSEND_REGNUM (tdep);
i++)
- regcache_raw_supply (regcache, i,
- XSAVE_PKEYS_ADDR (tdep, regs, i));
+ regcache->raw_supply (i, XSAVE_PKEYS_ADDR (tdep, regs, i));
}
}
for (i = I387_ZMM0H_REGNUM (tdep);
i < I387_ZMMENDH_REGNUM (tdep);
i++)
- regcache_raw_supply (regcache, i, zero);
+ regcache->raw_supply (i, zero);
}
else
{
for (i = I387_ZMM0H_REGNUM (tdep);
i < I387_ZMMENDH_REGNUM (tdep);
i++)
- regcache_raw_supply (regcache, i,
- XSAVE_AVX512_ZMM_H_ADDR (tdep, regs, i));
+ regcache->raw_supply (i,
+ XSAVE_AVX512_ZMM_H_ADDR (tdep, regs, i));
}
}
for (i = I387_K0_REGNUM (tdep);
i < I387_KEND_REGNUM (tdep);
i++)
- regcache_raw_supply (regcache, i, zero);
+ regcache->raw_supply (i, zero);
}
else
{
for (i = I387_K0_REGNUM (tdep);
i < I387_KEND_REGNUM (tdep);
i++)
- regcache_raw_supply (regcache, i,
- XSAVE_AVX512_K_ADDR (tdep, regs, i));
+ regcache->raw_supply (i, XSAVE_AVX512_K_ADDR (tdep, regs, i));
}
}
for (i = I387_YMM16H_REGNUM (tdep);
i < I387_YMMH_AVX512_END_REGNUM (tdep);
i++)
- regcache_raw_supply (regcache, i, zero);
+ regcache->raw_supply (i, zero);
for (i = I387_XMM16_REGNUM (tdep);
i < I387_XMM_AVX512_END_REGNUM (tdep);
i++)
- regcache_raw_supply (regcache, i, zero);
+ regcache->raw_supply (i, zero);
}
else
{
for (i = I387_YMM16H_REGNUM (tdep);
i < I387_YMMH_AVX512_END_REGNUM (tdep);
i++)
- regcache_raw_supply (regcache, i,
- XSAVE_YMM_AVX512_ADDR (tdep, regs, i));
+ regcache->raw_supply (i, XSAVE_YMM_AVX512_ADDR (tdep, regs, i));
for (i = I387_XMM16_REGNUM (tdep);
i < I387_XMM_AVX512_END_REGNUM (tdep);
i++)
- regcache_raw_supply (regcache, i,
- XSAVE_XMM_AVX512_ADDR (tdep, regs, i));
+ regcache->raw_supply (i, XSAVE_XMM_AVX512_ADDR (tdep, regs, i));
}
}
/* Handle the upper YMM registers. */
for (i = I387_YMM0H_REGNUM (tdep);
i < I387_YMMENDH_REGNUM (tdep);
i++)
- regcache_raw_supply (regcache, i, zero);
+ regcache->raw_supply (i, zero);
}
else
{
for (i = I387_YMM0H_REGNUM (tdep);
i < I387_YMMENDH_REGNUM (tdep);
i++)
- regcache_raw_supply (regcache, i,
- XSAVE_AVXH_ADDR (tdep, regs, i));
+ regcache->raw_supply (i, XSAVE_AVXH_ADDR (tdep, regs, i));
}
}
{
for (i = I387_BND0R_REGNUM (tdep);
i < I387_BNDCFGU_REGNUM (tdep); i++)
- regcache_raw_supply (regcache, i, zero);
+ regcache->raw_supply (i, zero);
}
else
{
for (i = I387_BND0R_REGNUM (tdep);
i < I387_BNDCFGU_REGNUM (tdep); i++)
- regcache_raw_supply (regcache, i,
- XSAVE_MPX_ADDR (tdep, regs, i));
+ regcache->raw_supply (i, XSAVE_MPX_ADDR (tdep, regs, i));
}
}
{
for (i = I387_BNDCFGU_REGNUM (tdep);
i < I387_MPXEND_REGNUM (tdep); i++)
- regcache_raw_supply (regcache, i, zero);
+ regcache->raw_supply (i, zero);
}
else
{
for (i = I387_BNDCFGU_REGNUM (tdep);
i < I387_MPXEND_REGNUM (tdep); i++)
- regcache_raw_supply (regcache, i,
- XSAVE_MPX_ADDR (tdep, regs, i));
+ regcache->raw_supply (i, XSAVE_MPX_ADDR (tdep, regs, i));
}
}
for (i = I387_XMM0_REGNUM (tdep);
i < I387_MXCSR_REGNUM (tdep);
i++)
- regcache_raw_supply (regcache, i, zero);
+ regcache->raw_supply (i, zero);
}
else
{
for (i = I387_XMM0_REGNUM (tdep);
i < I387_MXCSR_REGNUM (tdep); i++)
- regcache_raw_supply (regcache, i,
- FXSAVE_ADDR (tdep, regs, i));
+ regcache->raw_supply (i, FXSAVE_ADDR (tdep, regs, i));
}
}
for (i = I387_ST0_REGNUM (tdep);
i < I387_FCTRL_REGNUM (tdep);
i++)
- regcache_raw_supply (regcache, i, zero);
+ regcache->raw_supply (i, zero);
}
else
{
for (i = I387_ST0_REGNUM (tdep);
i < I387_FCTRL_REGNUM (tdep);
i++)
- regcache_raw_supply (regcache, i, FXSAVE_ADDR (tdep, regs, i));
+ regcache->raw_supply (i, FXSAVE_ADDR (tdep, regs, i));
}
}
break;
store_unsigned_integer (buf, 4, byte_order,
I387_FCTRL_INIT_VAL);
- regcache_raw_supply (regcache, i, buf);
+ regcache->raw_supply (i, buf);
}
else if (i == I387_FTAG_REGNUM (tdep))
{
gdb_byte buf[4];
store_unsigned_integer (buf, 4, byte_order, 0xffff);
- regcache_raw_supply (regcache, i, buf);
+ regcache->raw_supply (i, buf);
}
else
- regcache_raw_supply (regcache, i, zero);
+ regcache->raw_supply (i, zero);
}
/* Most of the FPU control registers occupy only 16 bits in
the xsave extended state. Give those a special treatment. */
val[0] = ftag & 0xff;
val[1] = (ftag >> 8) & 0xff;
}
- regcache_raw_supply (regcache, i, val);
+ regcache->raw_supply (i, val);
}
else
- regcache_raw_supply (regcache, i, FXSAVE_ADDR (tdep, regs, i));
+ regcache->raw_supply (i, FXSAVE_ADDR (tdep, regs, i));
}
if (regnum == I387_MXCSR_REGNUM (tdep) || regnum == -1)
gdb_byte buf[4];
store_unsigned_integer (buf, 4, byte_order, I387_MXCSR_INIT_VAL);
- regcache_raw_supply (regcache, I387_MXCSR_REGNUM (tdep), buf);
+ regcache->raw_supply (I387_MXCSR_REGNUM (tdep), buf);
}
else
- regcache_raw_supply (regcache, I387_MXCSR_REGNUM (tdep),
- FXSAVE_MXCSR_ADDR (regs));
+ regcache->raw_supply (I387_MXCSR_REGNUM (tdep),
+ FXSAVE_MXCSR_ADDR (regs));
}
}
for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++)
{
- regcache_raw_supply (regcache, regi, regp + (regi - IA64_GR0_REGNUM));
+ regcache->raw_supply (regi, regp + (regi - IA64_GR0_REGNUM));
}
/* FIXME: NAT collection bits are at index 32; gotta deal with these
somehow... */
- regcache_raw_supply (regcache, IA64_PR_REGNUM, regp + 33);
+ regcache->raw_supply (IA64_PR_REGNUM, regp + 33);
for (regi = IA64_BR0_REGNUM; regi <= IA64_BR7_REGNUM; regi++)
{
- regcache_raw_supply (regcache, regi,
- regp + 34 + (regi - IA64_BR0_REGNUM));
+ regcache->raw_supply (regi, regp + 34 + (regi - IA64_BR0_REGNUM));
}
- regcache_raw_supply (regcache, IA64_IP_REGNUM, regp + 42);
- regcache_raw_supply (regcache, IA64_CFM_REGNUM, regp + 43);
- regcache_raw_supply (regcache, IA64_PSR_REGNUM, regp + 44);
- regcache_raw_supply (regcache, IA64_RSC_REGNUM, regp + 45);
- regcache_raw_supply (regcache, IA64_BSP_REGNUM, regp + 46);
- regcache_raw_supply (regcache, IA64_BSPSTORE_REGNUM, regp + 47);
- regcache_raw_supply (regcache, IA64_RNAT_REGNUM, regp + 48);
- regcache_raw_supply (regcache, IA64_CCV_REGNUM, regp + 49);
- regcache_raw_supply (regcache, IA64_UNAT_REGNUM, regp + 50);
- regcache_raw_supply (regcache, IA64_FPSR_REGNUM, regp + 51);
- regcache_raw_supply (regcache, IA64_PFS_REGNUM, regp + 52);
- regcache_raw_supply (regcache, IA64_LC_REGNUM, regp + 53);
- regcache_raw_supply (regcache, IA64_EC_REGNUM, regp + 54);
+ regcache->raw_supply (IA64_IP_REGNUM, regp + 42);
+ regcache->raw_supply (IA64_CFM_REGNUM, regp + 43);
+ regcache->raw_supply (IA64_PSR_REGNUM, regp + 44);
+ regcache->raw_supply (IA64_RSC_REGNUM, regp + 45);
+ regcache->raw_supply (IA64_BSP_REGNUM, regp + 46);
+ regcache->raw_supply (IA64_BSPSTORE_REGNUM, regp + 47);
+ regcache->raw_supply (IA64_RNAT_REGNUM, regp + 48);
+ regcache->raw_supply (IA64_CCV_REGNUM, regp + 49);
+ regcache->raw_supply (IA64_UNAT_REGNUM, regp + 50);
+ regcache->raw_supply (IA64_FPSR_REGNUM, regp + 51);
+ regcache->raw_supply (IA64_PFS_REGNUM, regp + 52);
+ regcache->raw_supply (IA64_LC_REGNUM, regp + 53);
+ regcache->raw_supply (IA64_EC_REGNUM, regp + 54);
}
void
for fr0/fr1 and always supply their expected values. */
/* fr0 is always read as zero. */
- regcache_raw_supply (regcache, IA64_FR0_REGNUM, f_zero);
+ regcache->raw_supply (IA64_FR0_REGNUM, f_zero);
/* fr1 is always read as one (1.0). */
- regcache_raw_supply (regcache, IA64_FR1_REGNUM, f_one);
+ regcache->raw_supply (IA64_FR1_REGNUM, f_one);
for (regi = IA64_FR2_REGNUM; regi <= IA64_FR127_REGNUM; regi++)
{
from = (const char *) &((*fpregsetp)[regi - IA64_FR0_REGNUM]);
- regcache_raw_supply (regcache, regi, from);
+ regcache->raw_supply (regi, from);
}
}
const gdb_byte zero[8] = { 0 };
gdb_assert (sizeof (zero) == register_size (gdbarch, regnum));
- regcache_raw_supply (regcache, regnum, zero);
+ regcache->raw_supply (regnum, zero);
return;
}
const gdb_byte f_zero[16] = { 0 };
gdb_assert (sizeof (f_zero) == register_size (gdbarch, regnum));
- regcache_raw_supply (regcache, regnum, f_zero);
+ regcache->raw_supply (regnum, f_zero);
return;
}
{ 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0xff, 0, 0, 0, 0, 0, 0 };
gdb_assert (sizeof (f_one) == register_size (gdbarch, regnum));
- regcache_raw_supply (regcache, regnum, f_one);
+ regcache->raw_supply (regnum, f_one);
return;
}
if (ia64_cannot_fetch_register (gdbarch, regnum))
{
- regcache_raw_supply (regcache, regnum, NULL);
+ regcache->raw_supply (regnum, NULL);
return;
}
addr += sizeof (PTRACE_TYPE_RET);
}
- regcache_raw_supply (regcache, regnum, buf);
+ regcache->raw_supply (regnum, buf);
}
/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
did the same. So ignore whatever might be recorded in fpregset_t
for fr0/fr1 and always supply their expected values. */
if (regnum == -1 || regnum == IA64_FR0_REGNUM)
- regcache_raw_supply (regcache, IA64_FR0_REGNUM, f_zero);
+ regcache->raw_supply (IA64_FR0_REGNUM, f_zero);
if (regnum == -1 || regnum == IA64_FR1_REGNUM)
- regcache_raw_supply (regcache, IA64_FR1_REGNUM, f_one);
+ regcache->raw_supply (IA64_FR1_REGNUM, f_one);
}
static const struct regset ia64_linux_gregset =
if (addr == (CORE_ADDR)-1
|| gdbarch_cannot_fetch_register (gdbarch, regnum))
{
- regcache_raw_supply (regcache, regnum, NULL);
+ regcache->raw_supply (regnum, NULL);
return;
}
addr += sizeof (PTRACE_TYPE_RET);
}
- regcache_raw_supply (regcache, regnum, buf);
+ regcache->raw_supply (regnum, buf);
}
/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
}
if (i != M32R_SP_REGNUM)
- regcache_raw_supply (regcache, i, ®val);
+ regcache->raw_supply (i, ®val);
else if (psw & 0x8000)
- regcache_raw_supply (regcache, i, regp + SPU_REGMAP);
+ regcache->raw_supply (i, regp + SPU_REGMAP);
else
- regcache_raw_supply (regcache, i, regp + SPI_REGMAP);
+ regcache->raw_supply (i, regp + SPI_REGMAP);
}
}
p = regs + m32r_pt_regs_offset[i];
}
- regcache_raw_supply (regcache, i, p);
+ regcache->raw_supply (i, p);
}
}
int regnum;
for (regnum = M68K_D0_REGNUM; regnum <= M68K_PC_REGNUM; regnum++)
- regcache_raw_supply (regcache, regnum, regs + regnum * 4);
+ regcache->raw_supply (regnum, regs + regnum * 4);
}
/* Supply the floating-point registers stored in FPREGS to REGCACHE. */
int regnum;
for (regnum = M68K_FP0_REGNUM; regnum <= M68K_FPI_REGNUM; regnum++)
- regcache_raw_supply (regcache, regnum,
- regs + m68kbsd_fpreg_offset (gdbarch, regnum));
+ regcache->raw_supply (regnum,
+ regs + m68kbsd_fpreg_offset (gdbarch, regnum));
}
/* Collect the general-purpose registers from REGCACHE and store them
return 0;
for (regnum = M68K_D2_REGNUM; regnum <= M68K_D7_REGNUM; regnum++)
- regcache_raw_supply (regcache, regnum, &pcb->pcb_regs[i++]);
+ regcache->raw_supply (regnum, &pcb->pcb_regs[i++]);
for (regnum = M68K_A2_REGNUM; regnum <= M68K_SP_REGNUM; regnum++)
- regcache_raw_supply (regcache, regnum, &pcb->pcb_regs[i++]);
+ regcache->raw_supply (regnum, &pcb->pcb_regs[i++]);
tmp = pcb->pcb_ps & 0xffff;
- regcache_raw_supply (regcache, M68K_PS_REGNUM, &tmp);
+ regcache->raw_supply (M68K_PS_REGNUM, &tmp);
read_memory (pcb->pcb_regs[PCB_REGS_FP] + 4, (char *) &tmp, sizeof tmp);
- regcache_raw_supply (regcache, M68K_PC_REGNUM, &tmp);
+ regcache->raw_supply (M68K_PC_REGNUM, &tmp);
return 1;
}
for (i = M68K_FP0_REGNUM; i <= M68K_PC_REGNUM; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_supply (regcache, i,
- regs + m68kbsd_fpreg_offset (gdbarch, i));
+ regcache->raw_supply (i, regs + m68kbsd_fpreg_offset (gdbarch, i));
}
}
for (i = M68K_D0_REGNUM; i <= M68K_PC_REGNUM; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_supply (regcache, i, regs + i * 4);
+ regcache->raw_supply (i, regs + i * 4);
}
if (len >= M68KBSD_SIZEOF_GREGS + M68KBSD_SIZEOF_FPREGS)
gdbarch_register_name (gdbarch, regno),
regno, safe_strerror (errno));
}
- regcache_raw_supply (regcache, regno, buf);
+ regcache->raw_supply (regno, buf);
}
/* Fetch register values from the inferior.
for (regi = M68K_D0_REGNUM;
regi <= gdbarch_sp_regnum (gdbarch);
regi++)
- regcache_raw_supply (regcache, regi, ®p[regmap[regi]]);
- regcache_raw_supply (regcache, gdbarch_ps_regnum (gdbarch),
- ®p[PT_SR]);
- regcache_raw_supply (regcache,
- gdbarch_pc_regnum (gdbarch), ®p[PT_PC]);
+ regcache->raw_supply (regi, ®p[regmap[regi]]);
+ regcache->raw_supply (gdbarch_ps_regnum (gdbarch), ®p[PT_SR]);
+ regcache->raw_supply (gdbarch_pc_regnum (gdbarch), ®p[PT_PC]);
}
/* Fill register REGNO (if it is a general-purpose register) in
for (regi = gdbarch_fp0_regnum (gdbarch);
regi < gdbarch_fp0_regnum (gdbarch) + 8; regi++)
- regcache_raw_supply (regcache, regi,
- FPREG_ADDR (fpregsetp,
- regi - gdbarch_fp0_regnum (gdbarch)));
- regcache_raw_supply (regcache, M68K_FPC_REGNUM, &fpregsetp->fpcntl[0]);
- regcache_raw_supply (regcache, M68K_FPS_REGNUM, &fpregsetp->fpcntl[1]);
- regcache_raw_supply (regcache, M68K_FPI_REGNUM, &fpregsetp->fpcntl[2]);
+ regcache->raw_supply
+ (regi, FPREG_ADDR (fpregsetp, regi - gdbarch_fp0_regnum (gdbarch)));
+ regcache->raw_supply (M68K_FPC_REGNUM, &fpregsetp->fpcntl[0]);
+ regcache->raw_supply (M68K_FPS_REGNUM, &fpregsetp->fpcntl[1]);
+ regcache->raw_supply (M68K_FPI_REGNUM, &fpregsetp->fpcntl[2]);
}
/* Fill register REGNO (if it is a floating-point register) in
struct gdbarch *gdbarch = regcache->arch ();
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG
&& register_size (gdbarch, regnum) == 4)
- regcache_raw_supply (regcache, regnum, buf + 4);
+ regcache->raw_supply (regnum, buf + 4);
else
- regcache_raw_supply (regcache, regnum, buf);
+ regcache->raw_supply (regnum, buf);
}
/* Unpack a 64-bit elf_gregset_t into GDB's register cache. */
= (const gdb_byte *) (*fpregsetp + (regi & ~1));
if ((gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) != (regi & 1))
reg_ptr += 4;
- regcache_raw_supply (regcache,
- gdbarch_fp0_regnum (gdbarch) + regi,
- reg_ptr);
+ regcache->raw_supply (gdbarch_fp0_regnum (gdbarch) + regi, reg_ptr);
}
else
for (regi = 0; regi < 32; regi++)
- regcache_raw_supply (regcache,
- gdbarch_fp0_regnum (gdbarch) + regi,
- (const char *) (*fpregsetp + regi));
+ regcache->raw_supply (gdbarch_fp0_regnum (gdbarch) + regi,
+ (const char *) (*fpregsetp + regi));
supply_32bit_reg (regcache, mips_regnum (gdbarch)->fp_control_status,
(const gdb_byte *) (*fpregsetp + 32));
for (i = MIPS_FP0_REGNUM; i <= MIPS_FSR_REGNUM; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_supply (regcache, i,
- regs + (i - MIPS_FP0_REGNUM) * regsize);
+ regcache->raw_supply (i, regs + (i - MIPS_FP0_REGNUM) * regsize);
}
}
for (i = 0; i <= MIPS_PC_REGNUM; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_supply (regcache, i, regs + i * regsize);
+ regcache->raw_supply (i, regs + i * regsize);
}
if (len >= (MIPSNBSD_NUM_GREGS + MIPSNBSD_NUM_FPREGS) * regsize)
if (regno == i || regno == -1)
{
if (gdbarch_cannot_fetch_register (gdbarch, i))
- regcache_raw_supply (regcache, i, NULL);
+ regcache->raw_supply (i, NULL);
else
- regcache_raw_supply (regcache, i,
- regs + (i * mips_isa_regsize (gdbarch)));
+ regcache->raw_supply
+ (i, regs + (i * mips_isa_regsize (gdbarch)));
}
}
}
if (regno == i || regno == -1)
{
if (gdbarch_cannot_fetch_register (gdbarch, i))
- regcache_raw_supply (regcache, i, NULL);
+ regcache->raw_supply (i, NULL);
else
- regcache_raw_supply (regcache, i,
- fpregs
+ regcache->raw_supply (i,
+ fpregs
+ ((i - gdbarch_fp0_regnum (gdbarch))
* mips_isa_regsize (gdbarch)));
}
int regnum;
for (regnum = MIPS_ZERO_REGNUM; regnum <= MIPS_PC_REGNUM; regnum++)
- regcache_raw_supply (regcache, regnum, regs + regnum * 8);
+ regcache->raw_supply (regnum, regs + regnum * 8);
for (regnum = MIPS_FP0_REGNUM; regnum <= MIPS_FSR_REGNUM; regnum++)
- regcache_raw_supply (regcache, regnum, regs + (regnum + 2) * 8);
+ regcache->raw_supply (regnum, regs + (regnum + 2) * 8);
}
/* Collect the general-purpose registers from REGCACHE and store them
for (i = 0; i < MIPS64OBSD_NUM_REGS; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_supply (regcache, i, regs + i * 8);
+ regcache->raw_supply (i, regs + i * 8);
}
}
switch (regnum) {
case E_D0_REGNUM:
- regcache_raw_supply (regcache, E_D0_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D0));
+ regcache->raw_supply (E_D0_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D0));
break;
case E_D1_REGNUM:
- regcache_raw_supply (regcache, E_D1_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D1));
+ regcache->raw_supply (E_D1_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D1));
break;
case E_D2_REGNUM:
- regcache_raw_supply (regcache, E_D2_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D2));
+ regcache->raw_supply (E_D2_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D2));
break;
case E_D3_REGNUM:
- regcache_raw_supply (regcache, E_D3_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D3));
+ regcache->raw_supply (E_D3_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D3));
break;
case E_A0_REGNUM:
- regcache_raw_supply (regcache, E_A0_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A0));
+ regcache->raw_supply (E_A0_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A0));
break;
case E_A1_REGNUM:
- regcache_raw_supply (regcache, E_A1_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A1));
+ regcache->raw_supply (E_A1_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A1));
break;
case E_A2_REGNUM:
- regcache_raw_supply (regcache, E_A2_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A2));
+ regcache->raw_supply (E_A2_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A2));
break;
case E_A3_REGNUM:
- regcache_raw_supply (regcache, E_A3_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A3));
+ regcache->raw_supply (E_A3_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A3));
break;
case E_SP_REGNUM:
- regcache_raw_supply (regcache, E_SP_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_SP));
+ regcache->raw_supply (E_SP_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_SP));
break;
case E_PC_REGNUM:
- regcache_raw_supply (regcache, E_PC_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_PC));
+ regcache->raw_supply (E_PC_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_PC));
break;
case E_MDR_REGNUM:
- regcache_raw_supply (regcache, E_MDR_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDR));
+ regcache->raw_supply (E_MDR_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDR));
break;
case E_PSW_REGNUM:
- regcache_raw_supply (regcache, E_PSW_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_EPSW));
+ regcache->raw_supply (E_PSW_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_EPSW));
break;
case E_LIR_REGNUM:
- regcache_raw_supply (regcache, E_LIR_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LIR));
+ regcache->raw_supply (E_LIR_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LIR));
break;
case E_LAR_REGNUM:
- regcache_raw_supply (regcache, E_LAR_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LAR));
+ regcache->raw_supply (E_LAR_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LAR));
break;
case E_MDRQ_REGNUM:
- regcache_raw_supply (regcache, E_MDRQ_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDRQ));
+ regcache->raw_supply (E_MDRQ_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDRQ));
break;
case E_E0_REGNUM:
- regcache_raw_supply (regcache, E_E0_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E0));
+ regcache->raw_supply (E_E0_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E0));
break;
case E_E1_REGNUM:
- regcache_raw_supply (regcache, E_E1_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E1));
+ regcache->raw_supply (E_E1_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E1));
break;
case E_E2_REGNUM:
- regcache_raw_supply (regcache, E_E2_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E2));
+ regcache->raw_supply (E_E2_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E2));
break;
case E_E3_REGNUM:
- regcache_raw_supply (regcache, E_E3_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E3));
+ regcache->raw_supply (E_E3_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E3));
break;
case E_E4_REGNUM:
- regcache_raw_supply (regcache, E_E4_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E4));
+ regcache->raw_supply (E_E4_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E4));
break;
case E_E5_REGNUM:
- regcache_raw_supply (regcache, E_E5_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E5));
+ regcache->raw_supply (E_E5_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E5));
break;
case E_E6_REGNUM:
- regcache_raw_supply (regcache, E_E6_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E6));
+ regcache->raw_supply (E_E6_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E6));
break;
case E_E7_REGNUM:
- regcache_raw_supply (regcache, E_E7_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E7));
+ regcache->raw_supply (E_E7_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E7));
break;
/* ssp, msp, and usp are inaccessible. */
regcache->raw_supply_zeroed (E_E10_REGNUM);
break;
case E_MCRH_REGNUM:
- regcache_raw_supply (regcache, E_MCRH_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRH));
+ regcache->raw_supply (E_MCRH_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRH));
break;
case E_MCRL_REGNUM:
- regcache_raw_supply (regcache, E_MCRL_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRL));
+ regcache->raw_supply (E_MCRL_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRL));
break;
case E_MCVF_REGNUM:
- regcache_raw_supply (regcache, E_MCVF_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCVF));
+ regcache->raw_supply (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_supply (regcache, E_FPCR_REGNUM,
- &fpregset->fpcr);
+ regcache->raw_supply (E_FPCR_REGNUM, &fpregset->fpcr);
else if (E_FS0_REGNUM <= regnum
&& regnum < E_FS0_REGNUM + MN10300_ELF_NFPREG)
- regcache_raw_supply (regcache, regnum,
- &fpregset->fpregs[regnum - E_FS0_REGNUM]);
+ regcache->raw_supply (regnum, &fpregset->fpregs[regnum - E_FS0_REGNUM]);
return;
}
if (regnum == -1 || regnum == regno)
{
if (reg_offsets[regno] != -1)
- regcache_raw_supply (regcache, regno,
- gregs + 4 * reg_offsets[regno]);
+ regcache->raw_supply (regno, gregs + 4 * reg_offsets[regno]);
else
- regcache_raw_supply (regcache, regno, zero_buf);
+ regcache->raw_supply (regno, zero_buf);
}
}
if (pcb->pcb_sp == 0)
return 0;
- regcache_raw_supply (regcache, gdbarch_sp_regnum (gdbarch), &pcb->pcb_sp);
- regcache_raw_supply (regcache, tdep->ppc_cr_regnum, &pcb->pcb_cr);
- regcache_raw_supply (regcache, tdep->ppc_lr_regnum, &pcb->pcb_lr);
+ regcache->raw_supply (gdbarch_sp_regnum (gdbarch), &pcb->pcb_sp);
+ regcache->raw_supply (tdep->ppc_cr_regnum, &pcb->pcb_cr);
+ regcache->raw_supply (tdep->ppc_lr_regnum, &pcb->pcb_lr);
for (i = 0, regnum = tdep->ppc_gp0_regnum + 14; i < 20; i++, regnum++)
- regcache_raw_supply (regcache, regnum, &pcb->pcb_context[i]);
+ regcache->raw_supply (regnum, &pcb->pcb_context[i]);
return 1;
}
int i;
for (i = 0; i < ppc_num_gprs; i++)
- regcache_raw_supply (regcache, tdep->ppc_ev0_upper_regnum + i,
- &evrregs.evr[i]);
+ regcache->raw_supply (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_supply (regcache, regno,
- &evrregs.evr[regno - tdep->ppc_ev0_upper_regnum]);
+ regcache->raw_supply (regno,
+ &evrregs.evr[regno - tdep->ppc_ev0_upper_regnum]);
if (regno == -1
|| regno == tdep->ppc_acc_regnum)
- regcache_raw_supply (regcache, tdep->ppc_acc_regnum, &evrregs.acc);
+ regcache->raw_supply (tdep->ppc_acc_regnum, &evrregs.acc);
if (regno == -1
|| regno == tdep->ppc_spefscr_regnum)
- regcache_raw_supply (regcache, tdep->ppc_spefscr_regnum,
- &evrregs.spefscr);
+ regcache->raw_supply (tdep->ppc_spefscr_regnum, &evrregs.spefscr);
}
static void
if (regaddr == -1)
{
memset (buf, '\0', register_size (gdbarch, regno)); /* Supply zeroes */
- regcache_raw_supply (regcache, regno, buf);
+ regcache->raw_supply (regno, buf);
return;
}
{
/* Little-endian values are always found at the left end of the
bytes transferred. */
- regcache_raw_supply (regcache, regno, buf);
+ regcache->raw_supply (regno, buf);
}
else if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
{
/* Big-endian values are found at the right end of the bytes
transferred. */
size_t padding = (bytes_transferred - register_size (gdbarch, regno));
- regcache_raw_supply (regcache, regno, buf + padding);
+ regcache->raw_supply (regno, buf + padding);
}
else
internal_error (__FILE__, __LINE__,
return 0;
read_memory (pcb->pcb_sp, (gdb_byte *)&sf, sizeof sf);
- regcache_raw_supply (regcache, tdep->ppc_cr_regnum, &sf.cr);
- regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 2, &sf.fixreg2);
+ regcache->raw_supply (tdep->ppc_cr_regnum, &sf.cr);
+ regcache->raw_supply (tdep->ppc_gp0_regnum + 2, &sf.fixreg2);
for (i = 0 ; i < 19 ; i++)
- regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 13 + i,
- &sf.fixreg[i]);
+ regcache->raw_supply (tdep->ppc_gp0_regnum + 13 + i, &sf.fixreg[i]);
read_memory(sf.sp, (gdb_byte *)&cf, sizeof(cf));
- regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 30, &cf.r30);
- regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 31, &cf.r31);
- regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 1, &cf.sp);
+ regcache->raw_supply (tdep->ppc_gp0_regnum + 30, &cf.r30);
+ regcache->raw_supply (tdep->ppc_gp0_regnum + 31, &cf.r31);
+ regcache->raw_supply (tdep->ppc_gp0_regnum + 1, &cf.sp);
read_memory(cf.sp, (gdb_byte *)&cf, sizeof(cf));
- regcache_raw_supply (regcache, tdep->ppc_lr_regnum, &cf.lr);
- regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch), &cf.lr);
+ regcache->raw_supply (tdep->ppc_lr_regnum, &cf.lr);
+ regcache->raw_supply (gdbarch_pc_regnum (gdbarch), &cf.lr);
return 1;
}
return 0;
read_memory (pcb->pcb_sp, (gdb_byte *)&sf, sizeof sf);
- regcache_raw_supply (regcache, gdbarch_sp_regnum (gdbarch), &sf.sp);
- regcache_raw_supply (regcache, tdep->ppc_cr_regnum, &sf.cr);
- regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 2, &sf.fixreg2);
+ regcache->raw_supply (gdbarch_sp_regnum (gdbarch), &sf.sp);
+ regcache->raw_supply (tdep->ppc_cr_regnum, &sf.cr);
+ regcache->raw_supply (tdep->ppc_gp0_regnum + 2, &sf.fixreg2);
for (i = 0, regnum = tdep->ppc_gp0_regnum + 13; i < 19; i++, regnum++)
- regcache_raw_supply (regcache, regnum, &sf.fixreg[i]);
+ regcache->raw_supply (regnum, &sf.fixreg[i]);
read_memory (sf.sp, (gdb_byte *)&cf, sizeof cf);
- regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch), &cf.lr);
- regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 30, &cf.r30);
- regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 31, &cf.r31);
+ regcache->raw_supply (gdbarch_pc_regnum (gdbarch), &cf.lr);
+ regcache->raw_supply (tdep->ppc_gp0_regnum + 30, &cf.r30);
+ regcache->raw_supply (tdep->ppc_gp0_regnum + 31, &cf.r31);
return 1;
}
buf = (gdb_byte *) alloca (buf_size);
read_memory (register_addr, buf, buf_size);
- regcache_raw_supply (regcache, regnum, buf);
+ regcache->raw_supply (regnum, buf);
}
/* Return true if, for a non-running thread, REGNUM has been saved on the
insn = btrace_insn_get (replay);
gdb_assert (insn != NULL);
- regcache_raw_supply (regcache, regno, &insn->pc);
+ regcache->raw_supply (regno, &insn->pc);
}
else
this->beneath->fetch_registers (regcache, regno);
write_part (regnum, offset, len, buf, false);
}
-/* Supply register REGNUM, whose contents are stored in BUF, to REGCACHE. */
-
-void
-regcache_raw_supply (struct regcache *regcache, int regnum, const void *buf)
-{
- gdb_assert (regcache != NULL);
- regcache->raw_supply (regnum, buf);
-}
-
void
detached_regcache::raw_supply (int regnum, const void *buf)
{
target. These functions are called by the target in response to a
target_fetch_registers() or target_store_registers(). */
-extern void regcache_raw_supply (struct regcache *regcache,
- int regnum, const void *buf);
extern void regcache_raw_collect (const struct regcache *regcache,
int regnum, void *buf);
: readable_regcache (gdbarch, has_pseudo)
{}
+ /* Supply register REGNUM, whose contents are stored in BUF, to REGCACHE. */
void raw_supply (int regnum, const void *buf);
void raw_supply (int regnum, const reg_buffer &src)
VEC_iterate (cached_reg_t, stop_reply->regcache, ix, reg);
ix++)
{
- regcache_raw_supply (regcache, reg->num, reg->data);
+ regcache->raw_supply (reg->num, reg->data);
xfree (reg->data);
}
/* If this register is unfetchable, tell the regcache. */
if (buf[0] == 'x')
{
- regcache_raw_supply (regcache, reg->regnum, NULL);
+ regcache->raw_supply (reg->regnum, NULL);
return 1;
}
regp[i++] = fromhex (p[0]) * 16 + fromhex (p[1]);
p += 2;
}
- regcache_raw_supply (regcache, reg->regnum, regp);
+ regcache->raw_supply (reg->regnum, regp);
return 1;
}
gdb_assert (r->offset * 2 < strlen (rs->buf));
/* The register isn't available, mark it as such (at
the same time setting the value to zero). */
- regcache_raw_supply (regcache, r->regnum, NULL);
+ regcache->raw_supply (r->regnum, NULL);
}
else
- regcache_raw_supply (regcache, r->regnum,
- regs + r->offset);
+ regcache->raw_supply (r->regnum, regs + r->offset);
}
}
}
return;
/* This register is not available. */
- regcache_raw_supply (regcache, reg->regnum, NULL);
+ regcache->raw_supply (reg->regnum, NULL);
return;
}
if (!fetch_register_using_p (regcache, &rsa->regs[i]))
{
/* This register is not available. */
- regcache_raw_supply (regcache, i, NULL);
+ regcache->raw_supply (i, NULL);
}
}
}
if (!errno)
- regcache_raw_supply (regcache, regno, (char *) addr);
+ regcache->raw_supply (regno, (char *) addr);
else
{
#if 0
&& gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
offset += regsize - gdb_regsize;
}
- regcache_raw_supply (regcache, regnum, regs + offset);
+ regcache->raw_supply (regnum, regs + offset);
}
}
pswa = extract_unsigned_integer ((const gdb_byte *) regp
+ S390_PSWA_OFFSET, 8, byte_order);
store_unsigned_integer (buf, 4, byte_order, (pswm >> 32) | 0x80000);
- regcache_raw_supply (regcache, S390_PSWM_REGNUM, buf);
+ regcache->raw_supply (S390_PSWM_REGNUM, buf);
store_unsigned_integer (buf, 4, byte_order,
(pswa & 0x7fffffff) | (pswm & 0x80000000));
- regcache_raw_supply (regcache, S390_PSWA_REGNUM, buf);
+ regcache->raw_supply (S390_PSWA_REGNUM, buf);
return;
}
#endif
}
store_unsigned_integer (reg, sz, gdbarch_byte_order (gdbarch), pswa);
- regcache_raw_supply (regcache, S390_PSWA_REGNUM, reg);
+ regcache->raw_supply (S390_PSWA_REGNUM, reg);
store_unsigned_integer (reg, sz, gdbarch_byte_order (gdbarch), pswm);
- regcache_raw_supply (regcache, S390_PSWM_REGNUM, reg);
+ regcache->raw_supply (S390_PSWM_REGNUM, reg);
}
/* Return the name of register REGNO. Return the empty string for
collect function will store the PC in that slot. */
if ((regnum == -1 || regnum == SCORE_EPC_REGNUM)
&& size >= SCORE7_LINUX_EPC_OFFSET + 4)
- regcache_raw_supply (regcache, SCORE_EPC_REGNUM,
- (const gdb_byte *) buf
- + SCORE7_LINUX_EPC_OFFSET);
+ regcache->raw_supply
+ (SCORE_EPC_REGNUM, (const gdb_byte *) buf + SCORE7_LINUX_EPC_OFFSET);
}
static const struct regset score7_linux_gregset =
{
if ((regnum == -1 || regnum == regmap[i].regnum)
&& regmap[i].offset + 4 <= len)
- regcache_raw_supply (regcache, regmap[i].regnum,
- (char *)regs + regmap[i].offset);
+ regcache->raw_supply
+ (regmap[i].regnum, (char *) regs + regmap[i].offset);
}
}
{
gdb_byte zero[8] = { 0 };
- regcache_raw_supply (regcache, SPARC_G0_REGNUM, &zero);
+ regcache->raw_supply (SPARC_G0_REGNUM, &zero);
return;
}
if (pcb->pcb_sp == 0)
return 0;
- regcache_raw_supply (regcache, SPARC_SP_REGNUM, &pcb->pcb_sp);
- regcache_raw_supply (regcache, SPARC_O7_REGNUM, &pcb->pcb_pc);
- regcache_raw_supply (regcache, SPARC32_PSR_REGNUM, &pcb->pcb_psr);
- regcache_raw_supply (regcache, SPARC32_WIM_REGNUM, &pcb->pcb_wim);
- regcache_raw_supply (regcache, SPARC32_PC_REGNUM, &pcb->pcb_pc);
+ regcache->raw_supply (SPARC_SP_REGNUM, &pcb->pcb_sp);
+ regcache->raw_supply (SPARC_O7_REGNUM, &pcb->pcb_pc);
+ regcache->raw_supply (SPARC32_PSR_REGNUM, &pcb->pcb_psr);
+ regcache->raw_supply (SPARC32_WIM_REGNUM, &pcb->pcb_wim);
+ regcache->raw_supply (SPARC32_PC_REGNUM, &pcb->pcb_pc);
sparc_supply_rwindow (regcache, pcb->pcb_sp, -1);
if (regnum == SPARC_SP_REGNUM || regnum == -1)
{
store_unsigned_integer (buf, 4, byte_order, fp);
- regcache_raw_supply (regcache, SPARC_SP_REGNUM, buf);
+ regcache->raw_supply (SPARC_SP_REGNUM, buf);
if (regnum == SPARC_SP_REGNUM)
return;
if (regnum == SPARC32_PC_REGNUM || regnum == -1)
{
store_unsigned_integer (buf, 4, byte_order, i7 + 8);
- regcache_raw_supply (regcache, SPARC32_PC_REGNUM, buf);
+ regcache->raw_supply (SPARC32_PC_REGNUM, buf);
}
if (regnum == SPARC32_NPC_REGNUM || regnum == -1)
{
store_unsigned_integer (buf, 4, byte_order, i7 + 12);
- regcache_raw_supply (regcache, SPARC32_NPC_REGNUM, buf);
+ regcache->raw_supply (SPARC32_NPC_REGNUM, buf);
}
if (regnum == SPARC32_PC_REGNUM || regnum == SPARC32_NPC_REGNUM)
buf = (gdb_byte *) alloca (buf_size);
read_memory (register_addr, buf, buf_size);
- regcache_raw_supply (regcache, regnum, buf);
+ regcache->raw_supply (regnum, buf);
}
/* Return true if, for a non-running thread, REGNUM has been saved on the
i7 ^ wcookie);
}
- regcache_raw_supply (regcache, i, buf);
+ regcache->raw_supply (i, buf);
}
}
}
i7 ^ wcookie);
}
- regcache_raw_supply (regcache, i, buf);
+ regcache->raw_supply (i, buf);
}
}
}
int i;
if (regnum == SPARC32_PSR_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, SPARC32_PSR_REGNUM,
- regs + gregmap->r_psr_offset);
+ regcache->raw_supply (SPARC32_PSR_REGNUM, regs + gregmap->r_psr_offset);
if (regnum == SPARC32_PC_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, SPARC32_PC_REGNUM,
- regs + gregmap->r_pc_offset);
+ regcache->raw_supply (SPARC32_PC_REGNUM, regs + gregmap->r_pc_offset);
if (regnum == SPARC32_NPC_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, SPARC32_NPC_REGNUM,
- regs + gregmap->r_npc_offset);
+ regcache->raw_supply (SPARC32_NPC_REGNUM, regs + gregmap->r_npc_offset);
if (regnum == SPARC32_Y_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, SPARC32_Y_REGNUM,
- regs + gregmap->r_y_offset);
+ regcache->raw_supply (SPARC32_Y_REGNUM, regs + gregmap->r_y_offset);
if (regnum == SPARC_G0_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, SPARC_G0_REGNUM, &zero);
+ regcache->raw_supply (SPARC_G0_REGNUM, &zero);
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_supply (regcache, i, regs + offset);
+ regcache->raw_supply (i, regs + offset);
offset += 4;
}
}
for (i = SPARC_L0_REGNUM; i <= SPARC_I7_REGNUM; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_supply (regcache, i, regs + offset);
+ regcache->raw_supply (i, regs + offset);
offset += 4;
}
}
for (i = 0; i < 32; i++)
{
if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1)
- regcache_raw_supply (regcache, SPARC_F0_REGNUM + i,
- regs + fpregmap->r_f0_offset + (i * 4));
+ regcache->raw_supply (SPARC_F0_REGNUM + i,
+ regs + fpregmap->r_f0_offset + (i * 4));
}
if (regnum == SPARC32_FSR_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, SPARC32_FSR_REGNUM,
- regs + fpregmap->r_fsr_offset);
+ regcache->raw_supply (SPARC32_FSR_REGNUM, regs + fpregmap->r_fsr_offset);
}
void
if (pcb->pcb_sp == 0)
return 0;
- regcache_raw_supply (regcache, SPARC_SP_REGNUM, &pcb->pcb_sp);
- regcache_raw_supply (regcache, SPARC64_PC_REGNUM, &pcb->pcb_pc);
+ regcache->raw_supply (SPARC_SP_REGNUM, &pcb->pcb_sp);
+ regcache->raw_supply (SPARC64_PC_REGNUM, &pcb->pcb_pc);
/* Synthesize %npc. */
pcb->pcb_pc += 4;
- regcache_raw_supply (regcache, SPARC64_NPC_REGNUM, &pcb->pcb_pc);
+ regcache->raw_supply (SPARC64_NPC_REGNUM, &pcb->pcb_pc);
/* Read `local' and `in' registers from the stack. */
sparc_supply_rwindow (regcache, pcb->pcb_sp, -1);
read_memory(pcb->pcb_sp + BIAS - 176 + (11 * 8),
(gdb_byte *)&pcb->pcb_pc, sizeof pcb->pcb_pc);
- regcache_raw_supply (regcache, SPARC_SP_REGNUM, &pcb->pcb_sp);
- regcache_raw_supply (regcache, SPARC64_PC_REGNUM, &pcb->pcb_pc);
+ regcache->raw_supply (SPARC_SP_REGNUM, &pcb->pcb_sp);
+ regcache->raw_supply (SPARC64_PC_REGNUM, &pcb->pcb_pc);
state = pcb->pcb_pstate << 8 | pcb->pcb_cwp;
- regcache_raw_supply (regcache, SPARC64_STATE_REGNUM, &state);
+ regcache->raw_supply (SPARC64_STATE_REGNUM, &state);
sparc_supply_rwindow (regcache, pcb->pcb_sp, -1);
read_memory(pcb->pcb_sp + BIAS - 176 + (11 * 8),
(gdb_byte *)&pcb->pcb_pc, sizeof pcb->pcb_pc);
- regcache_raw_supply (regcache, SPARC_SP_REGNUM, &pcb->pcb_sp);
- regcache_raw_supply (regcache, SPARC64_PC_REGNUM, &pcb->pcb_pc);
+ regcache->raw_supply (SPARC_SP_REGNUM, &pcb->pcb_sp);
+ regcache->raw_supply (SPARC64_PC_REGNUM, &pcb->pcb_pc);
state = pcb->pcb_pstate << 8 | pcb->pcb_cwp;
- regcache_raw_supply (regcache, SPARC64_STATE_REGNUM, &state);
+ regcache->raw_supply (SPARC64_STATE_REGNUM, &state);
sparc_supply_rwindow (regcache, pcb->pcb_sp, -1);
if (regnum == SPARC_SP_REGNUM || regnum == -1)
{
store_unsigned_integer (buf, 8, byte_order, fp);
- regcache_raw_supply (regcache, SPARC_SP_REGNUM, buf);
+ regcache->raw_supply (SPARC_SP_REGNUM, buf);
if (regnum == SPARC_SP_REGNUM)
return;
if (regnum == SPARC64_PC_REGNUM || regnum == -1)
{
store_unsigned_integer (buf, 8, byte_order, i7 + 8);
- regcache_raw_supply (regcache, SPARC64_PC_REGNUM, buf);
+ regcache->raw_supply (SPARC64_PC_REGNUM, buf);
}
if (regnum == SPARC64_NPC_REGNUM || regnum == -1)
{
store_unsigned_integer (buf, 8, byte_order, i7 + 12);
- regcache_raw_supply (regcache, SPARC64_NPC_REGNUM, buf);
+ regcache->raw_supply (SPARC64_NPC_REGNUM, buf);
}
if (regnum == SPARC64_PC_REGNUM || regnum == SPARC64_NPC_REGNUM)
psr = ((tstate & TSTATE_CWP) | PSR_S | ((tstate & TSTATE_ICC) >> 12)
| ((tstate & TSTATE_XCC) >> 20) | PSR_V8PLUS);
store_unsigned_integer (buf, 4, byte_order, psr);
- regcache_raw_supply (regcache, SPARC32_PSR_REGNUM, buf);
+ regcache->raw_supply (SPARC32_PSR_REGNUM, buf);
}
if (regnum == SPARC32_PC_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, SPARC32_PC_REGNUM,
- regs + gregmap->r_pc_offset + 4);
+ regcache->raw_supply (SPARC32_PC_REGNUM,
+ regs + gregmap->r_pc_offset + 4);
if (regnum == SPARC32_NPC_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, SPARC32_NPC_REGNUM,
- regs + gregmap->r_npc_offset + 4);
+ regcache->raw_supply (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_supply (regcache, SPARC32_Y_REGNUM, regs + offset);
+ regcache->raw_supply (SPARC32_Y_REGNUM, regs + offset);
}
}
else
{
if (regnum == SPARC64_STATE_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, SPARC64_STATE_REGNUM,
- regs + gregmap->r_tstate_offset);
+ regcache->raw_supply (SPARC64_STATE_REGNUM,
+ regs + gregmap->r_tstate_offset);
if (regnum == SPARC64_PC_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, SPARC64_PC_REGNUM,
- regs + gregmap->r_pc_offset);
+ regcache->raw_supply (SPARC64_PC_REGNUM,
+ regs + gregmap->r_pc_offset);
if (regnum == SPARC64_NPC_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, SPARC64_NPC_REGNUM,
- regs + gregmap->r_npc_offset);
+ regcache->raw_supply (SPARC64_NPC_REGNUM,
+ regs + gregmap->r_npc_offset);
if (regnum == SPARC64_Y_REGNUM || regnum == -1)
{
memset (buf, 0, 8);
memcpy (buf + 8 - gregmap->r_y_size,
regs + gregmap->r_y_offset, gregmap->r_y_size);
- regcache_raw_supply (regcache, SPARC64_Y_REGNUM, buf);
+ regcache->raw_supply (SPARC64_Y_REGNUM, buf);
}
if ((regnum == SPARC64_FPRS_REGNUM || regnum == -1)
&& gregmap->r_fprs_offset != -1)
- regcache_raw_supply (regcache, SPARC64_FPRS_REGNUM,
- regs + gregmap->r_fprs_offset);
+ regcache->raw_supply (SPARC64_FPRS_REGNUM,
+ regs + gregmap->r_fprs_offset);
}
if (regnum == SPARC_G0_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, SPARC_G0_REGNUM, &zero);
+ regcache->raw_supply (SPARC_G0_REGNUM, &zero);
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_supply (regcache, i, regs + offset);
+ regcache->raw_supply (i, regs + offset);
offset += 8;
}
}
for (i = SPARC_L0_REGNUM; i <= SPARC_I7_REGNUM; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_supply (regcache, i, regs + offset);
+ regcache->raw_supply (i, regs + offset);
offset += 8;
}
}
for (i = 0; i < 32; i++)
{
if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1)
- regcache_raw_supply (regcache, SPARC_F0_REGNUM + i,
+ regcache->raw_supply (SPARC_F0_REGNUM + i,
regs + fpregmap->r_f0_offset + (i * 4));
}
if (sparc32)
{
if (regnum == SPARC32_FSR_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, SPARC32_FSR_REGNUM,
+ regcache->raw_supply (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_supply (regcache, SPARC64_F32_REGNUM + i,
- (regs + fpregmap->r_f0_offset
- + (32 * 4) + (i * 8)));
+ regcache->raw_supply
+ (SPARC64_F32_REGNUM + i,
+ regs + fpregmap->r_f0_offset + (32 * 4) + (i * 8));
}
if (regnum == SPARC64_FSR_REGNUM || regnum == -1)
- regcache_raw_supply (regcache, SPARC64_FSR_REGNUM,
- regs + fpregmap->r_fsr_offset);
+ regcache->raw_supply (SPARC64_FSR_REGNUM,
+ regs + fpregmap->r_fsr_offset);
}
}
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
gdb_byte buf[4];
store_unsigned_integer (buf, 4, byte_order, fd);
- regcache_raw_supply (regcache, SPU_ID_REGNUM, buf);
+ regcache->raw_supply (SPU_ID_REGNUM, buf);
}
/* The NPC register is found at ADDR. */
{
gdb_byte buf[4];
if (fetch_ppc_memory (addr, buf, 4) == 0)
- regcache_raw_supply (regcache, SPU_PC_REGNUM, buf);
+ regcache->raw_supply (SPU_PC_REGNUM, buf);
}
/* The GPRs are found in the "regs" spufs file. */
== TARGET_XFER_OK)
&& len == sizeof buf)
for (i = 0; i < SPU_NUM_GPRS; i++)
- regcache_raw_supply (regcache, i, buf + i*16);
+ regcache->raw_supply (i, buf + i*16);
}
}
{
gdb_byte buf[4];
store_unsigned_integer (buf, 4, byte_order, spufs_fd);
- regcache_raw_supply (regcache, SPU_ID_REGNUM, buf);
+ regcache->raw_supply (SPU_ID_REGNUM, buf);
}
/* The NPC register is found in PPC memory at SPUFS_ADDR. */
if (target_read (ops_beneath, TARGET_OBJECT_MEMORY, NULL,
buf, spufs_addr, sizeof buf) == sizeof buf)
- regcache_raw_supply (regcache, SPU_PC_REGNUM, buf);
+ regcache->raw_supply (SPU_PC_REGNUM, buf);
}
/* The GPRs are found in the "regs" spufs file. */
if (target_read (ops_beneath, TARGET_OBJECT_SPU, annex,
buf, 0, sizeof buf) == sizeof buf)
for (i = 0; i < SPU_NUM_GPRS; i++)
- regcache_raw_supply (regcache, i, buf + i*16);
+ regcache->raw_supply (i, buf + i*16);
}
}
for (i = 0; i < sizeof (regmap) / sizeof (regmap[0]); i++)
if (regmap[i] >= 0)
- regcache_raw_supply (regcache, i, regp + regmap[i]);
+ regcache->raw_supply (i, regp + regmap[i]);
}
/* Fill registers in *GREGSETPS with the values in GDB's
{
if (regno == regn)
{
- regcache_raw_supply (regcache, regno, regs + offset);
+ regcache->raw_supply (regno, regs + offset);
break;
}
else if (regno == -1)
{
- regcache_raw_supply (regcache, regn, regs + offset);
+ regcache->raw_supply (regn, regs + offset);
}
}
}
/* We get here if no register data has been found. Mark registers
as unavailable. */
for (regn = 0; regn < gdbarch_num_regs (gdbarch); regn++)
- regcache_raw_supply (regcache, regn, NULL);
+ regcache->raw_supply (regn, NULL);
/* We can often usefully guess that the PC is going to be the same
as the address of the tracepoint. */
int regnum;
for (regnum = 0; regnum < VAX_NUM_REGS; regnum++)
- regcache_raw_supply (regcache, regnum, regs + regnum * 4);
+ regcache->raw_supply (regnum, regs + regnum * 4);
}
/* Collect the general-purpose registers from REGCACHE and store them
return 0;
for (regnum = VAX_R0_REGNUM; regnum < VAX_AP_REGNUM; regnum++)
- regcache_raw_supply (regcache, regnum, &pcb->R[regnum - VAX_R0_REGNUM]);
- regcache_raw_supply (regcache, VAX_AP_REGNUM, &pcb->AP);
- regcache_raw_supply (regcache, VAX_FP_REGNUM, &pcb->FP);
- regcache_raw_supply (regcache, VAX_SP_REGNUM, &pcb->KSP);
- regcache_raw_supply (regcache, VAX_PC_REGNUM, &pcb->PC);
- regcache_raw_supply (regcache, VAX_PS_REGNUM, &pcb->PSL);
+ regcache->raw_supply (regnum, &pcb->R[regnum - VAX_R0_REGNUM]);
+ regcache->raw_supply (VAX_AP_REGNUM, &pcb->AP);
+ regcache->raw_supply (VAX_FP_REGNUM, &pcb->FP);
+ regcache->raw_supply (VAX_SP_REGNUM, &pcb->KSP);
+ regcache->raw_supply (VAX_PC_REGNUM, &pcb->PC);
+ regcache->raw_supply (VAX_PS_REGNUM, &pcb->PSL);
return 1;
}
for (i = 0; i < VAX_NUM_REGS; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_supply (regcache, i, regs + i * 4);
+ regcache->raw_supply (i, regs + i * 4);
}
}
if (r == I387_FISEG_REGNUM (tdep))
{
l = *((long *) context_offset) & 0xffff;
- regcache_raw_supply (regcache, r, (char *) &l);
+ regcache->raw_supply (r, (char *) &l);
}
else if (r == I387_FOP_REGNUM (tdep))
{
l = (*((long *) context_offset) >> 16) & ((1 << 11) - 1);
- regcache_raw_supply (regcache, r, (char *) &l);
+ regcache->raw_supply (r, (char *) &l);
}
else if (segment_register_p (r))
{
in fact only 16 bits long. Make sure we do not read extra
bits from our source buffer. */
l = *((long *) context_offset) & 0xffff;
- regcache_raw_supply (regcache, r, (char *) &l);
+ regcache->raw_supply (r, (char *) &l);
}
else if (r >= 0)
- regcache_raw_supply (regcache, r, context_offset);
+ regcache->raw_supply (r, context_offset);
else
{
for (r = 0; r < gdbarch_num_regs (gdbarch); r++)
struct gdbarch *gdbarch = regcache->arch ();
if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1)
- regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch), ®s->pc);
+ regcache->raw_supply (gdbarch_pc_regnum (gdbarch), ®s->pc);
if (regnum == gdbarch_ps_regnum (gdbarch) || regnum == -1)
- regcache_raw_supply (regcache, gdbarch_ps_regnum (gdbarch), ®s->ps);
+ regcache->raw_supply (gdbarch_ps_regnum (gdbarch), ®s->ps);
if (regnum == gdbarch_tdep (gdbarch)->wb_regnum || regnum == -1)
- regcache_raw_supply (regcache,
- gdbarch_tdep (gdbarch)->wb_regnum,
+ regcache->raw_supply (gdbarch_tdep (gdbarch)->wb_regnum,
®s->windowbase);
if (regnum == gdbarch_tdep (gdbarch)->ws_regnum || regnum == -1)
- regcache_raw_supply (regcache,
- gdbarch_tdep (gdbarch)->ws_regnum,
+ regcache->raw_supply (gdbarch_tdep (gdbarch)->ws_regnum,
®s->windowstart);
if (regnum == gdbarch_tdep (gdbarch)->lbeg_regnum || regnum == -1)
- regcache_raw_supply (regcache,
- gdbarch_tdep (gdbarch)->lbeg_regnum,
+ regcache->raw_supply (gdbarch_tdep (gdbarch)->lbeg_regnum,
®s->lbeg);
if (regnum == gdbarch_tdep (gdbarch)->lend_regnum || regnum == -1)
- regcache_raw_supply (regcache,
- gdbarch_tdep (gdbarch)->lend_regnum,
+ regcache->raw_supply (gdbarch_tdep (gdbarch)->lend_regnum,
®s->lend);
if (regnum == gdbarch_tdep (gdbarch)->lcount_regnum || regnum == -1)
- regcache_raw_supply (regcache,
- gdbarch_tdep (gdbarch)->lcount_regnum,
+ regcache->raw_supply (gdbarch_tdep (gdbarch)->lcount_regnum,
®s->lcount);
if (regnum == gdbarch_tdep (gdbarch)->sar_regnum || regnum == -1)
- regcache_raw_supply (regcache,
- gdbarch_tdep (gdbarch)->sar_regnum,
+ regcache->raw_supply (gdbarch_tdep (gdbarch)->sar_regnum,
®s->sar);
if (regnum == gdbarch_tdep (gdbarch)->threadptr_regnum || regnum == -1)
- regcache_raw_supply (regcache,
- gdbarch_tdep (gdbarch)->threadptr_regnum,
+ regcache->raw_supply (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_supply (regcache,regnum,
+ regcache->raw_supply (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_supply (regcache,
- gdbarch_tdep (gdbarch)->ar_base + i,
+ regcache->raw_supply (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_supply (regcache, regnum,
- ®s->ar[(4 * regs->windowbase + regnum
- - gdbarch_tdep (gdbarch)->a0_base)
+ regcache->raw_supply (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_supply (regcache,
- gdbarch_tdep (gdbarch)->a0_base + i,
- ®s->ar[(4 * regs->windowbase + i)
- % gdbarch_tdep (gdbarch)->num_aregs]);
+ regcache->raw_supply (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_supply (regcache, ptr->gdb_regnum,
- xtregs + ptr->ptrace_offset);
+ regcache->raw_supply (ptr->gdb_regnum, xtregs + ptr->ptrace_offset);
}
static void
DEBUGTRACE ("xtensa_supply_gregset (..., regnum==%d, ...)\n", regnum);
if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1)
- regcache_raw_supply (rc, gdbarch_pc_regnum (gdbarch), (char *) ®s->pc);
+ rc->raw_supply (gdbarch_pc_regnum (gdbarch), (char *) ®s->pc);
if (regnum == gdbarch_ps_regnum (gdbarch) || regnum == -1)
- regcache_raw_supply (rc, gdbarch_ps_regnum (gdbarch), (char *) ®s->ps);
+ rc->raw_supply (gdbarch_ps_regnum (gdbarch), (char *) ®s->ps);
if (regnum == gdbarch_tdep (gdbarch)->wb_regnum || regnum == -1)
- regcache_raw_supply (rc, gdbarch_tdep (gdbarch)->wb_regnum,
- (char *) ®s->windowbase);
+ rc->raw_supply (gdbarch_tdep (gdbarch)->wb_regnum,
+ (char *) ®s->windowbase);
if (regnum == gdbarch_tdep (gdbarch)->ws_regnum || regnum == -1)
- regcache_raw_supply (rc, gdbarch_tdep (gdbarch)->ws_regnum,
- (char *) ®s->windowstart);
+ rc->raw_supply (gdbarch_tdep (gdbarch)->ws_regnum,
+ (char *) ®s->windowstart);
if (regnum == gdbarch_tdep (gdbarch)->lbeg_regnum || regnum == -1)
- regcache_raw_supply (rc, gdbarch_tdep (gdbarch)->lbeg_regnum,
- (char *) ®s->lbeg);
+ rc->raw_supply (gdbarch_tdep (gdbarch)->lbeg_regnum,
+ (char *) ®s->lbeg);
if (regnum == gdbarch_tdep (gdbarch)->lend_regnum || regnum == -1)
- regcache_raw_supply (rc, gdbarch_tdep (gdbarch)->lend_regnum,
- (char *) ®s->lend);
+ rc->raw_supply (gdbarch_tdep (gdbarch)->lend_regnum,
+ (char *) ®s->lend);
if (regnum == gdbarch_tdep (gdbarch)->lcount_regnum || regnum == -1)
- regcache_raw_supply (rc, gdbarch_tdep (gdbarch)->lcount_regnum,
- (char *) ®s->lcount);
+ rc->raw_supply (gdbarch_tdep (gdbarch)->lcount_regnum,
+ (char *) ®s->lcount);
if (regnum == gdbarch_tdep (gdbarch)->sar_regnum || regnum == -1)
- regcache_raw_supply (rc, gdbarch_tdep (gdbarch)->sar_regnum,
- (char *) ®s->sar);
+ rc->raw_supply (gdbarch_tdep (gdbarch)->sar_regnum,
+ (char *) ®s->sar);
if (regnum >=gdbarch_tdep (gdbarch)->ar_base
&& regnum < gdbarch_tdep (gdbarch)->ar_base
+ gdbarch_tdep (gdbarch)->num_aregs)
- regcache_raw_supply (rc, regnum,
- (char *) ®s->ar[regnum - gdbarch_tdep
- (gdbarch)->ar_base]);
+ rc->raw_supply
+ (regnum, (char *) ®s->ar[regnum - gdbarch_tdep (gdbarch)->ar_base]);
else if (regnum == -1)
{
for (i = 0; i < gdbarch_tdep (gdbarch)->num_aregs; ++i)
- regcache_raw_supply (rc, gdbarch_tdep (gdbarch)->ar_base + i,
- (char *) ®s->ar[i]);
+ rc->raw_supply (gdbarch_tdep (gdbarch)->ar_base + i,
+ (char *) ®s->ar[i]);
}
}