diff options
Diffstat (limited to 'gdb')
61 files changed, 525 insertions, 364 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6690fd4..447a3d4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,81 @@ 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. * NEWS: For signal trampolines, cite s390 GNU/Linux as a system that is known to work. diff --git a/gdb/abug-rom.c b/gdb/abug-rom.c index 543f702..e548539 100644 --- a/gdb/abug-rom.c +++ b/gdb/abug-rom.c @@ -144,7 +144,7 @@ init_abug_cmds (void) 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 */ diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c index e5e8a9a..76df67a 100644 --- a/gdb/aix-thread.c +++ b/gdb/aix-thread.c @@ -1006,7 +1006,8 @@ supply_gprs64 (uint64_t *vals) 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. */ @@ -1014,7 +1015,7 @@ supply_gprs64 (uint64_t *vals) 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. */ @@ -1030,7 +1031,8 @@ supply_fprs (double *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. */ @@ -1060,14 +1062,15 @@ supply_sprs64 (uint64_t iar, uint64_t msr, uint32_t cr, { 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 @@ -1080,14 +1083,15 @@ supply_sprs32 (uint32_t iar, uint32_t msr, uint32_t cr, { 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 @@ -1223,7 +1227,8 @@ fetch_regs_kernel_thread (int regno, pthdb_tid_t tid) 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); } } } diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c index 62486cf..6fe6bdf 100644 --- a/gdb/alpha-nat.c +++ b/gdb/alpha-nat.c @@ -99,7 +99,7 @@ fetch_osf_core_registers (char *core_reg_sect, unsigned core_reg_size, { if (CANNOT_FETCH_REGISTER (regno)) { - supply_register (regno, NULL); + regcache_raw_supply (current_regcache, regno, NULL); continue; } addr = 8 * core_reg_mapping[regno]; @@ -108,7 +108,7 @@ fetch_osf_core_registers (char *core_reg_sect, unsigned core_reg_size, /* ??? 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) @@ -116,7 +116,7 @@ fetch_osf_core_registers (char *core_reg_sect, unsigned core_reg_size, } else { - supply_register (regno, core_reg_sect + addr); + regcache_raw_supply (current_regcache, regno, core_reg_sect + addr); } } if (bad_reg >= 0) diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 74f881d..933989f 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -1303,16 +1303,16 @@ alpha_supply_int_regs (int regno, const void *r0_r30, 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 @@ -1338,10 +1338,11 @@ alpha_supply_fp_regs (int regno, const void *f0_f30, const void *fpcr) 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 diff --git a/gdb/alphanbsd-tdep.c b/gdb/alphanbsd-tdep.c index 84c89c8..299ed3a 100644 --- a/gdb/alphanbsd-tdep.c +++ b/gdb/alphanbsd-tdep.c @@ -70,9 +70,9 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which, /* 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); diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c index 8d7ee9d..db80cb2 100644 --- a/gdb/arm-linux-nat.c +++ b/gdb/arm-linux-nat.c @@ -102,7 +102,7 @@ fetch_nwfpe_single (unsigned int fn, FPA11 * fpa11) 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 @@ -113,7 +113,7 @@ fetch_nwfpe_double (unsigned int fn, FPA11 * fpa11) 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 @@ -122,7 +122,7 @@ fetch_nwfpe_none (unsigned int fn) 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 @@ -133,7 +133,7 @@ fetch_nwfpe_extended (unsigned int fn, FPA11 * fpa11) 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 @@ -239,7 +239,7 @@ fetch_fpregister (int regno) /* 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) @@ -287,7 +287,7 @@ fetch_fpregs (void) } /* 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++) @@ -410,20 +410,23 @@ fetch_register (int 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]); } } @@ -447,15 +450,18 @@ fetch_regs (void) } 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 @@ -604,15 +610,18 @@ supply_gregset (gdb_gregset_t *gregsetp) 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 @@ -651,7 +660,7 @@ supply_fpregset (gdb_fpregset_t *fpregsetp) 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++) diff --git a/gdb/armnbsd-nat.c b/gdb/armnbsd-nat.c index 0a12174..d21fdbf 100644 --- a/gdb/armnbsd-nat.c +++ b/gdb/armnbsd-nat.c @@ -45,18 +45,22 @@ supply_gregset (struct reg *gregset) /* 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 @@ -65,10 +69,11 @@ supply_fparegset (struct fpreg *fparegset) 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 @@ -89,28 +94,34 @@ fetch_register (int regno) 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; } } @@ -152,13 +163,13 @@ fetch_fp_register (int regno) 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; } } diff --git a/gdb/core-aout.c b/gdb/core-aout.c index 7702d78..2246926 100644 --- a/gdb/core-aout.c +++ b/gdb/core-aout.c @@ -37,7 +37,7 @@ #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. */ @@ -99,7 +99,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which, && 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) diff --git a/gdb/cpu32bug-rom.c b/gdb/cpu32bug-rom.c index 03b3132..1d1f850 100644 --- a/gdb/cpu32bug-rom.c +++ b/gdb/cpu32bug-rom.c @@ -142,7 +142,7 @@ init_cpu32bug_cmds (void) 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 */ diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index 87d2382..12f33a8 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -3336,7 +3336,7 @@ supply_gregset (elf_gregset_t *gregsetp) 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]); } } diff --git a/gdb/dbug-rom.c b/gdb/dbug-rom.c index a592334..075f01a 100644 --- a/gdb/dbug-rom.c +++ b/gdb/dbug-rom.c @@ -140,7 +140,7 @@ init_dbug_cmds (void) 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 */ diff --git a/gdb/dve3900-rom.c b/gdb/dve3900-rom.c index fe2fced..82da6ec 100644 --- a/gdb/dve3900-rom.c +++ b/gdb/dve3900-rom.c @@ -473,7 +473,7 @@ fetch_bitmapped_register (int regno, struct bit_field *bf) /* 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); } diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c index 8568add..96472b3 100644 --- a/gdb/go32-nat.c +++ b/gdb/go32-nat.c @@ -466,7 +466,8 @@ static void 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 diff --git a/gdb/hppa-linux-nat.c b/gdb/hppa-linux-nat.c index ef9eafb..13c35ba 100644 --- a/gdb/hppa-linux-nat.c +++ b/gdb/hppa-linux-nat.c @@ -221,7 +221,7 @@ fetch_register (int regno) if (CANNOT_FETCH_REGISTER (regno)) { - supply_register (regno, NULL); + regcache_raw_supply (current_regcache, regno, NULL); return; } @@ -311,7 +311,7 @@ supply_gregset (gdb_gregset_t *gregsetp) 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); } } @@ -348,8 +348,9 @@ supply_fpregset (gdb_fpregset_t *fpregsetp) 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); } } diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c index 6b361eb..f9d4585 100644 --- a/gdb/hppah-nat.c +++ b/gdb/hppah-nat.c @@ -282,7 +282,7 @@ fetch_register (int regno) 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); } diff --git a/gdb/hpux-thread.c b/gdb/hpux-thread.c index 8938541..c0614dc 100644 --- a/gdb/hpux-thread.c +++ b/gdb/hpux-thread.c @@ -299,7 +299,7 @@ hpux_thread_fetch_registers (int regno) else read_memory (sp + regmap[regno], buf, DEPRECATED_REGISTER_RAW_SIZE (regno)); - supply_register (regno, buf); + regcache_raw_supply (current_regcache, regno, buf); } } diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c index 38558f1..631e4e7 100644 --- a/gdb/i386-linux-nat.c +++ b/gdb/i386-linux-nat.c @@ -179,7 +179,7 @@ fetch_register (int regno) gdb_assert (!have_ptrace_getregs); if (cannot_fetch_register (regno)) { - supply_register (regno, NULL); + regcache_raw_supply (current_regcache, regno, NULL); return; } @@ -194,7 +194,7 @@ fetch_register (int regno) 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. */ @@ -236,10 +236,11 @@ supply_gregset (elf_gregset_t *gregsetp) 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 @@ -472,9 +473,9 @@ dummy_sse_values (void) 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 diff --git a/gdb/i386-nto-tdep.c b/gdb/i386-nto-tdep.c index 8538db7..e441fcf 100644 --- a/gdb/i386-nto-tdep.c +++ b/gdb/i386-nto-tdep.c @@ -77,9 +77,9 @@ i386nto_supply_gregset (char *gpregs) { 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); } } diff --git a/gdb/i386gnu-nat.c b/gdb/i386gnu-nat.c index 7533f09..dcc89bd 100644 --- a/gdb/i386gnu-nat.c +++ b/gdb/i386gnu-nat.c @@ -83,7 +83,7 @@ fetch_fpregs (struct proc *thread) int i; for (i = FP0_REGNUM; i <= FOP_REGNUM; i++) - supply_register (i, NULL); + regcache_raw_supply (current_regcache, i, NULL); return; } @@ -100,7 +100,7 @@ supply_gregset (gdb_gregset_t *gregs) { 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 @@ -144,14 +144,15 @@ gnu_fetch_registers (int regno) 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); } } @@ -249,7 +250,8 @@ gnu_store_registers (int 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..."); } diff --git a/gdb/ia64-aix-nat.c b/gdb/ia64-aix-nat.c index 61f34e1..893f095 100644 --- a/gdb/ia64-aix-nat.c +++ b/gdb/ia64-aix-nat.c @@ -42,31 +42,45 @@ supply_gregset (prgregset_t *gregsetp) 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 @@ -139,7 +153,7 @@ supply_fpregset (prfpregset_t *fpregsetp) 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])); } diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c index 00f66fb..c556098 100644 --- a/gdb/ia64-linux-nat.c +++ b/gdb/ia64-linux-nat.c @@ -367,32 +367,47 @@ supply_gregset (gregset_t *gregsetp) 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 @@ -448,7 +463,7 @@ supply_fpregset (fpregset_t *fpregsetp) 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); } } diff --git a/gdb/infptrace.c b/gdb/infptrace.c index f40e6e9..0cf3378 100644 --- a/gdb/infptrace.c +++ b/gdb/infptrace.c @@ -375,7 +375,7 @@ fetch_register (int regno) 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; } @@ -399,7 +399,7 @@ fetch_register (int regno) perror_with_name (mess); } } - supply_register (regno, buf); + regcache_raw_supply (current_regcache, regno, buf); } diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c index 24bb883..8ad7e98 100644 --- a/gdb/irix5-nat.c +++ b/gdb/irix5-nat.c @@ -62,19 +62,20 @@ supply_gregset (gregset_t *gregsetp) 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 @@ -132,15 +133,17 @@ supply_fpregset (fpregset_t *fpregsetp) /* 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 diff --git a/gdb/lynx-nat.c b/gdb/lynx-nat.c index 9f99b47..dab47d4 100644 --- a/gdb/lynx-nat.c +++ b/gdb/lynx-nat.c @@ -325,7 +325,7 @@ fetch_inferior_registers (int regno) *(int *) &buf[i] = reg; } - supply_register (regno, buf); + regcache_raw_supply (current_regcache, regno, buf); } } } @@ -593,8 +593,8 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which, 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 diff --git a/gdb/m32r-rom.c b/gdb/m32r-rom.c index ef8c271..c963b2c 100644 --- a/gdb/m32r-rom.c +++ b/gdb/m32r-rom.c @@ -319,7 +319,7 @@ init_m32r_cmds (void) 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 */ @@ -379,7 +379,7 @@ init_mon2000_cmds (void) 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 */ diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index 0f81d39..e00f6dc 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -963,10 +963,10 @@ supply_gregset (gregset_t *gregsetp) 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 @@ -1001,11 +1001,14 @@ supply_fpregset (fpregset_t *fpregsetp) 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 diff --git a/gdb/m68klinux-nat.c b/gdb/m68klinux-nat.c index d90d8f8..4310be2 100644 --- a/gdb/m68klinux-nat.c +++ b/gdb/m68klinux-nat.c @@ -141,7 +141,7 @@ fetch_register (int regno) 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; } @@ -167,7 +167,7 @@ fetch_register (int regno) perror_with_name (mess); } } - supply_register (regno, buf); + regcache_raw_supply (current_regcache, regno, buf); } /* Fetch register values from the inferior. @@ -282,9 +282,9 @@ supply_gregset (elf_gregset_t *gregsetp) 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 @@ -366,10 +366,14 @@ supply_fpregset (elf_fpregset_t *fpregsetp) 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 diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c index a13fa36..7d2e063 100644 --- a/gdb/mips-linux-tdep.c +++ b/gdb/mips-linux-tdep.c @@ -89,8 +89,8 @@ mips_linux_get_longjmp_target (CORE_ADDR *pc) } /* 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) @@ -98,7 +98,7 @@ 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. */ @@ -129,9 +129,9 @@ supply_gregset (elf_gregset_t *gregsetp) (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. */ @@ -198,15 +198,17 @@ supply_fpregset (elf_fpregset_t *fpregsetp) 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 @@ -388,25 +390,27 @@ mips64_supply_gregset (mips64_elf_gregset_t *gregsetp) 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. */ @@ -473,15 +477,17 @@ mips64_supply_fpregset (mips64_elf_fpregset_t *fpregsetp) 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 diff --git a/gdb/mips-nat.c b/gdb/mips-nat.c index 39f1f77..fe1602b 100644 --- a/gdb/mips-nat.c +++ b/gdb/mips-nat.c @@ -89,12 +89,12 @@ fetch_inferior_registers (int regno) (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. @@ -206,16 +206,16 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which, } 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. diff --git a/gdb/mipsnbsd-tdep.c b/gdb/mipsnbsd-tdep.c index e4dd65a..d18e0a5 100644 --- a/gdb/mipsnbsd-tdep.c +++ b/gdb/mipsnbsd-tdep.c @@ -45,9 +45,10 @@ mipsnbsd_supply_reg (char *regs, int 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))); } } } @@ -74,9 +75,10 @@ mipsnbsd_supply_fpreg (char *fpregs, int 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, fpregs + ((i - FP0_REGNUM) * mips_isa_regsize (current_gdbarch))); + regcache_raw_supply (current_regcache, i, + fpregs + ((i - FP0_REGNUM) * mips_isa_regsize (current_gdbarch))); } } } diff --git a/gdb/mipsv4-nat.c b/gdb/mipsv4-nat.c index 3a3e732..645ad4d 100644 --- a/gdb/mipsv4-nat.c +++ b/gdb/mipsv4-nat.c @@ -51,24 +51,26 @@ supply_gregset (gregset_t *gregsetp) 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 @@ -110,15 +112,18 @@ supply_fpregset (fpregset_t *fpregsetp) 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 diff --git a/gdb/monitor.c b/gdb/monitor.c index 6d97ca0..db76f41 100644 --- a/gdb/monitor.c +++ b/gdb/monitor.c @@ -923,7 +923,7 @@ monitor_supply_register (int regno, char *valstr) store_unsigned_integer (regbuf, DEPRECATED_REGISTER_RAW_SIZE (regno), val); - supply_register (regno, regbuf); + regcache_raw_supply (current_regcache, regno, regbuf); return p; } @@ -1184,7 +1184,7 @@ monitor_fetch_register (int regno) 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; } diff --git a/gdb/ppc-bdm.c b/gdb/ppc-bdm.c index e4d2ddb..e7eefca 100644 --- a/gdb/ppc-bdm.c +++ b/gdb/ppc-bdm.c @@ -180,7 +180,7 @@ bdm_ppc_fetch_registers (int regno) if (first_bdm_regno == -1) { - supply_register (first_regno, NULL); + regcache_raw_supply (current_regcache, first_regno, NULL); return; /* Unsupported register */ } @@ -204,7 +204,7 @@ bdm_ppc_fetch_registers (int regno) && (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 @@ -235,10 +235,10 @@ bdm_ppc_fetch_registers (int regno) 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 */ } } diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index c0f02ce..5f94732 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -249,8 +249,8 @@ fetch_altivec_register (int tid, int regno) 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 @@ -366,19 +366,19 @@ fetch_spe_register (int tid, int regno) { 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); @@ -424,7 +424,7 @@ fetch_register (int tid, int regno) 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; } @@ -485,10 +485,11 @@ supply_vrregset (gdb_vrregset_t *vrregsetp) 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); } } @@ -529,12 +530,13 @@ fetch_spe_registers (int tid) 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 diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index 585260b..81a182b 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -842,8 +842,7 @@ right_supply_register (struct regcache *regcache, int wordsize, int regnum, 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, diff --git a/gdb/ppcbug-rom.c b/gdb/ppcbug-rom.c index 0619964..ee04656 100644 --- a/gdb/ppcbug-rom.c +++ b/gdb/ppcbug-rom.c @@ -166,7 +166,7 @@ init_ppc_cmds (char *LOAD_CMD, 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 */ diff --git a/gdb/ppcnbsd-tdep.c b/gdb/ppcnbsd-tdep.c index 0ac9fec..16fa675 100644 --- a/gdb/ppcnbsd-tdep.c +++ b/gdb/ppcnbsd-tdep.c @@ -58,24 +58,29 @@ ppcnbsd_supply_reg (char *regs, int regno) 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 @@ -128,12 +133,13 @@ ppcnbsd_supply_fpreg (char *fpregs, int regno) 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 diff --git a/gdb/regcache.c b/gdb/regcache.c index 4928170..b7f76d3 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -611,12 +611,9 @@ registers_changed (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 @@ -1221,26 +1218,6 @@ write_register_pid (int regnum, CORE_ADDR val, ptid_t ptid) 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) { diff --git a/gdb/regcache.h b/gdb/regcache.h index 26a1b8a..98c9c90 100644 --- a/gdb/regcache.h +++ b/gdb/regcache.h @@ -96,7 +96,6 @@ void regcache_cooked_write_part (struct regcache *regcache, int regnum, 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); @@ -216,7 +215,7 @@ extern void deprecated_write_register_bytes (int regbyte, char *myaddr, 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. */ @@ -226,13 +225,14 @@ extern signed char *deprecated_register_valid; 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); diff --git a/gdb/remote-e7000.c b/gdb/remote-e7000.c index 16a6690..be28347 100644 --- a/gdb/remote-e7000.c +++ b/gdb/remote-e7000.c @@ -362,7 +362,7 @@ get_hex_regs (int n, int 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); } } #endif @@ -881,7 +881,7 @@ fetch_regs_from_dump (int (*nextchar) (), char *want) 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; } } @@ -926,7 +926,7 @@ e7000_fetch_registers (void) { int buf = 0; - supply_register (regno, (char *) (&buf)); + regcache_raw_supply (current_regcache, regno, (char *) (&buf)); } } @@ -1966,7 +1966,7 @@ sub2_from_pc (void) 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); } @@ -2064,7 +2064,7 @@ e7000_wait (ptid_t ptid, struct target_waitstatus *status) 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 (); diff --git a/gdb/remote-est.c b/gdb/remote-est.c index a2c0f7c..884429a 100644 --- a/gdb/remote-est.c +++ b/gdb/remote-est.c @@ -148,7 +148,7 @@ init_est_cmds (void) 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 */ diff --git a/gdb/remote-hms.c b/gdb/remote-hms.c index ee40051..7567486 100644 --- a/gdb/remote-hms.c +++ b/gdb/remote-hms.c @@ -119,7 +119,7 @@ init_hms_cmds (void) 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 */ diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c index 2f67be8..e8216bb 100644 --- a/gdb/remote-m32r-sdi.c +++ b/gdb/remote-m32r-sdi.c @@ -965,7 +965,7 @@ m32r_fetch_register (int regno) /* 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; } diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c index a011467..3742bf6 100644 --- a/gdb/remote-mips.c +++ b/gdb/remote-mips.c @@ -1758,16 +1758,16 @@ mips_wait (ptid_t ptid, struct target_waitstatus *status) 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) { @@ -1939,7 +1939,7 @@ mips_fetch_registers (int regno) /* 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); } } diff --git a/gdb/remote-rdi.c b/gdb/remote-rdi.c index 31932f5..f9e1a80 100644 --- a/gdb/remote-rdi.c +++ b/gdb/remote-rdi.c @@ -496,10 +496,10 @@ arm_rdi_fetch_registers (int regno) 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 @@ -511,7 +511,7 @@ arm_rdi_fetch_registers (int regno) else if (regno < 0 || regno > 15) { rawreg = 0; - supply_register (regno, (char *) &rawreg); + regcache_raw_supply (current_regcache, regno, (char *) &rawreg); return; } else @@ -523,7 +523,7 @@ arm_rdi_fetch_registers (int regno) 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); } } diff --git a/gdb/remote-rdp.c b/gdb/remote-rdp.c index 5360467..2068311 100644 --- a/gdb/remote-rdp.c +++ b/gdb/remote-rdp.c @@ -645,7 +645,7 @@ remote_rdp_fetch_register (int regno) { printf ("Help me with fetch reg %d\n", regno); } - supply_register (regno, buf); + regcache_raw_supply (current_regcache, regno, buf); } } diff --git a/gdb/remote-sds.c b/gdb/remote-sds.c index ce85d09..01861f0 100644 --- a/gdb/remote-sds.c +++ b/gdb/remote-sds.c @@ -482,7 +482,8 @@ sds_fetch_registers (int regno) /* (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 diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c index a1be90e..b3da582 100644 --- a/gdb/remote-sim.c +++ b/gdb/remote-sim.c @@ -304,7 +304,7 @@ gdbsim_fetch_register (int regno) 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; } @@ -332,7 +332,7 @@ gdbsim_fetch_register (int regno) 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); diff --git a/gdb/remote-st.c b/gdb/remote-st.c index 8ae2721..eba847f 100644 --- a/gdb/remote-st.c +++ b/gdb/remote-st.c @@ -222,7 +222,7 @@ get_hex_regs (int n, int 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); } } diff --git a/gdb/remote.c b/gdb/remote.c index f754f80..0286399 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -2883,7 +2883,7 @@ Packet: '%s'\n", 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++ != ';') @@ -3071,7 +3071,7 @@ remote_async_wait (ptid_t ptid, struct target_waitstatus *status) 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++ != ';') diff --git a/gdb/rom68k-rom.c b/gdb/rom68k-rom.c index 2ddba0a..cf10ac1 100644 --- a/gdb/rom68k-rom.c +++ b/gdb/rom68k-rom.c @@ -102,7 +102,7 @@ rom68k_supply_one_register (int regno, unsigned char *hex) hex++; store_unsigned_integer (regbuf, DEPRECATED_REGISTER_RAW_SIZE (regno), value); - supply_register (regno, regbuf); + regcache_raw_supply (current_regcache, regno, regbuf); return hex; } diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index dd52cf1..c6f4329 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -263,7 +263,7 @@ fetch_register (int regno) } if (!errno) - supply_register (regno, (char *) addr); + regcache_raw_supply (current_regcache, regno, (char *) addr); else { #if 0 @@ -587,44 +587,59 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, 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); } } diff --git a/gdb/sh3-rom.c b/gdb/sh3-rom.c index cec9fba..327e76a 100644 --- a/gdb/sh3-rom.c +++ b/gdb/sh3-rom.c @@ -228,7 +228,7 @@ init_sh3_cmds (void) 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 */ diff --git a/gdb/shnbsd-tdep.c b/gdb/shnbsd-tdep.c index ce67c7f..deb725f 100644 --- a/gdb/shnbsd-tdep.c +++ b/gdb/shnbsd-tdep.c @@ -61,25 +61,26 @@ shnbsd_supply_reg (char *regs, int regno) 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]); } } diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c index 2279b44..fe97f6c 100644 --- a/gdb/sol-thread.c +++ b/gdb/sol-thread.c @@ -597,7 +597,7 @@ sol_thread_store_registers (int 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. */ diff --git a/gdb/thread-db.c b/gdb/thread-db.c index 50ae747..12af128 100644 --- a/gdb/thread-db.c +++ b/gdb/thread-db.c @@ -1077,7 +1077,7 @@ thread_db_store_registers (int regno) 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); diff --git a/gdb/v850ice.c b/gdb/v850ice.c index 44a8f1d..ec7caa2 100644 --- a/gdb/v850ice.c +++ b/gdb/v850ice.c @@ -533,7 +533,7 @@ v850ice_fetch_registers (int regno) 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 diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c index cdaac2d..0a7e51b 100644 --- a/gdb/win32-nat.c +++ b/gdb/win32-nat.c @@ -358,15 +358,15 @@ do_child_fetch_inferior_registers (int r) 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++) @@ -2441,7 +2441,7 @@ fetch_elf_core_registers (char *core_reg_sect, 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 = diff --git a/gdb/wince.c b/gdb/wince.c index 02df7a6..e8361bf 100644 --- a/gdb/wince.c +++ b/gdb/wince.c @@ -1119,7 +1119,8 @@ do_child_fetch_inferior_registers (int r) { 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 { diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index cdaac2d..0a7e51b 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -358,15 +358,15 @@ do_child_fetch_inferior_registers (int r) 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++) @@ -2441,7 +2441,7 @@ fetch_elf_core_registers (char *core_reg_sect, 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 = |