Use regcache_raw_supply instead of supply_register.
* regcache.h (supply_register): Delete declaration.
* regcache.c (supply_register): Delete function.
* wince.c (do_child_fetch_inferior_registers): Update.
* win32-nat.c (do_child_fetch_inferior_registers)
(fetch_elf_core_registers): Update.
* v850ice.c (v850ice_fetch_registers): Update.
* thread-db.c (thread_db_store_registers): Update.
* sol-thread.c (sol_thread_store_registers): Update.
* shnbsd-tdep.c (shnbsd_supply_reg): Update.
* rs6000-nat.c (fetch_register): Update.
* rom68k-rom.c (rom68k_supply_one_register): Update.
* remote.c (remote_wait, remote_async_wait): Update.
* remote-st.c (get_hex_regs): Update.
* remote-sim.c (gdbsim_fetch_register): Update.
* remote-sds.c (sds_fetch_registers): Update.
* remote-rdp.c (remote_rdp_fetch_register): Update.
* remote-rdi.c (arm_rdi_fetch_registers): Update.
* remote-mips.c (mips_wait, mips_fetch_registers): Update.
* remote-m32r-sdi.c (m32r_fetch_register): Update.
* remote-hms.c (init_hms_cmds): Update.
* remote-est.c (init_est_cmds): Update.
* remote-e7000.c (get_hex_regs, fetch_regs_from_dump)
(e7000_fetch_registers, sub2_from_pc, e7000_wait): Update.
* ppcnbsd-tdep.c (ppcnbsd_supply_reg, ppcnbsd_supply_fpreg): Update.
* ppc-linux-nat.c (fetch_altivec_register, fetch_spe_register)
(fetch_register, supply_vrregset, supply_vrregset)
(fetch_spe_registers): Update.
* ppc-bdm.c (bdm_ppc_fetch_registers): Update.
* monitor.c (monitor_supply_register): Update.
* mipsv4-nat.c (supply_gregset, supply_fpregset): Update.
* mipsnbsd-tdep.c (mipsnbsd_supply_reg)
(mipsnbsd_supply_fpreg): Update.
* mips-nat.c (fetch_inferior_registers)
(fetch_core_registers): Update.
* mips-linux-tdep.c (supply_32bit_reg, supply_gregset)
(supply_fpregset, mips64_supply_gregset)
(mips64_supply_fpregset): Update.
* m68klinux-nat.c (fetch_register, supply_gregset)
(supply_fpregset): Update.
* m68k-tdep.c (supply_gregset, supply_fpregset): Update.
* m32r-rom.c (init_m32r_cmds, init_mon2000_cmds): Update.
* lynx-nat.c (fetch_inferior_registers, fetch_core_registers): Update.
* irix5-nat.c (supply_gregset, supply_fpregset): Update.
* infptrace.c (fetch_register): Update.
* ia64-linux-nat.c (supply_gregset, supply_fpregset): Update.
* ia64-aix-nat.c (supply_gregset, supply_fpregset): Update.
* i386gnu-nat.c (fetch_fpregs, supply_gregset)
(gnu_fetch_registers, gnu_store_registers): Update.
* i386-nto-tdep.c (i386nto_supply_gregset): Update.
* i386-linux-nat.c (fetch_register, supply_gregset)
(dummy_sse_values): Update.
* hpux-thread.c (hpux_thread_fetch_registers): Update.
* hppah-nat.c (fetch_register): Update.
* hppa-linux-nat.c (fetch_register, supply_gregset)
(supply_fpregset): Update.
* go32-nat.c (fetch_register): Update.
* dve3900-rom.c (fetch_bitmapped_register)
(_initialize_r3900_rom): Update.
* cris-tdep.c (supply_gregset): Update.
* abug-rom.c (init_abug_cmds): Update.
* core-aout.c (fetch_core_registers): Update.
* armnbsd-nat.c (supply_gregset, supply_fparegset)
(fetch_register, fetch_fp_register): Update.
* arm-linux-nat.c (fetch_nwfpe_single, fetch_nwfpe_none)
(fetch_nwfpe_extended, fetch_fpregister, fetch_fpregs)
(fetch_register, fetch_regs, supply_gregset, supply_fpregset): Update.
* alphanbsd-tdep.c (fetch_core_registers): Update.
* alpha-tdep.c (alpha_supply_int_regs, alpha_supply_fp_regs): Update.
* alpha-nat.c (fetch_osf_core_registers)
(fetch_osf_core_registers, fetch_osf_core_registers): Update.
* aix-thread.c (supply_gprs64, supply_reg32, supply_fprs)
(supply_sprs64, supply_sprs32, fetch_regs_kernel_thread): Update.
+2004-07-21 Andrew Cagney <cagney@gnu.org>
+
+ Use regcache_raw_supply instead of supply_register.
+ * regcache.h (supply_register): Delete declaration.
+ * regcache.c (supply_register): Delete function.
+ * wince.c (do_child_fetch_inferior_registers): Update.
+ * win32-nat.c (do_child_fetch_inferior_registers)
+ (fetch_elf_core_registers): Update.
+ * v850ice.c (v850ice_fetch_registers): Update.
+ * thread-db.c (thread_db_store_registers): Update.
+ * sol-thread.c (sol_thread_store_registers): Update.
+ * shnbsd-tdep.c (shnbsd_supply_reg): Update.
+ * rs6000-nat.c (fetch_register): Update.
+ * rom68k-rom.c (rom68k_supply_one_register): Update.
+ * remote.c (remote_wait, remote_async_wait): Update.
+ * remote-st.c (get_hex_regs): Update.
+ * remote-sim.c (gdbsim_fetch_register): Update.
+ * remote-sds.c (sds_fetch_registers): Update.
+ * remote-rdp.c (remote_rdp_fetch_register): Update.
+ * remote-rdi.c (arm_rdi_fetch_registers): Update.
+ * remote-mips.c (mips_wait, mips_fetch_registers): Update.
+ * remote-m32r-sdi.c (m32r_fetch_register): Update.
+ * remote-hms.c (init_hms_cmds): Update.
+ * remote-est.c (init_est_cmds): Update.
+ * remote-e7000.c (get_hex_regs, fetch_regs_from_dump)
+ (e7000_fetch_registers, sub2_from_pc, e7000_wait): Update.
+ * ppcnbsd-tdep.c (ppcnbsd_supply_reg, ppcnbsd_supply_fpreg): Update.
+ * ppc-linux-nat.c (fetch_altivec_register, fetch_spe_register)
+ (fetch_register, supply_vrregset, supply_vrregset)
+ (fetch_spe_registers): Update.
+ * ppc-bdm.c (bdm_ppc_fetch_registers): Update.
+ * monitor.c (monitor_supply_register): Update.
+ * mipsv4-nat.c (supply_gregset, supply_fpregset): Update.
+ * mipsnbsd-tdep.c (mipsnbsd_supply_reg)
+ (mipsnbsd_supply_fpreg): Update.
+ * mips-nat.c (fetch_inferior_registers)
+ (fetch_core_registers): Update.
+ * mips-linux-tdep.c (supply_32bit_reg, supply_gregset)
+ (supply_fpregset, mips64_supply_gregset)
+ (mips64_supply_fpregset): Update.
+ * m68klinux-nat.c (fetch_register, supply_gregset)
+ (supply_fpregset): Update.
+ * m68k-tdep.c (supply_gregset, supply_fpregset): Update.
+ * m32r-rom.c (init_m32r_cmds, init_mon2000_cmds): Update.
+ * lynx-nat.c (fetch_inferior_registers, fetch_core_registers): Update.
+ * irix5-nat.c (supply_gregset, supply_fpregset): Update.
+ * infptrace.c (fetch_register): Update.
+ * ia64-linux-nat.c (supply_gregset, supply_fpregset): Update.
+ * ia64-aix-nat.c (supply_gregset, supply_fpregset): Update.
+ * i386gnu-nat.c (fetch_fpregs, supply_gregset)
+ (gnu_fetch_registers, gnu_store_registers): Update.
+ * i386-nto-tdep.c (i386nto_supply_gregset): Update.
+ * i386-linux-nat.c (fetch_register, supply_gregset)
+ (dummy_sse_values): Update.
+ * hpux-thread.c (hpux_thread_fetch_registers): Update.
+ * hppah-nat.c (fetch_register): Update.
+ * hppa-linux-nat.c (fetch_register, supply_gregset)
+ (supply_fpregset): Update.
+ * go32-nat.c (fetch_register): Update.
+ * dve3900-rom.c (fetch_bitmapped_register)
+ (_initialize_r3900_rom): Update.
+ * cris-tdep.c (supply_gregset): Update.
+ * abug-rom.c (init_abug_cmds): Update.
+ * core-aout.c (fetch_core_registers): Update.
+ * armnbsd-nat.c (supply_gregset, supply_fparegset)
+ (fetch_register, fetch_fp_register): Update.
+ * arm-linux-nat.c (fetch_nwfpe_single, fetch_nwfpe_none)
+ (fetch_nwfpe_extended, fetch_fpregister, fetch_fpregs)
+ (fetch_register, fetch_regs, supply_gregset, supply_fpregset): Update.
+ * alphanbsd-tdep.c (fetch_core_registers): Update.
+ * alpha-tdep.c (alpha_supply_int_regs, alpha_supply_fp_regs): Update.
+ * alpha-nat.c (fetch_osf_core_registers)
+ (fetch_osf_core_registers, fetch_osf_core_registers): Update.
+ * aix-thread.c (supply_gprs64, supply_reg32, supply_fprs)
+ (supply_sprs64, supply_sprs32, fetch_regs_kernel_thread): Update.
+
2004-07-21 Andrew Cagney <cagney@gnu.org>
* PROBLEMS: Mention breakpoints/1702.
abug_cmds.getreg.term_cmd = ".\r"; /* getreg.term_cmd */
abug_cmds.dump_registers = "rd\r"; /* dump_registers */
abug_cmds.register_pattern = "\\(\\w+\\) +=\\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
- abug_cmds.supply_register = abug_supply_register; /* supply_register */
+ abug_cmds.supply_register = abug_supply_register;
abug_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
abug_cmds.load = "lo 0\r"; /* download command */
abug_cmds.loadresp = "\n"; /* load response */
int regno;
for (regno = 0; regno < ppc_num_gprs; regno++)
- supply_register (tdep->ppc_gp0_regnum + regno, (char *) (vals + regno));
+ regcache_raw_supply (current_regcache, tdep->ppc_gp0_regnum + regno,
+ (char *) (vals + regno));
}
/* Record that 32-bit register REGNO contains VAL. */
static void
supply_reg32 (int regno, uint32_t val)
{
- supply_register (regno, (char *) &val);
+ regcache_raw_supply (current_regcache, regno, (char *) &val);
}
/* Record that the floating-point registers contain VALS. */
gdb_assert (ppc_floating_point_unit_p (current_gdbarch));
for (regno = 0; regno < ppc_num_fprs; regno++)
- supply_register (regno + tdep->ppc_fp0_regnum, (char *) (vals + regno));
+ regcache_raw_supply (current_regcache, regno + tdep->ppc_fp0_regnum,
+ (char *) (vals + regno));
}
/* Predicate to test whether given register number is a "special" register. */
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- supply_register (PC_REGNUM, (char *) &iar);
- supply_register (tdep->ppc_ps_regnum, (char *) &msr);
- supply_register (tdep->ppc_cr_regnum, (char *) &cr);
- supply_register (tdep->ppc_lr_regnum, (char *) &lr);
- supply_register (tdep->ppc_ctr_regnum, (char *) &ctr);
- supply_register (tdep->ppc_xer_regnum, (char *) &xer);
+ regcache_raw_supply (current_regcache, PC_REGNUM, (char *) &iar);
+ regcache_raw_supply (current_regcache, tdep->ppc_ps_regnum, (char *) &msr);
+ regcache_raw_supply (current_regcache, tdep->ppc_cr_regnum, (char *) &cr);
+ regcache_raw_supply (current_regcache, tdep->ppc_lr_regnum, (char *) &lr);
+ regcache_raw_supply (current_regcache, tdep->ppc_ctr_regnum, (char *) &ctr);
+ regcache_raw_supply (current_regcache, tdep->ppc_xer_regnum, (char *) &xer);
if (tdep->ppc_fpscr_regnum >= 0)
- supply_register (tdep->ppc_fpscr_regnum, (char *) &fpscr);
+ regcache_raw_supply (current_regcache, tdep->ppc_fpscr_regnum,
+ (char *) &fpscr);
}
/* Record that the special registers contain the specified 32-bit
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- supply_register (PC_REGNUM, (char *) &iar);
- supply_register (tdep->ppc_ps_regnum, (char *) &msr);
- supply_register (tdep->ppc_cr_regnum, (char *) &cr);
- supply_register (tdep->ppc_lr_regnum, (char *) &lr);
- supply_register (tdep->ppc_ctr_regnum, (char *) &ctr);
- supply_register (tdep->ppc_xer_regnum, (char *) &xer);
+ regcache_raw_supply (current_regcache, PC_REGNUM, (char *) &iar);
+ regcache_raw_supply (current_regcache, tdep->ppc_ps_regnum, (char *) &msr);
+ regcache_raw_supply (current_regcache, tdep->ppc_cr_regnum, (char *) &cr);
+ regcache_raw_supply (current_regcache, tdep->ppc_lr_regnum, (char *) &lr);
+ regcache_raw_supply (current_regcache, tdep->ppc_ctr_regnum, (char *) &ctr);
+ regcache_raw_supply (current_regcache, tdep->ppc_xer_regnum, (char *) &xer);
if (tdep->ppc_fpscr_regnum >= 0)
- supply_register (tdep->ppc_fpscr_regnum, (char *) &fpscr);
+ regcache_raw_supply (current_regcache, 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)
- supply_register (tdep->ppc_mq_regnum, (char *) &sprs32.pt_mq);
+ regcache_raw_supply (current_regcache, tdep->ppc_mq_regnum,
+ (char *) &sprs32.pt_mq);
}
}
}
{
if (CANNOT_FETCH_REGISTER (regno))
{
- supply_register (regno, NULL);
+ regcache_raw_supply (current_regcache, regno, NULL);
continue;
}
addr = 8 * core_reg_mapping[regno];
/* ??? UNIQUE is a new addition. Don't generate an error. */
if (regno == ALPHA_UNIQUE_REGNUM)
{
- supply_register (regno, NULL);
+ regcache_raw_supply (current_regcache, regno, NULL);
continue;
}
if (bad_reg < 0)
}
else
{
- supply_register (regno, core_reg_sect + addr);
+ regcache_raw_supply (current_regcache, regno, core_reg_sect + addr);
}
}
if (bad_reg >= 0)
for (i = 0; i < 31; ++i)
if (regno == i || regno == -1)
- supply_register (i, (const char *)r0_r30 + i*8);
+ regcache_raw_supply (current_regcache, i, (const char *)r0_r30 + i*8);
if (regno == ALPHA_ZERO_REGNUM || regno == -1)
- supply_register (ALPHA_ZERO_REGNUM, NULL);
+ regcache_raw_supply (current_regcache, ALPHA_ZERO_REGNUM, NULL);
if (regno == ALPHA_PC_REGNUM || regno == -1)
- supply_register (ALPHA_PC_REGNUM, pc);
+ regcache_raw_supply (current_regcache, ALPHA_PC_REGNUM, pc);
if (regno == ALPHA_UNIQUE_REGNUM || regno == -1)
- supply_register (ALPHA_UNIQUE_REGNUM, unique);
+ regcache_raw_supply (current_regcache, ALPHA_UNIQUE_REGNUM, unique);
}
void
for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; ++i)
if (regno == i || regno == -1)
- supply_register (i, (const char *)f0_f30 + (i - ALPHA_FP0_REGNUM) * 8);
+ regcache_raw_supply (current_regcache, i,
+ (const char *)f0_f30 + (i - ALPHA_FP0_REGNUM) * 8);
if (regno == ALPHA_FPCR_REGNUM || regno == -1)
- supply_register (ALPHA_FPCR_REGNUM, fpcr);
+ regcache_raw_supply (current_regcache, ALPHA_FPCR_REGNUM, fpcr);
}
void
/* Integer registers. */
for (regno = 0; regno < ALPHA_ZERO_REGNUM; regno++)
- supply_register (regno, regs + (regmap[regno] * 8));
- supply_register (ALPHA_ZERO_REGNUM, NULL);
- supply_register (PC_REGNUM, regs + (28 * 8));
+ regcache_raw_supply (current_regcache, regno, regs + (regmap[regno] * 8));
+ regcache_raw_supply (current_regcache, ALPHA_ZERO_REGNUM, NULL);
+ regcache_raw_supply (current_regcache, PC_REGNUM, regs + (28 * 8));
/* Floating point registers. */
alphabsd_supply_fpreg (fpregs, -1);
mem[0] = fpa11->fpreg[fn].fSingle;
mem[1] = 0;
mem[2] = 0;
- supply_register (ARM_F0_REGNUM + fn, (char *) &mem[0]);
+ regcache_raw_supply (current_regcache, ARM_F0_REGNUM + fn, (char *) &mem[0]);
}
static void
mem[0] = fpa11->fpreg[fn].fDouble[1];
mem[1] = fpa11->fpreg[fn].fDouble[0];
mem[2] = 0;
- supply_register (ARM_F0_REGNUM + fn, (char *) &mem[0]);
+ regcache_raw_supply (current_regcache, ARM_F0_REGNUM + fn, (char *) &mem[0]);
}
static void
unsigned int mem[3] =
{0, 0, 0};
- supply_register (ARM_F0_REGNUM + fn, (char *) &mem[0]);
+ regcache_raw_supply (current_regcache, ARM_F0_REGNUM + fn, (char *) &mem[0]);
}
static void
mem[0] = fpa11->fpreg[fn].fExtended[0]; /* sign & exponent */
mem[1] = fpa11->fpreg[fn].fExtended[2]; /* ls bits */
mem[2] = fpa11->fpreg[fn].fExtended[1]; /* ms bits */
- supply_register (ARM_F0_REGNUM + fn, (char *) &mem[0]);
+ regcache_raw_supply (current_regcache, ARM_F0_REGNUM + fn, (char *) &mem[0]);
}
static void
/* Fetch fpsr. */
if (ARM_FPS_REGNUM == regno)
- supply_register (ARM_FPS_REGNUM, (char *) &fp.fpsr);
+ regcache_raw_supply (current_regcache, ARM_FPS_REGNUM, (char *) &fp.fpsr);
/* Fetch the floating point register. */
if (regno >= ARM_F0_REGNUM && regno <= ARM_F7_REGNUM)
}
/* Fetch fpsr. */
- supply_register (ARM_FPS_REGNUM, (char *) &fp.fpsr);
+ regcache_raw_supply (current_regcache, ARM_FPS_REGNUM, (char *) &fp.fpsr);
/* Fetch the floating point registers. */
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
}
if (regno >= ARM_A1_REGNUM && regno < ARM_PC_REGNUM)
- supply_register (regno, (char *) ®s[regno]);
+ regcache_raw_supply (current_regcache, regno, (char *) ®s[regno]);
if (ARM_PS_REGNUM == regno)
{
if (arm_apcs_32)
- supply_register (ARM_PS_REGNUM, (char *) ®s[ARM_CPSR_REGNUM]);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) ®s[ARM_CPSR_REGNUM]);
else
- supply_register (ARM_PS_REGNUM, (char *) ®s[ARM_PC_REGNUM]);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) ®s[ARM_PC_REGNUM]);
}
if (ARM_PC_REGNUM == regno)
{
regs[ARM_PC_REGNUM] = ADDR_BITS_REMOVE (regs[ARM_PC_REGNUM]);
- supply_register (ARM_PC_REGNUM, (char *) ®s[ARM_PC_REGNUM]);
+ regcache_raw_supply (current_regcache, ARM_PC_REGNUM,
+ (char *) ®s[ARM_PC_REGNUM]);
}
}
}
for (regno = ARM_A1_REGNUM; regno < ARM_PC_REGNUM; regno++)
- supply_register (regno, (char *) ®s[regno]);
+ regcache_raw_supply (current_regcache, regno, (char *) ®s[regno]);
if (arm_apcs_32)
- supply_register (ARM_PS_REGNUM, (char *) ®s[ARM_CPSR_REGNUM]);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) ®s[ARM_CPSR_REGNUM]);
else
- supply_register (ARM_PS_REGNUM, (char *) ®s[ARM_PC_REGNUM]);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) ®s[ARM_PC_REGNUM]);
regs[ARM_PC_REGNUM] = ADDR_BITS_REMOVE (regs[ARM_PC_REGNUM]);
- supply_register (ARM_PC_REGNUM, (char *) ®s[ARM_PC_REGNUM]);
+ regcache_raw_supply (current_regcache, ARM_PC_REGNUM,
+ (char *) ®s[ARM_PC_REGNUM]);
}
/* Store all general registers of the process from the values in
int regno, reg_pc;
for (regno = ARM_A1_REGNUM; regno < ARM_PC_REGNUM; regno++)
- supply_register (regno, (char *) &(*gregsetp)[regno]);
+ regcache_raw_supply (current_regcache, regno,
+ (char *) &(*gregsetp)[regno]);
if (arm_apcs_32)
- supply_register (ARM_PS_REGNUM, (char *) &(*gregsetp)[ARM_CPSR_REGNUM]);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) &(*gregsetp)[ARM_CPSR_REGNUM]);
else
- supply_register (ARM_PS_REGNUM, (char *) &(*gregsetp)[ARM_PC_REGNUM]);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) &(*gregsetp)[ARM_PC_REGNUM]);
reg_pc = ADDR_BITS_REMOVE ((CORE_ADDR)(*gregsetp)[ARM_PC_REGNUM]);
- supply_register (ARM_PC_REGNUM, (char *) ®_pc);
+ regcache_raw_supply (current_regcache, ARM_PC_REGNUM, (char *) ®_pc);
}
/* Fill register regno (if it is a floating-point register) in
FPA11 *fp = (FPA11 *) fpregsetp;
/* Fetch fpsr. */
- supply_register (ARM_FPS_REGNUM, (char *) &fp->fpsr);
+ regcache_raw_supply (current_regcache, ARM_FPS_REGNUM, (char *) &fp->fpsr);
/* Fetch the floating point registers. */
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
/* Integer registers. */
for (regno = ARM_A1_REGNUM; regno < ARM_SP_REGNUM; regno++)
- supply_register (regno, (char *) &gregset->r[regno]);
+ regcache_raw_supply (current_regcache, regno, (char *) &gregset->r[regno]);
- supply_register (ARM_SP_REGNUM, (char *) &gregset->r_sp);
- supply_register (ARM_LR_REGNUM, (char *) &gregset->r_lr);
+ regcache_raw_supply (current_regcache, ARM_SP_REGNUM,
+ (char *) &gregset->r_sp);
+ regcache_raw_supply (current_regcache, ARM_LR_REGNUM,
+ (char *) &gregset->r_lr);
/* This is ok: we're running native... */
r_pc = ADDR_BITS_REMOVE (gregset->r_pc);
- supply_register (ARM_PC_REGNUM, (char *) &r_pc);
+ regcache_raw_supply (current_regcache, ARM_PC_REGNUM, (char *) &r_pc);
if (arm_apcs_32)
- supply_register (ARM_PS_REGNUM, (char *) &gregset->r_cpsr);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) &gregset->r_cpsr);
else
- supply_register (ARM_PS_REGNUM, (char *) &gregset->r_pc);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) &gregset->r_pc);
}
static void
int regno;
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
- supply_register
- (regno, (char *) &fparegset->fpr[regno - ARM_F0_REGNUM]);
+ regcache_raw_supply (current_regcache, regno,
+ (char *) &fparegset->fpr[regno - ARM_F0_REGNUM]);
- supply_register (ARM_FPS_REGNUM, (char *) &fparegset->fpr_fpsr);
+ regcache_raw_supply (current_regcache, ARM_FPS_REGNUM,
+ (char *) &fparegset->fpr_fpsr);
}
static void
switch (regno)
{
case ARM_SP_REGNUM:
- supply_register (ARM_SP_REGNUM, (char *) &inferior_registers.r_sp);
+ regcache_raw_supply (current_regcache, ARM_SP_REGNUM,
+ (char *) &inferior_registers.r_sp);
break;
case ARM_LR_REGNUM:
- supply_register (ARM_LR_REGNUM, (char *) &inferior_registers.r_lr);
+ regcache_raw_supply (current_regcache, ARM_LR_REGNUM,
+ (char *) &inferior_registers.r_lr);
break;
case ARM_PC_REGNUM:
/* This is ok: we're running native... */
inferior_registers.r_pc = ADDR_BITS_REMOVE (inferior_registers.r_pc);
- supply_register (ARM_PC_REGNUM, (char *) &inferior_registers.r_pc);
+ regcache_raw_supply (current_regcache, ARM_PC_REGNUM,
+ (char *) &inferior_registers.r_pc);
break;
case ARM_PS_REGNUM:
if (arm_apcs_32)
- supply_register (ARM_PS_REGNUM, (char *) &inferior_registers.r_cpsr);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) &inferior_registers.r_cpsr);
else
- supply_register (ARM_PS_REGNUM, (char *) &inferior_registers.r_pc);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM,
+ (char *) &inferior_registers.r_pc);
break;
default:
- supply_register (regno, (char *) &inferior_registers.r[regno]);
+ regcache_raw_supply (current_regcache, regno,
+ (char *) &inferior_registers.r[regno]);
break;
}
}
switch (regno)
{
case ARM_FPS_REGNUM:
- supply_register (ARM_FPS_REGNUM,
- (char *) &inferior_fp_registers.fpr_fpsr);
+ regcache_raw_supply (current_regcache, ARM_FPS_REGNUM,
+ (char *) &inferior_fp_registers.fpr_fpsr);
break;
default:
- supply_register
- (regno, (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
+ regcache_raw_supply (current_regcache, regno,
+ (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
break;
}
}
#include <sys/types.h>
#include <sys/param.h>
#include "gdbcore.h"
-#include "value.h" /* For supply_register. */
+#include "value.h"
#include "regcache.h"
/* These are needed on various systems to expand REGISTER_U_ADDR. */
&& bad_reg < 0)
bad_reg = regno;
else
- supply_register (regno, core_reg_sect + addr);
+ regcache_raw_supply (current_regcache, regno, core_reg_sect + addr);
}
if (bad_reg >= 0)
cpu32bug_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
cpu32bug_cmds.dump_registers = "rd\r"; /* dump_registers */
cpu32bug_cmds.register_pattern = "\\(\\w+\\) +=\\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
- cpu32bug_cmds.supply_register = cpu32bug_supply_register; /* supply_register */
+ cpu32bug_cmds.supply_register = cpu32bug_supply_register;
cpu32bug_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
cpu32bug_cmds.load = "lo\r"; /* download command */
cpu32bug_cmds.loadresp = "\n"; /* load response */
knows about the actual size of each register so that's no problem. */
for (i = 0; i < NUM_GENREGS + NUM_SPECREGS; i++)
{
- supply_register (i, (char *)®p[i]);
+ regcache_raw_supply (current_regcache, i, (char *)®p[i]);
}
}
dbug_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
dbug_cmds.dump_registers = "rd\r"; /* dump_registers */
dbug_cmds.register_pattern = "\\(\\w+\\) +:\\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
- dbug_cmds.supply_register = dbug_supply_register; /* supply_register */
+ dbug_cmds.supply_register = dbug_supply_register;
dbug_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
dbug_cmds.load = "dl\r"; /* download command */
dbug_cmds.loadresp = "\n"; /* load response */
/* supply register stores in target byte order, so swap here */
store_unsigned_integer (regbuf, DEPRECATED_REGISTER_RAW_SIZE (regno), val);
- supply_register (regno, regbuf);
+ regcache_raw_supply (current_regcache, regno, regbuf);
}
fetch_register (int regno)
{
if (regno < FP0_REGNUM)
- supply_register (regno, (char *) &a_tss + regno_mapping[regno].tss_ofs);
+ regcache_raw_supply (current_regcache, regno,
+ (char *) &a_tss + regno_mapping[regno].tss_ofs);
else if (i386_fp_regnum_p (regno) || i386_fpc_regnum_p (regno))
i387_supply_fsave (current_regcache, regno, &npx);
else
if (CANNOT_FETCH_REGISTER (regno))
{
- supply_register (regno, NULL);
+ regcache_raw_supply (current_regcache, regno, NULL);
return;
}
for (i = 0; i < sizeof (greg_map) / sizeof (greg_map[0]); i++, regp++)
{
int regno = greg_map[i];
- supply_register (regno, regp);
+ regcache_raw_supply (current_regcache, regno, regp);
}
}
for (regi = 0; regi <= 31; regi++)
{
from = (char *) &((*fpregsetp)[regi]);
- supply_register (2*regi + HPPA_FP0_REGNUM, from);
- supply_register (2*regi + HPPA_FP0_REGNUM + 1, from + 4);
+ regcache_raw_supply (current_regcache, 2*regi + HPPA_FP0_REGNUM, from);
+ regcache_raw_supply (current_regcache, 2*regi + HPPA_FP0_REGNUM + 1,
+ from + 4);
}
}
if (regno == HPPA_PCOQ_HEAD_REGNUM || regno == HPPA_PCOQ_TAIL_REGNUM)
buf[len - 1] &= ~0x3;
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
}
else
read_memory (sp + regmap[regno], buf, DEPRECATED_REGISTER_RAW_SIZE (regno));
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
}
}
gdb_assert (!have_ptrace_getregs);
if (cannot_fetch_register (regno))
{
- supply_register (regno, NULL);
+ regcache_raw_supply (current_regcache, regno, NULL);
return;
}
error ("Couldn't read register %s (#%d): %s.", REGISTER_NAME (regno),
regno, safe_strerror (errno));
- supply_register (regno, &val);
+ regcache_raw_supply (current_regcache, regno, &val);
}
/* Store one register. */
int i;
for (i = 0; i < I386_NUM_GREGS; i++)
- supply_register (i, regp + regmap[i]);
+ regcache_raw_supply (current_regcache, i, regp + regmap[i]);
if (I386_LINUX_ORIG_EAX_REGNUM < NUM_REGS)
- supply_register (I386_LINUX_ORIG_EAX_REGNUM, regp + ORIG_EAX);
+ regcache_raw_supply (current_regcache, I386_LINUX_ORIG_EAX_REGNUM,
+ regp + ORIG_EAX);
}
/* Fill register REGNO (if it is a general-purpose register) in
int reg;
for (reg = 0; reg < tdep->num_xmm_regs; reg++)
- supply_register (XMM0_REGNUM + reg, (char *) dummy);
+ regcache_raw_supply (current_regcache, XMM0_REGNUM + reg, (char *) dummy);
if (tdep->num_xmm_regs > 0)
- supply_register (MXCSR_REGNUM, (char *) &mxcsr);
+ regcache_raw_supply (current_regcache, MXCSR_REGNUM, (char *) &mxcsr);
}
#else
{
int offset = nto_reg_offset (regno);
if (offset == -1)
- supply_register (regno, (char *) &empty);
+ regcache_raw_supply (current_regcache, regno, (char *) &empty);
else
- supply_register (regno, gpregs + offset);
+ regcache_raw_supply (current_regcache, regno, gpregs + offset);
}
}
int i;
for (i = FP0_REGNUM; i <= FOP_REGNUM; i++)
- supply_register (i, NULL);
+ regcache_raw_supply (current_regcache, i, NULL);
return;
}
{
int i;
for (i = 0; i < I386_NUM_GREGS; i++)
- supply_register (i, REG_ADDR (gregs, i));
+ regcache_raw_supply (current_regcache, i, REG_ADDR (gregs, i));
}
void
proc_debug (thread, "fetching all register");
for (i = 0; i < I386_NUM_GREGS; i++)
- supply_register (i, REG_ADDR (state, i));
+ regcache_raw_supply (current_regcache, i, REG_ADDR (state, i));
thread->fetched_regs = ~0;
}
else
{
proc_debug (thread, "fetching register %s", REGISTER_NAME (regno));
- supply_register (regno, REG_ADDR (state, regno));
+ regcache_raw_supply (current_regcache, regno,
+ REG_ADDR (state, regno));
thread->fetched_regs |= (1 << regno);
}
}
REGISTER_NAME (check_regno));
if (regno >= 0 && regno != check_regno)
/* Update GDB's copy of the register. */
- supply_register (check_regno, REG_ADDR (state, check_regno));
+ regcache_raw_supply (current_regcache, check_regno,
+ REG_ADDR (state, check_regno));
else
warning ("... also writing this register! Suspicious...");
}
for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++)
{
- supply_register (regi,
- (char *) &(gregsetp->__gpr[regi - IA64_GR0_REGNUM]));
+ regcache_raw_supply (current_regcache, regi,
+ (char *) &(gregsetp->__gpr[regi - IA64_GR0_REGNUM]));
}
for (regi = IA64_BR0_REGNUM; regi <= IA64_BR7_REGNUM; regi++)
{
- supply_register (regi,
- (char *) &(gregsetp->__br[regi - IA64_BR0_REGNUM]));
+ regcache_raw_supply (current_regcache, regi,
+ (char *) &(gregsetp->__br[regi - IA64_BR0_REGNUM]));
}
- supply_register (IA64_PSR_REGNUM, (char *) &(gregsetp->__psr));
- supply_register (IA64_IP_REGNUM, (char *) &(gregsetp->__ip));
- supply_register (IA64_CFM_REGNUM, (char *) &(gregsetp->__ifs));
- supply_register (IA64_RSC_REGNUM, (char *) &(gregsetp->__rsc));
- supply_register (IA64_BSP_REGNUM, (char *) &(gregsetp->__bsp));
- supply_register (IA64_BSPSTORE_REGNUM, (char *) &(gregsetp->__bspstore));
- supply_register (IA64_RNAT_REGNUM, (char *) &(gregsetp->__rnat));
- supply_register (IA64_PFS_REGNUM, (char *) &(gregsetp->__pfs));
- supply_register (IA64_UNAT_REGNUM, (char *) &(gregsetp->__unat));
- supply_register (IA64_PR_REGNUM, (char *) &(gregsetp->__preds));
- supply_register (IA64_CCV_REGNUM, (char *) &(gregsetp->__ccv));
- supply_register (IA64_LC_REGNUM, (char *) &(gregsetp->__lc));
- supply_register (IA64_EC_REGNUM, (char *) &(gregsetp->__ec));
+ regcache_raw_supply (current_regcache, IA64_PSR_REGNUM,
+ (char *) &(gregsetp->__psr));
+ regcache_raw_supply (current_regcache, IA64_IP_REGNUM,
+ (char *) &(gregsetp->__ip));
+ regcache_raw_supply (current_regcache, IA64_CFM_REGNUM,
+ (char *) &(gregsetp->__ifs));
+ regcache_raw_supply (current_regcache, IA64_RSC_REGNUM,
+ (char *) &(gregsetp->__rsc));
+ regcache_raw_supply (current_regcache, IA64_BSP_REGNUM,
+ (char *) &(gregsetp->__bsp));
+ regcache_raw_supply (current_regcache, IA64_BSPSTORE_REGNUM,
+ (char *) &(gregsetp->__bspstore));
+ regcache_raw_supply (current_regcache, IA64_RNAT_REGNUM,
+ (char *) &(gregsetp->__rnat));
+ regcache_raw_supply (current_regcache, IA64_PFS_REGNUM,
+ (char *) &(gregsetp->__pfs));
+ regcache_raw_supply (current_regcache, IA64_UNAT_REGNUM,
+ (char *) &(gregsetp->__unat));
+ regcache_raw_supply (current_regcache, IA64_PR_REGNUM,
+ (char *) &(gregsetp->__preds));
+ regcache_raw_supply (current_regcache, IA64_CCV_REGNUM,
+ (char *) &(gregsetp->__ccv));
+ regcache_raw_supply (current_regcache, IA64_LC_REGNUM,
+ (char *) &(gregsetp->__lc));
+ regcache_raw_supply (current_regcache, IA64_EC_REGNUM,
+ (char *) &(gregsetp->__ec));
/* FIXME: __nats */
- supply_register (IA64_FPSR_REGNUM, (char *) &(gregsetp->__fpsr));
+ regcache_raw_supply (current_regcache, IA64_FPSR_REGNUM,
+ (char *) &(gregsetp->__fpsr));
/* These (for the most part) are pseudo registers and are obtained
by other means. Those that aren't are already handled by the
int regi;
for (regi = IA64_FR0_REGNUM; regi <= IA64_FR127_REGNUM; regi++)
- supply_register (regi,
+ regcache_raw_supply (current_regcache, regi,
(char *) &(fpregsetp->__fpr[regi - IA64_FR0_REGNUM]));
}
for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++)
{
- supply_register (regi, (char *) (regp + (regi - IA64_GR0_REGNUM)));
+ regcache_raw_supply (current_regcache, regi,
+ (char *) (regp + (regi - IA64_GR0_REGNUM)));
}
/* FIXME: NAT collection bits are at index 32; gotta deal with these
somehow... */
- supply_register (IA64_PR_REGNUM, (char *) (regp + 33));
+ regcache_raw_supply (current_regcache, IA64_PR_REGNUM, (char *) (regp + 33));
for (regi = IA64_BR0_REGNUM; regi <= IA64_BR7_REGNUM; regi++)
{
- supply_register (regi, (char *) (regp + 34 + (regi - IA64_BR0_REGNUM)));
+ regcache_raw_supply (current_regcache, regi,
+ (char *) (regp + 34 + (regi - IA64_BR0_REGNUM)));
}
- supply_register (IA64_IP_REGNUM, (char *) (regp + 42));
- supply_register (IA64_CFM_REGNUM, (char *) (regp + 43));
- supply_register (IA64_PSR_REGNUM, (char *) (regp + 44));
- supply_register (IA64_RSC_REGNUM, (char *) (regp + 45));
- supply_register (IA64_BSP_REGNUM, (char *) (regp + 46));
- supply_register (IA64_BSPSTORE_REGNUM, (char *) (regp + 47));
- supply_register (IA64_RNAT_REGNUM, (char *) (regp + 48));
- supply_register (IA64_CCV_REGNUM, (char *) (regp + 49));
- supply_register (IA64_UNAT_REGNUM, (char *) (regp + 50));
- supply_register (IA64_FPSR_REGNUM, (char *) (regp + 51));
- supply_register (IA64_PFS_REGNUM, (char *) (regp + 52));
- supply_register (IA64_LC_REGNUM, (char *) (regp + 53));
- supply_register (IA64_EC_REGNUM, (char *) (regp + 54));
+ regcache_raw_supply (current_regcache, IA64_IP_REGNUM,
+ (char *) (regp + 42));
+ regcache_raw_supply (current_regcache, IA64_CFM_REGNUM,
+ (char *) (regp + 43));
+ regcache_raw_supply (current_regcache, IA64_PSR_REGNUM,
+ (char *) (regp + 44));
+ regcache_raw_supply (current_regcache, IA64_RSC_REGNUM,
+ (char *) (regp + 45));
+ regcache_raw_supply (current_regcache, IA64_BSP_REGNUM,
+ (char *) (regp + 46));
+ regcache_raw_supply (current_regcache, IA64_BSPSTORE_REGNUM,
+ (char *) (regp + 47));
+ regcache_raw_supply (current_regcache, IA64_RNAT_REGNUM,
+ (char *) (regp + 48));
+ regcache_raw_supply (current_regcache, IA64_CCV_REGNUM,
+ (char *) (regp + 49));
+ regcache_raw_supply (current_regcache, IA64_UNAT_REGNUM,
+ (char *) (regp + 50));
+ regcache_raw_supply (current_regcache, IA64_FPSR_REGNUM,
+ (char *) (regp + 51));
+ regcache_raw_supply (current_regcache, IA64_PFS_REGNUM,
+ (char *) (regp + 52));
+ regcache_raw_supply (current_regcache, IA64_LC_REGNUM,
+ (char *) (regp + 53));
+ regcache_raw_supply (current_regcache, IA64_EC_REGNUM,
+ (char *) (regp + 54));
}
void
for (regi = IA64_FR0_REGNUM; regi <= IA64_FR127_REGNUM; regi++)
{
from = (char *) &((*fpregsetp)[regi - IA64_FR0_REGNUM]);
- supply_register (regi, from);
+ regcache_raw_supply (current_regcache, regi, from);
}
}
if (CANNOT_FETCH_REGISTER (regno))
{
memset (buf, '\0', DEPRECATED_REGISTER_RAW_SIZE (regno)); /* Supply zeroes */
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
return;
}
perror_with_name (mess);
}
}
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
}
static char zerobuf[32] = {0};
for (regi = 0; regi <= CTX_RA; regi++)
- supply_register (regi, (char *) (regp + regi) + gregoff);
-
- supply_register (mips_regnum (current_gdbarch)->pc,
- (char *) (regp + CTX_EPC) + gregoff);
- supply_register (mips_regnum (current_gdbarch)->hi,
- (char *) (regp + CTX_MDHI) + gregoff);
- supply_register (mips_regnum (current_gdbarch)->lo,
- (char *) (regp + CTX_MDLO) + gregoff);
- supply_register (mips_regnum (current_gdbarch)->cause,
- (char *) (regp + CTX_CAUSE) + gregoff);
+ regcache_raw_supply (current_regcache, regi,
+ (char *) (regp + regi) + gregoff);
+
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->pc,
+ (char *) (regp + CTX_EPC) + gregoff);
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->hi,
+ (char *) (regp + CTX_MDHI) + gregoff);
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->lo,
+ (char *) (regp + CTX_MDLO) + gregoff);
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->cause,
+ (char *) (regp + CTX_CAUSE) + gregoff);
/* Fill inaccessible registers with zero. */
- supply_register (mips_regnum (current_gdbarch)->badvaddr, zerobuf);
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->badvaddr, zerobuf);
}
void
/* FIXME, this is wrong for the N32 ABI which has 64 bit FP regs. */
for (regi = 0; regi < 32; regi++)
- supply_register (FP0_REGNUM + regi,
- (char *) &fpregsetp->fp_r.fp_regs[regi]);
+ regcache_raw_supply (current_regcache, FP0_REGNUM + regi,
+ (char *) &fpregsetp->fp_r.fp_regs[regi]);
- supply_register (mips_regnum (current_gdbarch)->fp_control_status,
- (char *) &fpregsetp->fp_csr);
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->fp_control_status,
+ (char *) &fpregsetp->fp_csr);
/* FIXME: how can we supply FCRIR? SGI doesn't tell us. */
- supply_register (mips_regnum (current_gdbarch)->fp_implementation_revision,
- zerobuf);
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->fp_implementation_revision,
+ zerobuf);
}
void
*(int *) &buf[i] = reg;
}
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
}
}
}
for (regno = 0; regno < NUM_REGS; regno++)
if (regmap[regno] != -1)
- supply_register (regno, core_reg_sect + offsetof (st_t, ec)
- + regmap[regno]);
+ regcache_raw_supply (current_regcache, regno,
+ core_reg_sect + offsetof (st_t, ec) + regmap[regno]);
#ifdef SPARC
/* Fetching this register causes all of the I & L regs to be read from the
m32r_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
m32r_cmds.dump_registers = ".reg\r"; /* dump_registers */
m32r_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
- m32r_cmds.supply_register = m32r_supply_register; /* supply_register */
+ m32r_cmds.supply_register = m32r_supply_register;
m32r_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
m32r_cmds.load = NULL; /* download command */
m32r_cmds.loadresp = NULL; /* load response */
mon2000_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
mon2000_cmds.dump_registers = ".reg\r"; /* dump_registers */
mon2000_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
- mon2000_cmds.supply_register = m32r_supply_register; /* supply_register */
+ mon2000_cmds.supply_register = m32r_supply_register;
mon2000_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
mon2000_cmds.load = NULL; /* download command */
mon2000_cmds.loadresp = NULL; /* load response */
for (regi = 0; regi < R_PC; regi++)
{
- supply_register (regi, (char *) (regp + regi));
+ regcache_raw_supply (current_regcache, regi, (char *) (regp + regi));
}
- supply_register (PS_REGNUM, (char *) (regp + R_PS));
- supply_register (PC_REGNUM, (char *) (regp + R_PC));
+ regcache_raw_supply (current_regcache, PS_REGNUM, (char *) (regp + R_PS));
+ regcache_raw_supply (current_regcache, PC_REGNUM, (char *) (regp + R_PC));
}
void
for (regi = FP0_REGNUM; regi < M68K_FPC_REGNUM; regi++)
{
from = (char *) &(fpregsetp->f_fpregs[regi - FP0_REGNUM][0]);
- supply_register (regi, from);
+ regcache_raw_supply (current_regcache, regi, from);
}
- supply_register (M68K_FPC_REGNUM, (char *) &(fpregsetp->f_pcr));
- supply_register (M68K_FPS_REGNUM, (char *) &(fpregsetp->f_psr));
- supply_register (M68K_FPI_REGNUM, (char *) &(fpregsetp->f_fpiaddr));
+ regcache_raw_supply (current_regcache, M68K_FPC_REGNUM,
+ (char *) &(fpregsetp->f_pcr));
+ regcache_raw_supply (current_regcache, M68K_FPS_REGNUM,
+ (char *) &(fpregsetp->f_psr));
+ regcache_raw_supply (current_regcache, M68K_FPI_REGNUM,
+ (char *) &(fpregsetp->f_fpiaddr));
}
/* Given a pointer to a floating point register set in /proc format
if (CANNOT_FETCH_REGISTER (regno))
{
memset (buf, '\0', register_size (current_gdbarch, regno)); /* Supply zeroes */
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
return;
}
perror_with_name (mess);
}
}
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
}
/* Fetch register values from the inferior.
int regi;
for (regi = M68K_D0_REGNUM; regi <= SP_REGNUM; regi++)
- supply_register (regi, (char *) ®p[regmap[regi]]);
- supply_register (PS_REGNUM, (char *) ®p[PT_SR]);
- supply_register (PC_REGNUM, (char *) ®p[PT_PC]);
+ regcache_raw_supply (current_regcache, regi, (char *) ®p[regmap[regi]]);
+ regcache_raw_supply (current_regcache, PS_REGNUM, (char *) ®p[PT_SR]);
+ regcache_raw_supply (current_regcache, PC_REGNUM, (char *) ®p[PT_PC]);
}
/* Fill register REGNO (if it is a general-purpose register) in
int regi;
for (regi = FP0_REGNUM; regi < FP0_REGNUM + 8; regi++)
- supply_register (regi, FPREG_ADDR (fpregsetp, regi - FP0_REGNUM));
- supply_register (M68K_FPC_REGNUM, (char *) &fpregsetp->fpcntl[0]);
- supply_register (M68K_FPS_REGNUM, (char *) &fpregsetp->fpcntl[1]);
- supply_register (M68K_FPI_REGNUM, (char *) &fpregsetp->fpcntl[2]);
+ regcache_raw_supply (current_regcache, regi,
+ FPREG_ADDR (fpregsetp, regi - FP0_REGNUM));
+ regcache_raw_supply (current_regcache, M68K_FPC_REGNUM,
+ (char *) &fpregsetp->fpcntl[0]);
+ regcache_raw_supply (current_regcache, M68K_FPS_REGNUM,
+ (char *) &fpregsetp->fpcntl[1]);
+ regcache_raw_supply (current_regcache, M68K_FPI_REGNUM,
+ (char *) &fpregsetp->fpcntl[2]);
}
/* Fill register REGNO (if it is a floating-point register) in
}
/* Transform the bits comprising a 32-bit register to the right size
- for supply_register(). This is needed when mips_isa_regsize() is
- 8. */
+ for regcache_raw_supply(). This is needed when mips_isa_regsize()
+ is 8. */
static void
supply_32bit_reg (int regnum, const void *addr)
char buf[MAX_REGISTER_SIZE];
store_signed_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (regnum),
extract_signed_integer (addr, 4));
- supply_register (regnum, buf);
+ regcache_raw_supply (current_regcache, regnum, buf);
}
/* Unpack an elf_gregset_t into GDB's register cache. */
(char *)(regp + EF_CP0_CAUSE));
/* Fill inaccessible registers with zero. */
- supply_register (UNUSED_REGNUM, zerobuf);
+ regcache_raw_supply (current_regcache, UNUSED_REGNUM, zerobuf);
for (regi = FIRST_EMBED_REGNUM; regi < LAST_EMBED_REGNUM; regi++)
- supply_register (regi, zerobuf);
+ regcache_raw_supply (current_regcache, regi, zerobuf);
}
/* Pack our registers (or one register) into an elf_gregset_t. */
memset (zerobuf, 0, MAX_REGISTER_SIZE);
for (regi = 0; regi < 32; regi++)
- supply_register (FP0_REGNUM + regi,
- (char *)(*fpregsetp + regi));
+ regcache_raw_supply (current_regcache, FP0_REGNUM + regi,
+ (char *)(*fpregsetp + regi));
- supply_register (mips_regnum (current_gdbarch)->fp_control_status,
- (char *)(*fpregsetp + 32));
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->fp_control_status,
+ (char *)(*fpregsetp + 32));
/* FIXME: how can we supply FCRIR? The ABI doesn't tell us. */
- supply_register (mips_regnum (current_gdbarch)->fp_implementation_revision,
- zerobuf);
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->fp_implementation_revision,
+ zerobuf);
}
/* Likewise, pack one or all floating point registers into an
memset (zerobuf, 0, MAX_REGISTER_SIZE);
for (regi = MIPS64_EF_REG0; regi <= MIPS64_EF_REG31; regi++)
- supply_register ((regi - MIPS64_EF_REG0), (char *)(regp + regi));
-
- supply_register (mips_regnum (current_gdbarch)->lo,
- (char *)(regp + MIPS64_EF_LO));
- supply_register (mips_regnum (current_gdbarch)->hi,
- (char *)(regp + MIPS64_EF_HI));
-
- supply_register (mips_regnum (current_gdbarch)->pc,
- (char *)(regp + MIPS64_EF_CP0_EPC));
- supply_register (mips_regnum (current_gdbarch)->badvaddr,
- (char *)(regp + MIPS64_EF_CP0_BADVADDR));
- supply_register (PS_REGNUM, (char *)(regp + MIPS64_EF_CP0_STATUS));
- supply_register (mips_regnum (current_gdbarch)->cause,
- (char *)(regp + MIPS64_EF_CP0_CAUSE));
+ regcache_raw_supply (current_regcache, (regi - MIPS64_EF_REG0),
+ (char *)(regp + regi));
+
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->lo,
+ (char *)(regp + MIPS64_EF_LO));
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->hi,
+ (char *)(regp + MIPS64_EF_HI));
+
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->pc,
+ (char *)(regp + MIPS64_EF_CP0_EPC));
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->badvaddr,
+ (char *)(regp + MIPS64_EF_CP0_BADVADDR));
+ regcache_raw_supply (current_regcache, PS_REGNUM,
+ (char *)(regp + MIPS64_EF_CP0_STATUS));
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->cause,
+ (char *)(regp + MIPS64_EF_CP0_CAUSE));
/* Fill inaccessible registers with zero. */
- supply_register (UNUSED_REGNUM, zerobuf);
+ regcache_raw_supply (current_regcache, UNUSED_REGNUM, zerobuf);
for (regi = FIRST_EMBED_REGNUM; regi < LAST_EMBED_REGNUM; regi++)
- supply_register (regi, zerobuf);
+ regcache_raw_supply (current_regcache, regi, zerobuf);
}
/* Pack our registers (or one register) into an elf_gregset_t. */
memset (zerobuf, 0, MAX_REGISTER_SIZE);
for (regi = 0; regi < 32; regi++)
- supply_register (FP0_REGNUM + regi,
- (char *)(*fpregsetp + regi));
+ regcache_raw_supply (current_regcache, FP0_REGNUM + regi,
+ (char *)(*fpregsetp + regi));
- supply_register (mips_regnum (current_gdbarch)->fp_control_status,
- (char *)(*fpregsetp + 32));
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->fp_control_status,
+ (char *)(*fpregsetp + 32));
/* FIXME: how can we supply FCRIR? The ABI doesn't tell us. */
- supply_register (mips_regnum (current_gdbarch)->fp_implementation_revision,
- zerobuf);
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->fp_implementation_revision,
+ zerobuf);
}
/* Likewise, pack one or all floating point registers into an
(PTRACE_ARG3_TYPE) regaddr, 0);
regaddr += sizeof (int);
}
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
}
- supply_register (ZERO_REGNUM, zerobuf);
+ regcache_raw_supply (current_regcache, ZERO_REGNUM, zerobuf);
/* Frame ptr reg must appear to be 0; it is faked by stack handling code. */
- supply_register (DEPRECATED_FP_REGNUM, zerobuf);
+ regcache_raw_supply (current_regcache, DEPRECATED_FP_REGNUM, zerobuf);
}
/* Store our register values back into the inferior.
}
else
{
- supply_register (regno, core_reg_sect + addr);
+ regcache_raw_supply (current_regcache, regno, core_reg_sect + addr);
}
}
if (bad_reg >= 0)
{
error ("Register %s not found in core file.", REGISTER_NAME (bad_reg));
}
- supply_register (ZERO_REGNUM, zerobuf);
+ regcache_raw_supply (current_regcache, ZERO_REGNUM, zerobuf);
/* Frame ptr reg must appear to be 0; it is faked by stack handling code. */
- supply_register (DEPRECATED_FP_REGNUM, zerobuf);
+ regcache_raw_supply (current_regcache, DEPRECATED_FP_REGNUM, zerobuf);
}
/* Return the address in the core dump or inferior of register REGNO.
if (regno == i || regno == -1)
{
if (CANNOT_FETCH_REGISTER (i))
- supply_register (i, NULL);
+ regcache_raw_supply (current_regcache, i, NULL);
else
- supply_register (i, regs + (i * mips_isa_regsize (current_gdbarch)));
+ regcache_raw_supply (current_regcache, i,
+ regs + (i * mips_isa_regsize (current_gdbarch)));
}
}
}
if (regno == i || regno == -1)
{
if (CANNOT_FETCH_REGISTER (i))
- supply_register (i, NULL);
+ regcache_raw_supply (current_regcache, i, NULL);
else
- supply_register (i, fpregs + ((i - FP0_REGNUM) * mips_isa_regsize (current_gdbarch)));
+ regcache_raw_supply (current_regcache, i,
+ fpregs + ((i - FP0_REGNUM) * mips_isa_regsize (current_gdbarch)));
}
}
}
memset (zerobuf, 0, MAX_REGISTER_SIZE);
for (regi = 0; regi <= CXT_RA; regi++)
- supply_register (regi, (char *) (regp + regi));
+ regcache_raw_supply (current_regcache, regi, (char *) (regp + regi));
- supply_register (mips_regnum (current_gdbarch)->pc,
- (char *) (regp + CXT_EPC));
- supply_register (mips_regnum (current_gdbarch)->hi,
- (char *) (regp + CXT_MDHI));
- supply_register (mips_regnum (current_gdbarch)->lo,
- (char *) (regp + CXT_MDLO));
- supply_register (mips_regnum (current_gdbarch)->cause,
- (char *) (regp + CXT_CAUSE));
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->pc,
+ (char *) (regp + CXT_EPC));
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->hi,
+ (char *) (regp + CXT_MDHI));
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->lo,
+ (char *) (regp + CXT_MDLO));
+ regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->cause,
+ (char *) (regp + CXT_CAUSE));
/* Fill inaccessible registers with zero. */
- supply_register (PS_REGNUM, zerobuf);
- supply_register (mips_regnum (current_gdbarch)->badvaddr, zerobuf);
- supply_register (DEPRECATED_FP_REGNUM, zerobuf);
- supply_register (UNUSED_REGNUM, zerobuf);
+ regcache_raw_supply (current_regcache, PS_REGNUM, zerobuf);
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->badvaddr,
+ zerobuf);
+ regcache_raw_supply (current_regcache, DEPRECATED_FP_REGNUM, zerobuf);
+ regcache_raw_supply (current_regcache, UNUSED_REGNUM, zerobuf);
for (regi = FIRST_EMBED_REGNUM; regi <= LAST_EMBED_REGNUM; regi++)
- supply_register (regi, zerobuf);
+ regcache_raw_supply (current_regcache, regi, zerobuf);
}
void
memset (zerobuf, 0, MAX_REGISTER_SIZE);
for (regi = 0; regi < 32; regi++)
- supply_register (mips_regnum (current_gdbarch)->fp0 + regi,
- (char *) &fpregsetp->fp_r.fp_regs[regi]);
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->fp0 + regi,
+ (char *) &fpregsetp->fp_r.fp_regs[regi]);
- supply_register (mips_regnum (current_gdbarch)->fp_control_status,
- (char *) &fpregsetp->fp_csr);
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->fp_control_status,
+ (char *) &fpregsetp->fp_csr);
/* FIXME: how can we supply FCRIR? The ABI doesn't tell us. */
- supply_register (mips_regnum (current_gdbarch)->fp_implementation_revision,
- zerobuf);
+ regcache_raw_supply (current_regcache,
+ mips_regnum (current_gdbarch)->fp_implementation_revision,
+ zerobuf);
}
void
store_unsigned_integer (regbuf, DEPRECATED_REGISTER_RAW_SIZE (regno), val);
- supply_register (regno, regbuf);
+ regcache_raw_supply (current_regcache, regno, regbuf);
return p;
}
if (!name || (*name == '\0'))
{
monitor_debug ("No register known for %d\n", regno);
- supply_register (regno, zerobuf);
+ regcache_raw_supply (current_regcache, regno, zerobuf);
return;
}
if (first_bdm_regno == -1)
{
- supply_register (first_regno, NULL);
+ regcache_raw_supply (current_regcache, first_regno, NULL);
return; /* Unsupported register */
}
&& (first_regno < tdep->ppc_fp0_regnum + ppc_num_fprs)))
{
/* printf("invalid reg request!\n"); */
- supply_register (first_regno, NULL);
+ regcache_raw_supply (current_regcache, first_regno, NULL);
return; /* Unsupported register */
}
else
if (regoffset >= reglen / 4)
continue;
- supply_register (i, regs + 4 * regoffset);
+ regcache_raw_supply (current_regcache, i, regs + 4 * regoffset);
}
else
- supply_register (i, NULL); /* Unsupported register */
+ regcache_raw_supply (current_regcache, i, NULL); /* Unsupported register */
}
}
if (regno == (tdep->ppc_vrsave_regnum - 1))
offset = vrregsize - DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vrsave_regnum);
- supply_register (regno,
- regs + (regno - tdep->ppc_vr0_regnum) * vrregsize + offset);
+ regcache_raw_supply (current_regcache, regno,
+ regs + (regno - tdep->ppc_vr0_regnum) * vrregsize + offset);
}
/* Fetch the top 32 bits of TID's general-purpose registers and the
{
char buf[MAX_REGISTER_SIZE];
read_spliced_spe_reg (tid, regno, &evrregs, buf);
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
}
else if (regno == tdep->ppc_acc_regnum)
{
gdb_assert (sizeof (evrregs.acc)
== register_size (current_gdbarch, regno));
- supply_register (regno, &evrregs.acc);
+ regcache_raw_supply (current_regcache, regno, &evrregs.acc);
}
else if (regno == tdep->ppc_spefscr_regnum)
{
gdb_assert (sizeof (evrregs.spefscr)
== register_size (current_gdbarch, regno));
- supply_register (regno, &evrregs.spefscr);
+ regcache_raw_supply (current_regcache, regno, &evrregs.spefscr);
}
else
gdb_assert (0);
if (regaddr == -1)
{
memset (buf, '\0', DEPRECATED_REGISTER_RAW_SIZE (regno)); /* Supply zeroes */
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
return;
}
occupies a whole vector, while VRSAVE occupies a full 4 bytes
slot. */
if (i == (num_of_vrregs - 2))
- supply_register (tdep->ppc_vr0_regnum + i,
- *vrregsetp + i * vrregsize + offset);
+ regcache_raw_supply (current_regcache, tdep->ppc_vr0_regnum + i,
+ *vrregsetp + i * vrregsize + offset);
else
- supply_register (tdep->ppc_vr0_regnum + i, *vrregsetp + i * vrregsize);
+ regcache_raw_supply (current_regcache, tdep->ppc_vr0_regnum + i,
+ *vrregsetp + i * vrregsize);
}
}
char buf[MAX_REGISTER_SIZE];
read_spliced_spe_reg (tid, tdep->ppc_ev0_regnum + i, &evrregs, buf);
- supply_register (tdep->ppc_ev0_regnum + i, buf);
+ regcache_raw_supply (current_regcache, tdep->ppc_ev0_regnum + i, buf);
}
/* Supply the SPE-specific registers. */
- supply_register (tdep->ppc_acc_regnum, &evrregs.acc);
- supply_register (tdep->ppc_spefscr_regnum, &evrregs.spefscr);
+ regcache_raw_supply (current_regcache, tdep->ppc_acc_regnum, &evrregs.acc);
+ regcache_raw_supply (current_regcache, tdep->ppc_spefscr_regnum,
+ &evrregs.spefscr);
}
static void
const bfd_byte *buf)
{
regcache_raw_supply (regcache, regnum,
- (buf + wordsize
- - register_size (current_gdbarch, regnum)));
+ (buf + wordsize - register_size (current_gdbarch, regnum)));
}
/* Extract the register values found in the WORDSIZED ABI GREGSET,
OPS->getreg.term = NULL; /* getreg.term */
OPS->getreg.term_cmd = NULL; /* getreg.term_cmd */
OPS->register_pattern = "\\(\\w+\\) +=\\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
- OPS->supply_register = ppcbug_supply_register; /* supply_register */
+ OPS->supply_register = ppcbug_supply_register;
OPS->dump_registers = "rd\r"; /* dump all registers */
OPS->load_routine = NULL; /* load_routine (defaults to SRECs) */
OPS->load = LOAD_CMD; /* download command */
for (i = 0; i < ppc_num_gprs; i++)
{
if (regno == tdep->ppc_gp0_regnum + i || regno == -1)
- supply_register (tdep->ppc_gp0_regnum + i,
- regs + REG_FIXREG_OFFSET (i));
+ regcache_raw_supply (current_regcache, tdep->ppc_gp0_regnum + i,
+ regs + REG_FIXREG_OFFSET (i));
}
if (regno == tdep->ppc_lr_regnum || regno == -1)
- supply_register (tdep->ppc_lr_regnum, regs + REG_LR_OFFSET);
+ regcache_raw_supply (current_regcache, tdep->ppc_lr_regnum,
+ regs + REG_LR_OFFSET);
if (regno == tdep->ppc_cr_regnum || regno == -1)
- supply_register (tdep->ppc_cr_regnum, regs + REG_CR_OFFSET);
+ regcache_raw_supply (current_regcache, tdep->ppc_cr_regnum,
+ regs + REG_CR_OFFSET);
if (regno == tdep->ppc_xer_regnum || regno == -1)
- supply_register (tdep->ppc_xer_regnum, regs + REG_XER_OFFSET);
+ regcache_raw_supply (current_regcache, tdep->ppc_xer_regnum,
+ regs + REG_XER_OFFSET);
if (regno == tdep->ppc_ctr_regnum || regno == -1)
- supply_register (tdep->ppc_ctr_regnum, regs + REG_CTR_OFFSET);
+ regcache_raw_supply (current_regcache, tdep->ppc_ctr_regnum,
+ regs + REG_CTR_OFFSET);
if (regno == PC_REGNUM || regno == -1)
- supply_register (PC_REGNUM, regs + REG_PC_OFFSET);
+ regcache_raw_supply (current_regcache, PC_REGNUM,
+ regs + REG_PC_OFFSET);
}
void
for (i = 0; i < ppc_num_fprs; i++)
{
if (regno == tdep->ppc_fp0_regnum + i || regno == -1)
- supply_register (tdep->ppc_fp0_regnum + i,
- fpregs + FPREG_FPR_OFFSET (i));
+ regcache_raw_supply (current_regcache, tdep->ppc_fp0_regnum + i,
+ fpregs + FPREG_FPR_OFFSET (i));
}
if (regno == tdep->ppc_fpscr_regnum || regno == -1)
- supply_register (tdep->ppc_fpscr_regnum, fpregs + FPREG_FPSCR_OFFSET);
+ regcache_raw_supply (current_regcache, tdep->ppc_fpscr_regnum,
+ fpregs + FPREG_FPSCR_OFFSET);
}
void
Indicate that all registers have been fetched, so mark them all valid. */
-/* NOTE: cagney/2001-12-04: This function does not set valid on the
- pseudo-register range since pseudo registers are always supplied
- using supply_register(). */
/* FIXME: cagney/2001-12-04: This function is DEPRECATED. The target
code was blatting the registers[] array and then calling this.
- Since targets should only be using supply_register() the need for
+ Since targets should only be using regcache_raw_supply() the need for
this function/hack is eliminated. */
void
inferior_ptid = save_ptid;
}
-/* FIXME: kettenis/20030828: We should get rid of supply_register and
- regcache_collect in favour of regcache_raw_supply and
- regcache_raw_collect. */
-
-/* SUPPLY_REGISTER()
-
- Record that register REGNUM contains VAL. This is used when the
- value is obtained from the inferior or core dump, so there is no
- need to store the value there.
-
- If VAL is a NULL pointer, then it's probably an unsupported register.
- We just set its value to all zeros. We might want to record this
- fact, and report it to the users of read_register and friends. */
-
-void
-supply_register (int regnum, const void *val)
-{
- regcache_raw_supply (current_regcache, regnum, val);
-}
-
void
regcache_collect (int regnum, void *buf)
{
target. These functions are called by the target in response to a
target_fetch_registers() or target_store_registers(). */
-extern void supply_register (int regnum, const void *val);
extern void regcache_collect (int regnum, void *buf);
extern void regcache_raw_supply (struct regcache *regcache,
int regnum, const void *buf);
referenced thread. This global is often found in close proximity
to code that is directly manipulating the deprecated_registers[]
array. In such cases, it should be possible to replace the lot
- with a call to supply_register(). If you find yourself in dire
+ with a call to regcache_raw_supply(). If you find yourself in dire
straits, still needing access to the cache status bit, the
regcache_valid_p() and set_register_cached() functions are
available. */
registers for the most recently referenced thread.
NOTE: cagney/2002-11-14: Target side code should be using
- supply_register() and/or regcache_collect() while architecture side
- code should use the more generic regcache methods. */
+ regcache_raw_supply() and/or regcache_collect() while architecture
+ side code should use the more generic regcache methods. */
extern char *deprecated_registers;
/* NOTE: cagney/2002-11-05: This function, and its co-conspirator
- deprecated_registers[], have been superseeded by supply_register(). */
+ deprecated_registers[], have been superseeded by
+ regcache_raw_supply(). */
extern void deprecated_registers_fetched (void);
extern int register_cached (int regnum);
val = 0;
for (j = 0; j < 8; j++)
val = (val << 4) + get_hex_digit (j == 0);
- supply_register (regno++, (char *) &val);
+ regcache_raw_supply (current_regcache, regno++, (char *) &val);
}
}
#endif
store_signed_integer (buf,
DEPRECATED_REGISTER_RAW_SIZE (regno),
(LONGEST) get_hex (&thischar));
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
break;
}
}
{
int buf = 0;
- supply_register (regno, (char *) (&buf));
+ regcache_raw_supply (current_regcache, regno, (char *) (&buf));
}
}
store_signed_integer (buf,
DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM),
read_register (PC_REGNUM) - 2);
- supply_register (PC_REGNUM, buf);
+ regcache_raw_supply (current_regcache, PC_REGNUM, buf);
sprintf (buf2, ".PC %s\r", phex_nz (read_register (PC_REGNUM), 0));
puts_e7000debug (buf2);
}
for (regno = NUM_REALREGS; regno < NUM_REGS; regno++)
{
int buf = 0;
- supply_register (regno, (char *) &buf);
+ regcache_raw_supply (current_regcache, regno, (char *) &buf);
}
stop_reason = why_stop ();
est_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
est_cmds.dump_registers = "dr\r"; /* dump_registers */
est_cmds.register_pattern = "\\(\\w+\\) = \\([0-9a-fA-F]+\\)"; /* register_pattern */
- est_cmds.supply_register = est_supply_register; /* supply_register */
+ est_cmds.supply_register = est_supply_register;
est_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
est_cmds.load = "dl\r"; /* download command */
est_cmds.loadresp = "+"; /* load response */
hms_cmds.getreg.term_cmd = "\003"; /* getreg.term_cmd */
hms_cmds.dump_registers = "r\r"; /* dump_registers */
hms_cmds.register_pattern = "\\(\\w+\\)=\\([0-9a-fA-F]+\\)"; /* register_pattern */
- hms_cmds.supply_register = hms_supply_register; /* supply_register */
+ hms_cmds.supply_register = hms_supply_register;
hms_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
hms_cmds.load = "tl\r"; /* download command */
hms_cmds.loadresp = NULL; /* load response */
/* We got the number the register holds, but gdb expects to see a
value in the target byte ordering. */
store_unsigned_integer (buffer, 4, val);
- supply_register (regno, buffer);
+ regcache_raw_supply (current_regcache, regno, buffer);
}
return;
}
char buf[MAX_REGISTER_SIZE];
store_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM), rpc);
- supply_register (PC_REGNUM, buf);
+ regcache_raw_supply (current_regcache, PC_REGNUM, buf);
store_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM), rfp);
- supply_register (30, buf); /* This register they are avoiding and so it is unnamed */
+ regcache_raw_supply (current_regcache, 30, buf); /* This register they are avoiding and so it is unnamed */
store_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (SP_REGNUM), rsp);
- supply_register (SP_REGNUM, buf);
+ regcache_raw_supply (current_regcache, SP_REGNUM, buf);
store_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (DEPRECATED_FP_REGNUM), 0);
- supply_register (DEPRECATED_FP_REGNUM, buf);
+ regcache_raw_supply (current_regcache, DEPRECATED_FP_REGNUM, buf);
if (nfields == 9)
{
/* We got the number the register holds, but gdb expects to see a
value in the target byte ordering. */
store_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (regno), val);
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
}
}
for (regno = 0; regno < 15; regno++)
{
store_unsigned_integer (cookedreg, 4, rawregs[regno]);
- supply_register (regno, (char *) cookedreg);
+ regcache_raw_supply (current_regcache, regno, (char *) cookedreg);
}
store_unsigned_integer (cookedreg, 4, rawregs[15]);
- supply_register (ARM_PS_REGNUM, (char *) cookedreg);
+ regcache_raw_supply (current_regcache, ARM_PS_REGNUM, (char *) cookedreg);
arm_rdi_fetch_registers (ARM_PC_REGNUM);
}
else
else if (regno < 0 || regno > 15)
{
rawreg = 0;
- supply_register (regno, (char *) &rawreg);
+ regcache_raw_supply (current_regcache, regno, (char *) &rawreg);
return;
}
else
printf_filtered ("RDI_CPUread: %s\n", rdi_error_message (rslt));
}
store_unsigned_integer (cookedreg, 4, rawreg);
- supply_register (regno, (char *) cookedreg);
+ regcache_raw_supply (current_regcache, regno, (char *) cookedreg);
}
}
{
printf ("Help me with fetch reg %d\n", regno);
}
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
}
}
/* (should warn about reply too short) */
for (i = 0; i < NUM_REGS; i++)
- supply_register (i, ®s[DEPRECATED_REGISTER_BYTE (i)]);
+ regcache_raw_supply (current_regcache, i,
+ ®s[DEPRECATED_REGISTER_BYTE (i)]);
}
/* Prepare to store registers. Since we may send them all, we have to
char buf[MAX_REGISTER_SIZE];
int nr_bytes;
memset (buf, 0, MAX_REGISTER_SIZE);
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
set_register_cached (regno, -1);
break;
}
which registers are fetchable. */
/* Else if (nr_bytes < 0): an old simulator, that doesn't
think to return the register size. Just assume all is ok. */
- supply_register (regno, buf);
+ regcache_raw_supply (current_regcache, regno, buf);
if (sr_get_debug ())
{
printf_filtered ("gdbsim_fetch_register: %d", regno);
val = 0;
for (j = 0; j < 8; j++)
val = (val << 4) + get_hex_digit (j == 0);
- supply_register (regno++, (char *) &val);
+ regcache_raw_supply (current_regcache, regno++, (char *) &val);
}
}
p += 2 * fieldsize;
if (fieldsize < DEPRECATED_REGISTER_RAW_SIZE (reg->regnum))
warning ("Remote reply is too short: %s", buf);
- supply_register (reg->regnum, regs);
+ regcache_raw_supply (current_regcache, reg->regnum, regs);
}
if (*p++ != ';')
p += 2 * fieldsize;
if (fieldsize < DEPRECATED_REGISTER_RAW_SIZE (reg->regnum))
warning ("Remote reply is too short: %s", buf);
- supply_register (reg->regnum, regs);
+ regcache_raw_supply (current_regcache, reg->regnum, regs);
}
if (*p++ != ';')
hex++;
store_unsigned_integer (regbuf, DEPRECATED_REGISTER_RAW_SIZE (regno), value);
- supply_register (regno, regbuf);
+ regcache_raw_supply (current_regcache, regno, regbuf);
return hex;
}
}
if (!errno)
- supply_register (regno, (char *) addr);
+ regcache_raw_supply (current_regcache, regno, (char *) addr);
else
{
#if 0
if (ARCH64 ())
{
for (regi = 0; regi < ppc_num_gprs; regi++)
- supply_register (tdep->ppc_gp0_regnum + regi,
- (char *) ®s->r64.gpr[regi]);
+ regcache_raw_supply (current_regcache, tdep->ppc_gp0_regnum + regi,
+ (char *) ®s->r64.gpr[regi]);
if (tdep->ppc_fp0_regnum >= 0)
for (regi = 0; regi < ppc_num_fprs; regi++)
- supply_register (tdep->ppc_fp0_regnum + regi,
- (char *) ®s->r64.fpr[regi]);
-
- supply_register (PC_REGNUM, (char *) ®s->r64.iar);
- supply_register (tdep->ppc_ps_regnum, (char *) ®s->r64.msr);
- supply_register (tdep->ppc_cr_regnum, (char *) ®s->r64.cr);
- supply_register (tdep->ppc_lr_regnum, (char *) ®s->r64.lr);
- supply_register (tdep->ppc_ctr_regnum, (char *) ®s->r64.ctr);
- supply_register (tdep->ppc_xer_regnum, (char *) ®s->r64.xer);
+ regcache_raw_supply (current_regcache, tdep->ppc_fp0_regnum + regi,
+ (char *) ®s->r64.fpr[regi]);
+
+ regcache_raw_supply (current_regcache, PC_REGNUM,
+ (char *) ®s->r64.iar);
+ regcache_raw_supply (current_regcache, tdep->ppc_ps_regnum,
+ (char *) ®s->r64.msr);
+ regcache_raw_supply (current_regcache, tdep->ppc_cr_regnum,
+ (char *) ®s->r64.cr);
+ regcache_raw_supply (current_regcache, tdep->ppc_lr_regnum,
+ (char *) ®s->r64.lr);
+ regcache_raw_supply (current_regcache, tdep->ppc_ctr_regnum,
+ (char *) ®s->r64.ctr);
+ regcache_raw_supply (current_regcache, tdep->ppc_xer_regnum,
+ (char *) ®s->r64.xer);
if (tdep->ppc_fpscr_regnum >= 0)
- supply_register (tdep->ppc_fpscr_regnum, (char *) ®s->r64.fpscr);
+ regcache_raw_supply (current_regcache, tdep->ppc_fpscr_regnum,
+ (char *) ®s->r64.fpscr);
}
else
{
for (regi = 0; regi < ppc_num_gprs; regi++)
- supply_register (tdep->ppc_gp0_regnum + regi,
- (char *) ®s->r32.gpr[regi]);
+ regcache_raw_supply (current_regcache, tdep->ppc_gp0_regnum + regi,
+ (char *) ®s->r32.gpr[regi]);
if (tdep->ppc_fp0_regnum >= 0)
for (regi = 0; regi < ppc_num_fprs; regi++)
- supply_register (tdep->ppc_fp0_regnum + regi,
- (char *) ®s->r32.fpr[regi]);
-
- supply_register (PC_REGNUM, (char *) ®s->r32.iar);
- supply_register (tdep->ppc_ps_regnum, (char *) ®s->r32.msr);
- supply_register (tdep->ppc_cr_regnum, (char *) ®s->r32.cr);
- supply_register (tdep->ppc_lr_regnum, (char *) ®s->r32.lr);
- supply_register (tdep->ppc_ctr_regnum, (char *) ®s->r32.ctr);
- supply_register (tdep->ppc_xer_regnum, (char *) ®s->r32.xer);
+ regcache_raw_supply (current_regcache, tdep->ppc_fp0_regnum + regi,
+ (char *) ®s->r32.fpr[regi]);
+
+ regcache_raw_supply (current_regcache, PC_REGNUM,
+ (char *) ®s->r32.iar);
+ regcache_raw_supply (current_regcache, tdep->ppc_ps_regnum,
+ (char *) ®s->r32.msr);
+ regcache_raw_supply (current_regcache, tdep->ppc_cr_regnum,
+ (char *) ®s->r32.cr);
+ regcache_raw_supply (current_regcache, tdep->ppc_lr_regnum,
+ (char *) ®s->r32.lr);
+ regcache_raw_supply (current_regcache, tdep->ppc_ctr_regnum,
+ (char *) ®s->r32.ctr);
+ regcache_raw_supply (current_regcache, tdep->ppc_xer_regnum,
+ (char *) ®s->r32.xer);
if (tdep->ppc_fpscr_regnum >= 0)
- supply_register (tdep->ppc_fpscr_regnum, (char *) ®s->r32.fpscr);
+ regcache_raw_supply (current_regcache, tdep->ppc_fpscr_regnum,
+ (char *) ®s->r32.fpscr);
if (tdep->ppc_mq_regnum >= 0)
- supply_register (tdep->ppc_mq_regnum, (char *) ®s->r32.mq);
+ regcache_raw_supply (current_regcache, tdep->ppc_mq_regnum,
+ (char *) ®s->r32.mq);
}
}
\f
sh3_cmds.getreg.term_cmd = ".\r"; /* getreg.term_cmd */
sh3_cmds.dump_registers = "r\r"; /* dump_registers */
sh3_cmds.register_pattern = "\\(\\w+\\)=\\([0-9a-fA-F]+\\( +[0-9a-fA-F]+\\b\\)*\\)";
- sh3_cmds.supply_register = sh3_supply_register; /* supply_register */
+ sh3_cmds.supply_register = sh3_supply_register;
sh3_cmds.load_routine = sh3_load; /* load_routine */
sh3_cmds.load = NULL; /* download command */
sh3_cmds.loadresp = NULL; /* Load response */
int i;
if (regno == PC_REGNUM || regno == -1)
- supply_register (PC_REGNUM, regs + (0 * 4));
+ regcache_raw_supply (current_regcache, PC_REGNUM, regs + (0 * 4));
if (regno == SR_REGNUM || regno == -1)
- supply_register (SR_REGNUM, regs + (1 * 4));
+ regcache_raw_supply (current_regcache, SR_REGNUM, regs + (1 * 4));
if (regno == PR_REGNUM || regno == -1)
- supply_register (PR_REGNUM, regs + (2 * 4));
+ regcache_raw_supply (current_regcache, PR_REGNUM, regs + (2 * 4));
if (regno == MACH_REGNUM || regno == -1)
- supply_register (MACH_REGNUM, regs + (3 * 4));
+ regcache_raw_supply (current_regcache, MACH_REGNUM, regs + (3 * 4));
if (regno == MACL_REGNUM || regno == -1)
- supply_register (MACL_REGNUM, regs + (4 * 4));
+ regcache_raw_supply (current_regcache, MACL_REGNUM, regs + (4 * 4));
if ((regno >= R0_REGNUM && regno <= (R0_REGNUM + 15)) || regno == -1)
{
for (i = R0_REGNUM; i <= (R0_REGNUM + 15); i++)
if (regno == i || regno == -1)
- supply_register (i, regs + regmap[i - R0_REGNUM]);
+ regcache_raw_supply (current_regcache, i,
+ regs + regmap[i - R0_REGNUM]);
}
}
td_err_string (val));
/* Restore new register value. */
- supply_register (regnum, old_value);
+ regcache_raw_supply (current_regcache, regnum, old_value);
#if 0
/* FIXME: libthread_db doesn't seem to handle this right. */
deprecated_read_register_gen (regno, raw);
thread_db_fetch_registers (-1);
- supply_register (regno, raw);
+ regcache_raw_supply (current_regcache, regno, raw);
}
fill_gregset ((gdb_gregset_t *) gregset, -1);
regno, val);
store_unsigned_integer (val, DEPRECATED_REGISTER_RAW_SIZE (regno), regval);
- supply_register (regno, val);
+ regcache_raw_supply (current_regcache, regno, val);
}
/* Store register REGNO, or all registers if REGNO == -1, from the contents
if (r == I387_FISEG_REGNUM)
{
l = *((long *) context_offset) & 0xffff;
- supply_register (r, (char *) &l);
+ regcache_raw_supply (current_regcache, r, (char *) &l);
}
else if (r == I387_FOP_REGNUM)
{
l = (*((long *) context_offset) >> 16) & ((1 << 11) - 1);
- supply_register (r, (char *) &l);
+ regcache_raw_supply (current_regcache, r, (char *) &l);
}
else if (r >= 0)
- supply_register (r, context_offset);
+ regcache_raw_supply (current_regcache, r, context_offset);
else
{
for (r = 0; r < NUM_REGS; r++)
return;
}
for (r = 0; r < NUM_REGS; r++)
- supply_register (r, core_reg_sect + mappings[r]);
+ regcache_raw_supply (current_regcache, r, core_reg_sect + mappings[r]);
}
static struct core_fns win32_elf_core_fns =
{
if (r >= 0)
{
- supply_register (r, (char *) regptr (¤t_thread->context, r));
+ regcache_raw_supply (current_regcache, r,
+ (char *) regptr (¤t_thread->context, r));
}
else
{
if (r == I387_FISEG_REGNUM)
{
l = *((long *) context_offset) & 0xffff;
- supply_register (r, (char *) &l);
+ regcache_raw_supply (current_regcache, r, (char *) &l);
}
else if (r == I387_FOP_REGNUM)
{
l = (*((long *) context_offset) >> 16) & ((1 << 11) - 1);
- supply_register (r, (char *) &l);
+ regcache_raw_supply (current_regcache, r, (char *) &l);
}
else if (r >= 0)
- supply_register (r, context_offset);
+ regcache_raw_supply (current_regcache, r, context_offset);
else
{
for (r = 0; r < NUM_REGS; r++)
return;
}
for (r = 0; r < NUM_REGS; r++)
- supply_register (r, core_reg_sect + mappings[r]);
+ regcache_raw_supply (current_regcache, r, core_reg_sect + mappings[r]);
}
static struct core_fns win32_elf_core_fns =