diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2018-05-30 14:54:45 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2018-05-30 14:54:45 -0400 |
commit | 73e1c03f93f0294b464dc2b67de1f9aaae84838d (patch) | |
tree | 723ab692f6e43ff44e8ece53bdb5cff45cc576e0 | |
parent | e4c4a59b48b2cec10cffac4f562937de00cb5f3f (diff) | |
download | gdb-73e1c03f93f0294b464dc2b67de1f9aaae84838d.zip gdb-73e1c03f93f0294b464dc2b67de1f9aaae84838d.tar.gz gdb-73e1c03f93f0294b464dc2b67de1f9aaae84838d.tar.bz2 |
Remove regcache_raw_supply
Remove regcache_raw_supply, update callers to use
detached_regcache::raw_supply.
gdb/ChangeLog:
* regcache.h (regcache_raw_supply): Remove, update callers to
use detached_regcache::raw_supply.
* regcache.c (regcache_raw_supply): Remove.
88 files changed, 581 insertions, 659 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b0fb0c6..c7dd3d6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2018-05-30 Simon Marchi <simon.marchi@ericsson.com> + * regcache.h (regcache_raw_supply): Remove, update callers to + use detached_regcache::raw_supply. + * regcache.c (regcache_raw_supply): Remove. + +2018-05-30 Simon Marchi <simon.marchi@ericsson.com> + * regcache.h (regcache_cooked_write_part): Remove, update callers to use regcache::cooked_write_part. * regcache.c (regcache_cooked_write_part): Remove. diff --git a/gdb/aarch32-linux-nat.c b/gdb/aarch32-linux-nat.c index d1c1314..3297d6c 100644 --- a/gdb/aarch32-linux-nat.c +++ b/gdb/aarch32-linux-nat.c @@ -34,20 +34,20 @@ aarch32_gp_regcache_supply (struct regcache *regcache, uint32_t *regs, int regno; for (regno = ARM_A1_REGNUM; regno < ARM_PC_REGNUM; regno++) - regcache_raw_supply (regcache, regno, ®s[regno]); + regcache->raw_supply (regno, ®s[regno]); if (arm_apcs_32) { /* Clear reserved bits bit 20 to bit 23. */ regs[ARM_CPSR_GREGNUM] &= 0xff0fffff; - regcache_raw_supply (regcache, ARM_PS_REGNUM, ®s[ARM_CPSR_GREGNUM]); + regcache->raw_supply (ARM_PS_REGNUM, ®s[ARM_CPSR_GREGNUM]); } else - regcache_raw_supply (regcache, ARM_PS_REGNUM, ®s[ARM_PC_REGNUM]); + regcache->raw_supply (ARM_PS_REGNUM, ®s[ARM_PC_REGNUM]); regs[ARM_PC_REGNUM] = gdbarch_addr_bits_remove (regcache->arch (), regs[ARM_PC_REGNUM]); - regcache_raw_supply (regcache, ARM_PC_REGNUM, ®s[ARM_PC_REGNUM]); + regcache->raw_supply (ARM_PC_REGNUM, ®s[ARM_PC_REGNUM]); } /* Collect GP registers from REGCACHE to buffer REGS. ARM_APCS_32 is @@ -88,11 +88,9 @@ aarch32_vfp_regcache_supply (struct regcache *regcache, gdb_byte *regs, int regno; for (regno = 0; regno < vfp_register_count; regno++) - regcache_raw_supply (regcache, regno + ARM_D0_REGNUM, - regs + regno * 8); + regcache->raw_supply (regno + ARM_D0_REGNUM, regs + regno * 8); - regcache_raw_supply (regcache, ARM_FPSCR_REGNUM, - regs + 32 * 8); + regcache->raw_supply (ARM_FPSCR_REGNUM, regs + 32 * 8); } /* Collect VFP registers from REGCACHE to buffer REGS. diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c index c1fb7ac..a46bace 100644 --- a/gdb/aarch64-linux-nat.c +++ b/gdb/aarch64-linux-nat.c @@ -227,7 +227,7 @@ fetch_gregs_from_thread (struct regcache *regcache) int regno; for (regno = AARCH64_X0_REGNUM; regno <= AARCH64_CPSR_REGNUM; regno++) - regcache_raw_supply (regcache, regno, ®s[regno - AARCH64_X0_REGNUM]); + regcache->raw_supply (regno, ®s[regno - AARCH64_X0_REGNUM]); } } @@ -314,11 +314,10 @@ fetch_fpregs_from_thread (struct regcache *regcache) perror_with_name (_("Unable to fetch vFP/SIMD registers.")); for (regno = AARCH64_V0_REGNUM; regno <= AARCH64_V31_REGNUM; regno++) - regcache_raw_supply (regcache, regno, - ®s.vregs[regno - AARCH64_V0_REGNUM]); + regcache->raw_supply (regno, ®s.vregs[regno - AARCH64_V0_REGNUM]); - regcache_raw_supply (regcache, AARCH64_FPSR_REGNUM, ®s.fpsr); - regcache_raw_supply (regcache, AARCH64_FPCR_REGNUM, ®s.fpcr); + regcache->raw_supply (AARCH64_FPSR_REGNUM, ®s.fpsr); + regcache->raw_supply (AARCH64_FPCR_REGNUM, ®s.fpcr); } } diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c index 749065c..838b1a3 100644 --- a/gdb/aix-thread.c +++ b/gdb/aix-thread.c @@ -1116,8 +1116,8 @@ supply_gprs64 (struct regcache *regcache, uint64_t *vals) int regno; for (regno = 0; regno < ppc_num_gprs; regno++) - regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + regno, - (char *) (vals + regno)); + regcache->raw_supply (tdep->ppc_gp0_regnum + regno, + (char *) (vals + regno)); } /* Record that 32-bit register REGNO contains VAL. */ @@ -1125,7 +1125,7 @@ supply_gprs64 (struct regcache *regcache, uint64_t *vals) static void supply_reg32 (struct regcache *regcache, int regno, uint32_t val) { - regcache_raw_supply (regcache, regno, (char *) &val); + regcache->raw_supply (regno, (char *) &val); } /* Record that the floating-point registers contain VALS. */ @@ -1144,8 +1144,8 @@ supply_fprs (struct regcache *regcache, double *vals) for (regno = tdep->ppc_fp0_regnum; regno < tdep->ppc_fp0_regnum + ppc_num_fprs; regno++) - regcache_raw_supply (regcache, regno, - (char *) (vals + regno - tdep->ppc_fp0_regnum)); + regcache->raw_supply (regno, + (char *) (vals + regno - tdep->ppc_fp0_regnum)); } /* Predicate to test whether given register number is a "special" register. */ @@ -1177,16 +1177,14 @@ supply_sprs64 (struct regcache *regcache, struct gdbarch *gdbarch = regcache->arch (); struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch), - (char *) &iar); - regcache_raw_supply (regcache, tdep->ppc_ps_regnum, (char *) &msr); - regcache_raw_supply (regcache, tdep->ppc_cr_regnum, (char *) &cr); - regcache_raw_supply (regcache, tdep->ppc_lr_regnum, (char *) &lr); - regcache_raw_supply (regcache, tdep->ppc_ctr_regnum, (char *) &ctr); - regcache_raw_supply (regcache, tdep->ppc_xer_regnum, (char *) &xer); + regcache->raw_supply (gdbarch_pc_regnum (gdbarch), (char *) &iar); + regcache->raw_supply (tdep->ppc_ps_regnum, (char *) &msr); + regcache->raw_supply (tdep->ppc_cr_regnum, (char *) &cr); + regcache->raw_supply (tdep->ppc_lr_regnum, (char *) &lr); + regcache->raw_supply (tdep->ppc_ctr_regnum, (char *) &ctr); + regcache->raw_supply (tdep->ppc_xer_regnum, (char *) &xer); if (tdep->ppc_fpscr_regnum >= 0) - regcache_raw_supply (regcache, tdep->ppc_fpscr_regnum, - (char *) &fpscr); + regcache->raw_supply (tdep->ppc_fpscr_regnum, (char *) &fpscr); } /* Record that the special registers contain the specified 32-bit @@ -1201,16 +1199,14 @@ supply_sprs32 (struct regcache *regcache, struct gdbarch *gdbarch = regcache->arch (); struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch), - (char *) &iar); - regcache_raw_supply (regcache, tdep->ppc_ps_regnum, (char *) &msr); - regcache_raw_supply (regcache, tdep->ppc_cr_regnum, (char *) &cr); - regcache_raw_supply (regcache, tdep->ppc_lr_regnum, (char *) &lr); - regcache_raw_supply (regcache, tdep->ppc_ctr_regnum, (char *) &ctr); - regcache_raw_supply (regcache, tdep->ppc_xer_regnum, (char *) &xer); + regcache->raw_supply (gdbarch_pc_regnum (gdbarch), (char *) &iar); + regcache->raw_supply (tdep->ppc_ps_regnum, (char *) &msr); + regcache->raw_supply (tdep->ppc_cr_regnum, (char *) &cr); + regcache->raw_supply (tdep->ppc_lr_regnum, (char *) &lr); + regcache->raw_supply (tdep->ppc_ctr_regnum, (char *) &ctr); + regcache->raw_supply (tdep->ppc_xer_regnum, (char *) &xer); if (tdep->ppc_fpscr_regnum >= 0) - regcache_raw_supply (regcache, tdep->ppc_fpscr_regnum, - (char *) &fpscr); + regcache->raw_supply (tdep->ppc_fpscr_regnum, (char *) &fpscr); } /* Fetch all registers from pthread PDTID, which doesn't have a kernel @@ -1349,8 +1345,7 @@ fetch_regs_kernel_thread (struct regcache *regcache, int regno, sprs32.pt_fpscr); if (tdep->ppc_mq_regnum >= 0) - regcache_raw_supply (regcache, tdep->ppc_mq_regnum, - (char *) &sprs32.pt_mq); + regcache->raw_supply (tdep->ppc_mq_regnum, (char *) &sprs32.pt_mq); } } } diff --git a/gdb/alpha-bsd-nat.c b/gdb/alpha-bsd-nat.c index e889d22..7a3fe9b 100644 --- a/gdb/alpha-bsd-nat.c +++ b/gdb/alpha-bsd-nat.c @@ -182,12 +182,11 @@ alphabsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) if (pcb->pcb_hw.apcb_ksp == 0) return 0; - regcache_raw_supply (regcache, ALPHA_SP_REGNUM, &pcb->pcb_hw.apcb_ksp); + regcache->raw_supply (ALPHA_SP_REGNUM, &pcb->pcb_hw.apcb_ksp); for (regnum = ALPHA_S0_REGNUM; regnum < ALPHA_A0_REGNUM; regnum++) - regcache_raw_supply (regcache, regnum, - &pcb->pcb_context[regnum - ALPHA_S0_REGNUM]); - regcache_raw_supply (regcache, ALPHA_RA_REGNUM, &pcb->pcb_context[7]); + regcache->raw_supply (regnum, &pcb->pcb_context[regnum - ALPHA_S0_REGNUM]); + regcache->raw_supply (ALPHA_RA_REGNUM, &pcb->pcb_context[7]); return 1; } diff --git a/gdb/alpha-nbsd-tdep.c b/gdb/alpha-nbsd-tdep.c index 970526e..dffab3f 100644 --- a/gdb/alpha-nbsd-tdep.c +++ b/gdb/alpha-nbsd-tdep.c @@ -58,11 +58,11 @@ alphanbsd_supply_fpregset (const struct regset *regset, for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; i++) { if (regnum == i || regnum == -1) - regcache_raw_supply (regcache, i, regs + (i - ALPHA_FP0_REGNUM) * 8); + regcache->raw_supply (i, regs + (i - ALPHA_FP0_REGNUM) * 8); } if (regnum == ALPHA_FPCR_REGNUM || regnum == -1) - regcache_raw_supply (regcache, ALPHA_FPCR_REGNUM, regs + 32 * 8); + regcache->raw_supply (ALPHA_FPCR_REGNUM, regs + 32 * 8); } /* Supply register REGNUM from the buffer specified by GREGS and LEN @@ -95,11 +95,11 @@ alphanbsd_aout_supply_gregset (const struct regset *regset, for (i = 0; i < ARRAY_SIZE(regmap); i++) { if (regnum == i || regnum == -1) - regcache_raw_supply (regcache, i, regs + regmap[i] * 8); + regcache->raw_supply (i, regs + regmap[i] * 8); } if (regnum == ALPHA_PC_REGNUM || regnum == -1) - regcache_raw_supply (regcache, ALPHA_PC_REGNUM, regs + 31 * 8); + regcache->raw_supply (ALPHA_PC_REGNUM, regs + 31 * 8); if (len >= ALPHANBSD_SIZEOF_GREGS + ALPHANBSD_SIZEOF_FPREGS) { @@ -130,11 +130,11 @@ alphanbsd_supply_gregset (const struct regset *regset, for (i = 0; i < ALPHA_ZERO_REGNUM; i++) { if (regnum == i || regnum == -1) - regcache_raw_supply (regcache, i, regs + i * 8); + regcache->raw_supply (i, regs + i * 8); } if (regnum == ALPHA_PC_REGNUM || regnum == -1) - regcache_raw_supply (regcache, ALPHA_PC_REGNUM, regs + 31 * 8); + regcache->raw_supply (ALPHA_PC_REGNUM, regs + 31 * 8); } /* NetBSD/alpha register sets. */ diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 408bedc..8ca1e51 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -1499,20 +1499,20 @@ alpha_supply_int_regs (struct regcache *regcache, int regno, for (i = 0; i < 31; ++i) if (regno == i || regno == -1) - regcache_raw_supply (regcache, i, regs + i * 8); + regcache->raw_supply (i, regs + i * 8); if (regno == ALPHA_ZERO_REGNUM || regno == -1) { const gdb_byte zero[8] = { 0 }; - regcache_raw_supply (regcache, ALPHA_ZERO_REGNUM, zero); + regcache->raw_supply (ALPHA_ZERO_REGNUM, zero); } if (regno == ALPHA_PC_REGNUM || regno == -1) - regcache_raw_supply (regcache, ALPHA_PC_REGNUM, pc); + regcache->raw_supply (ALPHA_PC_REGNUM, pc); if (regno == ALPHA_UNIQUE_REGNUM || regno == -1) - regcache_raw_supply (regcache, ALPHA_UNIQUE_REGNUM, unique); + regcache->raw_supply (ALPHA_UNIQUE_REGNUM, unique); } void @@ -1542,11 +1542,10 @@ alpha_supply_fp_regs (struct regcache *regcache, int regno, for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; ++i) if (regno == i || regno == -1) - regcache_raw_supply (regcache, i, - regs + (i - ALPHA_FP0_REGNUM) * 8); + regcache->raw_supply (i, regs + (i - ALPHA_FP0_REGNUM) * 8); if (regno == ALPHA_FPCR_REGNUM || regno == -1) - regcache_raw_supply (regcache, ALPHA_FPCR_REGNUM, fpcr); + regcache->raw_supply (ALPHA_FPCR_REGNUM, fpcr); } void diff --git a/gdb/amd64-bsd-nat.c b/gdb/amd64-bsd-nat.c index 81ba835..6c46303 100644 --- a/gdb/amd64-bsd-nat.c +++ b/gdb/amd64-bsd-nat.c @@ -64,7 +64,7 @@ amd64bsd_fetch_inferior_registers (struct regcache *regcache, int regnum) if (ptrace (PT_GETFSBASE, pid, (PTRACE_TYPE_ARG3) &base, 0) == -1) perror_with_name (_("Couldn't get segment register fs_base")); - regcache_raw_supply (regcache, AMD64_FSBASE_REGNUM, &base); + regcache->raw_supply (AMD64_FSBASE_REGNUM, &base); if (regnum != -1) return; } @@ -77,7 +77,7 @@ amd64bsd_fetch_inferior_registers (struct regcache *regcache, int regnum) if (ptrace (PT_GETGSBASE, pid, (PTRACE_TYPE_ARG3) &base, 0) == -1) perror_with_name (_("Couldn't get segment register gs_base")); - regcache_raw_supply (regcache, AMD64_GSBASE_REGNUM, &base); + regcache->raw_supply (AMD64_GSBASE_REGNUM, &base); if (regnum != -1) return; } diff --git a/gdb/amd64-fbsd-nat.c b/gdb/amd64-fbsd-nat.c index 6e0a1f9..6b0367b 100644 --- a/gdb/amd64-fbsd-nat.c +++ b/gdb/amd64-fbsd-nat.c @@ -131,24 +131,24 @@ amd64fbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) return 0; pcb->pcb_rsp += 8; - regcache_raw_supply (regcache, AMD64_RIP_REGNUM, &pcb->pcb_rip); - regcache_raw_supply (regcache, AMD64_RBX_REGNUM, &pcb->pcb_rbx); - regcache_raw_supply (regcache, AMD64_RSP_REGNUM, &pcb->pcb_rsp); - regcache_raw_supply (regcache, AMD64_RBP_REGNUM, &pcb->pcb_rbp); - regcache_raw_supply (regcache, 12, &pcb->pcb_r12); - regcache_raw_supply (regcache, 13, &pcb->pcb_r13); - regcache_raw_supply (regcache, 14, &pcb->pcb_r14); - regcache_raw_supply (regcache, 15, &pcb->pcb_r15); + regcache->raw_supply (AMD64_RIP_REGNUM, &pcb->pcb_rip); + regcache->raw_supply (AMD64_RBX_REGNUM, &pcb->pcb_rbx); + regcache->raw_supply (AMD64_RSP_REGNUM, &pcb->pcb_rsp); + regcache->raw_supply (AMD64_RBP_REGNUM, &pcb->pcb_rbp); + regcache->raw_supply (12, &pcb->pcb_r12); + regcache->raw_supply (13, &pcb->pcb_r13); + regcache->raw_supply (14, &pcb->pcb_r14); + regcache->raw_supply (15, &pcb->pcb_r15); #if (__FreeBSD_version < 800075) && (__FreeBSD_kernel_version < 800075) /* struct pcb provides the pcb_ds/pcb_es/pcb_fs/pcb_gs fields only up until __FreeBSD_version 800074: The removal of these fields occurred on 2009-04-01 while the __FreeBSD_version number was bumped to 800075 on 2009-04-06. So 800075 is the closest version number where we should not try to access these fields. */ - regcache_raw_supply (regcache, AMD64_DS_REGNUM, &pcb->pcb_ds); - regcache_raw_supply (regcache, AMD64_ES_REGNUM, &pcb->pcb_es); - regcache_raw_supply (regcache, AMD64_FS_REGNUM, &pcb->pcb_fs); - regcache_raw_supply (regcache, AMD64_GS_REGNUM, &pcb->pcb_gs); + regcache->raw_supply (AMD64_DS_REGNUM, &pcb->pcb_ds); + regcache->raw_supply (AMD64_ES_REGNUM, &pcb->pcb_es); + regcache->raw_supply (AMD64_FS_REGNUM, &pcb->pcb_fs); + regcache->raw_supply (AMD64_GS_REGNUM, &pcb->pcb_gs); #endif return 1; diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c index 17de388..623a90e 100644 --- a/gdb/amd64-linux-nat.c +++ b/gdb/amd64-linux-nat.c @@ -200,7 +200,7 @@ amd64_linux_nat_target::fetch_registers (struct regcache *regcache, int regnum) if (ptrace (PTRACE_ARCH_PRCTL, tid, &base, ARCH_GET_FS) < 0) perror_with_name (_("Couldn't get segment register fs_base")); - regcache_raw_supply (regcache, AMD64_FSBASE_REGNUM, &base); + regcache->raw_supply (AMD64_FSBASE_REGNUM, &base); } if (regnum == -1 || regnum == AMD64_GSBASE_REGNUM) @@ -208,7 +208,7 @@ amd64_linux_nat_target::fetch_registers (struct regcache *regcache, int regnum) if (ptrace (PTRACE_ARCH_PRCTL, tid, &base, ARCH_GET_GS) < 0) perror_with_name (_("Couldn't get segment register gs_base")); - regcache_raw_supply (regcache, AMD64_GSBASE_REGNUM, &base); + regcache->raw_supply (AMD64_GSBASE_REGNUM, &base); } } #endif diff --git a/gdb/amd64-nat.c b/gdb/amd64-nat.c index 12d364a..5dde69c 100644 --- a/gdb/amd64-nat.c +++ b/gdb/amd64-nat.c @@ -113,7 +113,7 @@ amd64_supply_native_gregset (struct regcache *regcache, int offset = amd64_native_gregset_reg_offset (gdbarch, i); if (offset != -1) - regcache_raw_supply (regcache, i, regs + offset); + regcache->raw_supply (i, regs + offset); } } } diff --git a/gdb/amd64-obsd-nat.c b/gdb/amd64-obsd-nat.c index 0e89e3f..c0d6a33 100644 --- a/gdb/amd64-obsd-nat.c +++ b/gdb/amd64-obsd-nat.c @@ -106,22 +106,22 @@ amd64obsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) { /* Yes, we have a frame that matches cpu_switch(). */ pcb->pcb_rsp += sizeof (struct switchframe); - regcache_raw_supply (regcache, 12, &sf.sf_r12); - regcache_raw_supply (regcache, 13, &sf.sf_r13); - regcache_raw_supply (regcache, 14, &sf.sf_r14); - regcache_raw_supply (regcache, 15, &sf.sf_r15); - regcache_raw_supply (regcache, AMD64_RBX_REGNUM, &sf.sf_rbx); - regcache_raw_supply (regcache, AMD64_RIP_REGNUM, &sf.sf_rip); + regcache->raw_supply (12, &sf.sf_r12); + regcache->raw_supply (13, &sf.sf_r13); + regcache->raw_supply (14, &sf.sf_r14); + regcache->raw_supply (15, &sf.sf_r15); + regcache->raw_supply (AMD64_RBX_REGNUM, &sf.sf_rbx); + regcache->raw_supply (AMD64_RIP_REGNUM, &sf.sf_rip); } else { /* No, the pcb must have been last updated by savectx(). */ pcb->pcb_rsp += 8; - regcache_raw_supply (regcache, AMD64_RIP_REGNUM, &sf); + regcache->raw_supply (AMD64_RIP_REGNUM, &sf); } - regcache_raw_supply (regcache, AMD64_RSP_REGNUM, &pcb->pcb_rsp); - regcache_raw_supply (regcache, AMD64_RBP_REGNUM, &pcb->pcb_rbp); + regcache->raw_supply (AMD64_RSP_REGNUM, &pcb->pcb_rsp); + regcache->raw_supply (AMD64_RBP_REGNUM, &pcb->pcb_rbp); return 1; } diff --git a/gdb/amd64-obsd-tdep.c b/gdb/amd64-obsd-tdep.c index b1be933..4089200 100644 --- a/gdb/amd64-obsd-tdep.c +++ b/gdb/amd64-obsd-tdep.c @@ -241,7 +241,7 @@ amd64obsd_supply_uthread (struct regcache *regcache, returned from _thread_machdep_switch. */ offset = amd64obsd_uthread_reg_offset[AMD64_RIP_REGNUM] + 8; store_unsigned_integer (buf, 8, byte_order, sp + offset); - regcache_raw_supply (regcache, AMD64_RSP_REGNUM, buf); + regcache->raw_supply (AMD64_RSP_REGNUM, buf); } for (i = 0; i < ARRAY_SIZE (amd64obsd_uthread_reg_offset); i++) @@ -256,7 +256,7 @@ amd64obsd_supply_uthread (struct regcache *regcache, /* Read the saved register from the stack frame. */ read_memory (sp + amd64obsd_uthread_reg_offset[i], buf, 8); - regcache_raw_supply (regcache, i, buf); + regcache->raw_supply (i, buf); } } } diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 975c907..8b925fd 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -3349,9 +3349,9 @@ amd64_supply_fxsave (struct regcache *regcache, int regnum, const gdb_byte *regs = (const gdb_byte *) fxsave; if (regnum == -1 || regnum == I387_FISEG_REGNUM (tdep)) - regcache_raw_supply (regcache, I387_FISEG_REGNUM (tdep), regs + 12); + regcache->raw_supply (I387_FISEG_REGNUM (tdep), regs + 12); if (regnum == -1 || regnum == I387_FOSEG_REGNUM (tdep)) - regcache_raw_supply (regcache, I387_FOSEG_REGNUM (tdep), regs + 20); + regcache->raw_supply (I387_FOSEG_REGNUM (tdep), regs + 20); } } @@ -3381,11 +3381,9 @@ amd64_supply_xsave (struct regcache *regcache, int regnum, if (!(clear_bv & X86_XSTATE_X87)) { if (regnum == -1 || regnum == I387_FISEG_REGNUM (tdep)) - regcache_raw_supply (regcache, I387_FISEG_REGNUM (tdep), - regs + 12); + regcache->raw_supply (I387_FISEG_REGNUM (tdep), regs + 12); if (regnum == -1 || regnum == I387_FOSEG_REGNUM (tdep)) - regcache_raw_supply (regcache, I387_FOSEG_REGNUM (tdep), - regs + 20); + regcache->raw_supply (I387_FOSEG_REGNUM (tdep), regs + 20); } } } diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index e3cce49..b3169ca 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -946,7 +946,7 @@ default_guess_tracepoint_registers (struct gdbarch *gdbarch, regs = (gdb_byte *) alloca (register_size (gdbarch, pc_regno)); store_unsigned_integer (regs, register_size (gdbarch, pc_regno), gdbarch_byte_order (gdbarch), addr); - regcache_raw_supply (regcache, pc_regno, regs); + regcache->raw_supply (pc_regno, regs); } int diff --git a/gdb/arm-bsd-tdep.c b/gdb/arm-bsd-tdep.c index 7c820d0..a2719ca 100644 --- a/gdb/arm-bsd-tdep.c +++ b/gdb/arm-bsd-tdep.c @@ -58,7 +58,7 @@ armbsd_supply_fpregset (const struct regset *regset, for (i = ARM_F0_REGNUM; i <= ARM_FPS_REGNUM; i++) { if (regnum == i || regnum == -1) - regcache_raw_supply (regcache, i, regs + armbsd_fpreg_offset (i)); + regcache->raw_supply (i, regs + armbsd_fpreg_offset (i)); } } @@ -79,11 +79,11 @@ armbsd_supply_gregset (const struct regset *regset, for (i = ARM_A1_REGNUM; i <= ARM_PC_REGNUM; i++) { if (regnum == i || regnum == -1) - regcache_raw_supply (regcache, i, regs + i * 4); + regcache->raw_supply (i, regs + i * 4); } if (regnum == ARM_PS_REGNUM || regnum == -1) - regcache_raw_supply (regcache, i, regs + 16 * 4); + regcache->raw_supply (i, regs + 16 * 4); if (len >= ARMBSD_SIZEOF_GREGS + ARMBSD_SIZEOF_FPREGS) { diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c index a1bef7a..163e1be 100644 --- a/gdb/arm-linux-nat.c +++ b/gdb/arm-linux-nat.c @@ -138,8 +138,7 @@ fetch_fpregs (struct regcache *regcache) perror_with_name (_("Unable to fetch the floating point registers.")); /* Fetch fpsr. */ - regcache_raw_supply (regcache, ARM_FPS_REGNUM, - fp + NWFPE_FPSR_OFFSET); + regcache->raw_supply (ARM_FPS_REGNUM, fp + NWFPE_FPSR_OFFSET); /* Fetch the floating point registers. */ for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++) @@ -292,16 +291,15 @@ fetch_wmmx_regs (struct regcache *regcache) perror_with_name (_("Unable to fetch WMMX registers.")); for (regno = 0; regno < 16; regno++) - regcache_raw_supply (regcache, regno + ARM_WR0_REGNUM, - ®buf[regno * 8]); + regcache->raw_supply (regno + ARM_WR0_REGNUM, ®buf[regno * 8]); for (regno = 0; regno < 2; regno++) - regcache_raw_supply (regcache, regno + ARM_WCSSF_REGNUM, - ®buf[16 * 8 + regno * 4]); + regcache->raw_supply (regno + ARM_WCSSF_REGNUM, + ®buf[16 * 8 + regno * 4]); for (regno = 0; regno < 4; regno++) - regcache_raw_supply (regcache, regno + ARM_WCGR0_REGNUM, - ®buf[16 * 8 + 2 * 4 + regno * 4]); + regcache->raw_supply (regno + ARM_WCGR0_REGNUM, + ®buf[16 * 8 + 2 * 4 + regno * 4]); } static void diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index e8f8c4e..d8a8347 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -487,16 +487,15 @@ arm_linux_supply_gregset (const struct regset *regset, for (regno = ARM_A1_REGNUM; regno < ARM_PC_REGNUM; regno++) if (regnum == -1 || regnum == regno) - regcache_raw_supply (regcache, regno, - gregs + INT_REGISTER_SIZE * regno); + regcache->raw_supply (regno, gregs + INT_REGISTER_SIZE * regno); if (regnum == ARM_PS_REGNUM || regnum == -1) { if (arm_apcs_32) - regcache_raw_supply (regcache, ARM_PS_REGNUM, - gregs + INT_REGISTER_SIZE * ARM_CPSR_GREGNUM); + regcache->raw_supply (ARM_PS_REGNUM, + gregs + INT_REGISTER_SIZE * ARM_CPSR_GREGNUM); else - regcache_raw_supply (regcache, ARM_PS_REGNUM, + regcache->raw_supply (ARM_PS_REGNUM, gregs + INT_REGISTER_SIZE * ARM_PC_REGNUM); } @@ -507,7 +506,7 @@ arm_linux_supply_gregset (const struct regset *regset, INT_REGISTER_SIZE, byte_order); reg_pc = gdbarch_addr_bits_remove (gdbarch, reg_pc); store_unsigned_integer (pc_buf, INT_REGISTER_SIZE, byte_order, reg_pc); - regcache_raw_supply (regcache, ARM_PC_REGNUM, pc_buf); + regcache->raw_supply (ARM_PC_REGNUM, pc_buf); } } @@ -578,7 +577,7 @@ supply_nwfpe_register (struct regcache *regcache, int regno, break; } - regcache_raw_supply (regcache, regno, buf); + regcache->raw_supply (regno, buf); } void @@ -627,7 +626,7 @@ arm_linux_supply_nwfpe (const struct regset *regset, int regno; if (regnum == ARM_FPS_REGNUM || regnum == -1) - regcache_raw_supply (regcache, ARM_FPS_REGNUM, + regcache->raw_supply (ARM_FPS_REGNUM, regs + NWFPE_FPSR_OFFSET); for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++) @@ -665,12 +664,11 @@ arm_linux_supply_vfp (const struct regset *regset, int regno; if (regnum == ARM_FPSCR_REGNUM || regnum == -1) - regcache_raw_supply (regcache, ARM_FPSCR_REGNUM, regs + 32 * 8); + regcache->raw_supply (ARM_FPSCR_REGNUM, regs + 32 * 8); for (regno = ARM_D0_REGNUM; regno <= ARM_D31_REGNUM; regno++) if (regnum == -1 || regnum == regno) - regcache_raw_supply (regcache, regno, - regs + (regno - ARM_D0_REGNUM) * 8); + regcache->raw_supply (regno, regs + (regno - ARM_D0_REGNUM) * 8); } static void diff --git a/gdb/arm-nbsd-nat.c b/gdb/arm-nbsd-nat.c index 3d64346..a641ccb 100644 --- a/gdb/arm-nbsd-nat.c +++ b/gdb/arm-nbsd-nat.c @@ -50,22 +50,18 @@ arm_supply_gregset (struct regcache *regcache, struct reg *gregset) /* Integer registers. */ for (regno = ARM_A1_REGNUM; regno < ARM_SP_REGNUM; regno++) - regcache_raw_supply (regcache, regno, (char *) &gregset->r[regno]); + regcache->raw_supply (regno, (char *) &gregset->r[regno]); - regcache_raw_supply (regcache, ARM_SP_REGNUM, - (char *) &gregset->r_sp); - regcache_raw_supply (regcache, ARM_LR_REGNUM, - (char *) &gregset->r_lr); + regcache->raw_supply (ARM_SP_REGNUM, (char *) &gregset->r_sp); + regcache->raw_supply (ARM_LR_REGNUM, (char *) &gregset->r_lr); /* This is ok: we're running native... */ r_pc = gdbarch_addr_bits_remove (regcache->arch (), gregset->r_pc); - regcache_raw_supply (regcache, ARM_PC_REGNUM, (char *) &r_pc); + regcache->raw_supply (ARM_PC_REGNUM, (char *) &r_pc); if (arm_apcs_32) - regcache_raw_supply (regcache, ARM_PS_REGNUM, - (char *) &gregset->r_cpsr); + regcache->raw_supply (ARM_PS_REGNUM, (char *) &gregset->r_cpsr); else - regcache_raw_supply (regcache, ARM_PS_REGNUM, - (char *) &gregset->r_pc); + regcache->raw_supply (ARM_PS_REGNUM, (char *) &gregset->r_pc); } static void @@ -74,11 +70,10 @@ arm_supply_fparegset (struct regcache *regcache, struct fpreg *fparegset) int regno; for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++) - regcache_raw_supply (regcache, regno, - (char *) &fparegset->fpr[regno - ARM_F0_REGNUM]); + regcache->raw_supply (regno, + (char *) &fparegset->fpr[regno - ARM_F0_REGNUM]); - regcache_raw_supply (regcache, ARM_FPS_REGNUM, - (char *) &fparegset->fpr_fpsr); + regcache->raw_supply (ARM_FPS_REGNUM, (char *) &fparegset->fpr_fpsr); } static void @@ -99,13 +94,11 @@ fetch_register (struct regcache *regcache, int regno) switch (regno) { case ARM_SP_REGNUM: - regcache_raw_supply (regcache, ARM_SP_REGNUM, - (char *) &inferior_registers.r_sp); + regcache->raw_supply (ARM_SP_REGNUM, (char *) &inferior_registers.r_sp); break; case ARM_LR_REGNUM: - regcache_raw_supply (regcache, ARM_LR_REGNUM, - (char *) &inferior_registers.r_lr); + regcache->raw_supply (ARM_LR_REGNUM, (char *) &inferior_registers.r_lr); break; case ARM_PC_REGNUM: @@ -113,22 +106,20 @@ fetch_register (struct regcache *regcache, int regno) inferior_registers.r_pc = gdbarch_addr_bits_remove (regcache->arch (), inferior_registers.r_pc); - regcache_raw_supply (regcache, ARM_PC_REGNUM, - (char *) &inferior_registers.r_pc); + regcache->raw_supply (ARM_PC_REGNUM, (char *) &inferior_registers.r_pc); break; case ARM_PS_REGNUM: if (arm_apcs_32) - regcache_raw_supply (regcache, ARM_PS_REGNUM, - (char *) &inferior_registers.r_cpsr); + regcache->raw_supply (ARM_PS_REGNUM, + (char *) &inferior_registers.r_cpsr); else - regcache_raw_supply (regcache, ARM_PS_REGNUM, - (char *) &inferior_registers.r_pc); + regcache->raw_supply (ARM_PS_REGNUM, + (char *) &inferior_registers.r_pc); break; default: - regcache_raw_supply (regcache, regno, - (char *) &inferior_registers.r[regno]); + regcache->raw_supply (regno, (char *) &inferior_registers.r[regno]); break; } } @@ -170,13 +161,13 @@ fetch_fp_register (struct regcache *regcache, int regno) switch (regno) { case ARM_FPS_REGNUM: - regcache_raw_supply (regcache, ARM_FPS_REGNUM, - (char *) &inferior_fp_registers.fpr_fpsr); + regcache->raw_supply (ARM_FPS_REGNUM, + (char *) &inferior_fp_registers.fpr_fpsr); break; default: - regcache_raw_supply (regcache, regno, - (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]); + regcache->raw_supply + (regno, (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]); break; } } diff --git a/gdb/corelow.c b/gdb/corelow.c index 0a7d742..a816395 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -705,7 +705,7 @@ core_target::fetch_registers (struct regcache *regcache, int regno) /* Mark all registers not found in the core as unavailable. */ for (i = 0; i < gdbarch_num_regs (regcache->arch ()); i++) if (regcache->get_register_status (i) == REG_UNKNOWN) - regcache_raw_supply (regcache, i, NULL); + regcache->raw_supply (i, NULL); } void diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index a0fb3b2..e0371a2 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -3809,7 +3809,7 @@ cris_supply_gregset (struct regcache *regcache, cris_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++) { - regcache_raw_supply (regcache, i, (char *)®p[i]); + regcache->raw_supply (i, (char *)®p[i]); } if (tdep->cris_version == 32) @@ -3817,8 +3817,8 @@ cris_supply_gregset (struct regcache *regcache, cris_elf_gregset_t *gregsetp) /* Needed to set pseudo-register PC for CRISv32. */ /* FIXME: If ERP is in a delay slot at this point then the PC will be wrong. Issue a warning to alert the user. */ - regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch), - (char *)®p[ERP_REGNUM]); + regcache->raw_supply (gdbarch_pc_regnum (gdbarch), + (char *)®p[ERP_REGNUM]); if (*(char *)®p[ERP_REGNUM] & 0x1) fprintf_unfiltered (gdb_stderr, "Warning: PC in delay slot\n"); @@ -1266,12 +1266,12 @@ ctf_target::fetch_registers (struct regcache *regcache, int regno) { if (regno == regn) { - regcache_raw_supply (regcache, regno, regs + offset); + regcache->raw_supply (regno, regs + offset); break; } else if (regno == -1) { - regcache_raw_supply (regcache, regn, regs + offset); + regcache->raw_supply (regn, regs + offset); } } offset += regsize; diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c index 980180b..a2affe1 100644 --- a/gdb/go32-nat.c +++ b/gdb/go32-nat.c @@ -541,8 +541,8 @@ fetch_register (struct regcache *regcache, int regno) { struct gdbarch *gdbarch = regcache->arch (); if (regno < gdbarch_fp0_regnum (gdbarch)) - regcache_raw_supply (regcache, regno, - (char *) &a_tss + regno_mapping[regno].tss_ofs); + regcache->raw_supply (regno, + (char *) &a_tss + regno_mapping[regno].tss_ofs); else if (i386_fp_regnum_p (gdbarch, regno) || i386_fpc_regnum_p (gdbarch, regno)) i387_supply_fsave (regcache, regno, &npx); diff --git a/gdb/hppa-linux-nat.c b/gdb/hppa-linux-nat.c index 39ae83f..7dea079 100644 --- a/gdb/hppa-linux-nat.c +++ b/gdb/hppa-linux-nat.c @@ -229,7 +229,7 @@ fetch_register (struct regcache *regcache, int regno) if (gdbarch_cannot_fetch_register (gdbarch, regno)) { - regcache_raw_supply (regcache, regno, NULL); + regcache->raw_supply (regno, NULL); return; } @@ -242,7 +242,7 @@ fetch_register (struct regcache *regcache, int regno) gdbarch_register_name (gdbarch, regno), regno, safe_strerror (errno)); - regcache_raw_supply (regcache, regno, &val); + regcache->raw_supply (regno, &val); } /* Store one register. */ @@ -321,7 +321,7 @@ supply_gregset (struct regcache *regcache, const gdb_gregset_t *gregsetp) for (i = 0; i < sizeof (greg_map) / sizeof (greg_map[0]); i++, regp++) { int regno = greg_map[i]; - regcache_raw_supply (regcache, regno, regp); + regcache->raw_supply (regno, regp); } } @@ -359,8 +359,8 @@ supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp) for (regi = 0; regi <= 31; regi++) { from = (const char *) &((*fpregsetp)[regi]); - regcache_raw_supply (regcache, 2*regi + HPPA_FP0_REGNUM, from); - regcache_raw_supply (regcache, 2*regi + HPPA_FP0_REGNUM + 1, from + 4); + regcache->raw_supply (2*regi + HPPA_FP0_REGNUM, from); + regcache->raw_supply (2*regi + HPPA_FP0_REGNUM + 1, from + 4); } } diff --git a/gdb/hppa-nbsd-nat.c b/gdb/hppa-nbsd-nat.c index 2ffa5bc..99dfd32 100644 --- a/gdb/hppa-nbsd-nat.c +++ b/gdb/hppa-nbsd-nat.c @@ -63,19 +63,19 @@ hppanbsd_supply_gregset (struct regcache *regcache, const void *gregs) int regnum; for (regnum = HPPA_R1_REGNUM; regnum <= HPPA_R31_REGNUM; regnum++) - regcache_raw_supply (regcache, regnum, regs + regnum * 4); - - regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs + 32 * 4); - regcache_raw_supply (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4); - regcache_raw_supply (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4); - regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4); - regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4); - regcache_raw_supply (regcache, HPPA_IPSW_REGNUM, regs); - regcache_raw_supply (regcache, HPPA_SR4_REGNUM, regs + 41 * 4); - regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 1, regs + 37 * 4); - regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 2, regs + 38 * 4); - regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 3, regs + 39 * 4); - regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 4, regs + 40 * 4); + regcache->raw_supply (regnum, regs + regnum * 4); + + regcache->raw_supply (HPPA_SAR_REGNUM, regs + 32 * 4); + regcache->raw_supply (HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4); + regcache->raw_supply (HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4); + regcache->raw_supply (HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4); + regcache->raw_supply (HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4); + regcache->raw_supply (HPPA_IPSW_REGNUM, regs); + regcache->raw_supply (HPPA_SR4_REGNUM, regs + 41 * 4); + regcache->raw_supply (HPPA_SR4_REGNUM + 1, regs + 37 * 4); + regcache->raw_supply (HPPA_SR4_REGNUM + 2, regs + 38 * 4); + regcache->raw_supply (HPPA_SR4_REGNUM + 3, regs + 39 * 4); + regcache->raw_supply (HPPA_SR4_REGNUM + 4, regs + 40 * 4); } /* Supply the floating-point registers stored in FPREGS to REGCACHE. */ @@ -89,8 +89,8 @@ hppanbsd_supply_fpregset (struct regcache *regcache, const void *fpregs) for (regnum = HPPA_FP0_REGNUM; regnum <= HPPA_FP31R_REGNUM; regnum += 2, regs += 8) { - regcache_raw_supply (regcache, regnum, regs); - regcache_raw_supply (regcache, regnum + 1, regs + 4); + regcache->raw_supply (regnum, regs); + regcache->raw_supply (regnum + 1, regs + 4); } } diff --git a/gdb/hppa-nbsd-tdep.c b/gdb/hppa-nbsd-tdep.c index 05249b6..f9932b5 100644 --- a/gdb/hppa-nbsd-tdep.c +++ b/gdb/hppa-nbsd-tdep.c @@ -171,7 +171,7 @@ hppanbsd_supply_gregset (const struct regset *regset, for (i = 0; i < ARRAY_SIZE (hppanbsd_reg_offset); i++) if (hppanbsd_reg_offset[i] != -1) if (regnum == -1 || regnum == i) - regcache_raw_supply (regcache, i, regs + hppanbsd_reg_offset[i]); + regcache->raw_supply (i, regs + hppanbsd_reg_offset[i]); } /* NetBSD/hppa register set. */ diff --git a/gdb/hppa-obsd-nat.c b/gdb/hppa-obsd-nat.c index 2ef2f7e..53880f6 100644 --- a/gdb/hppa-obsd-nat.c +++ b/gdb/hppa-obsd-nat.c @@ -60,34 +60,34 @@ hppaobsd_supply_gregset (struct regcache *regcache, const void *gregs) const char *regs = gregs; int regnum; - regcache_raw_supply (regcache, HPPA_R0_REGNUM, &zero); + regcache->raw_supply (HPPA_R0_REGNUM, &zero); for (regnum = HPPA_R1_REGNUM; regnum <= HPPA_R31_REGNUM; regnum++) - regcache_raw_supply (regcache, regnum, regs + regnum * 4); + regcache->raw_supply (regnum, regs + regnum * 4); if (sizeof(struct reg) >= 46 * 4) { - regcache_raw_supply (regcache, HPPA_IPSW_REGNUM, regs); - regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs + 32 * 4); - regcache_raw_supply (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4); - regcache_raw_supply (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4); - regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4); - regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4); - regcache_raw_supply (regcache, HPPA_SR0_REGNUM, regs + 37 * 4); - regcache_raw_supply (regcache, HPPA_SR1_REGNUM, regs + 38 * 4); - regcache_raw_supply (regcache, HPPA_SR2_REGNUM, regs + 39 * 4); - regcache_raw_supply (regcache, HPPA_SR3_REGNUM, regs + 40 * 4); - regcache_raw_supply (regcache, HPPA_SR4_REGNUM, regs + 41 * 4); - regcache_raw_supply (regcache, HPPA_SR5_REGNUM, regs + 42 * 4); - regcache_raw_supply (regcache, HPPA_SR6_REGNUM, regs + 43 * 4); - regcache_raw_supply (regcache, HPPA_SR7_REGNUM, regs + 44 * 4); - regcache_raw_supply (regcache, HPPA_CR26_REGNUM, regs + 45 * 4); - regcache_raw_supply (regcache, HPPA_CR27_REGNUM, regs + 46 * 4); + regcache->raw_supply (HPPA_IPSW_REGNUM, regs); + regcache->raw_supply (HPPA_SAR_REGNUM, regs + 32 * 4); + regcache->raw_supply (HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4); + regcache->raw_supply (HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4); + regcache->raw_supply (HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4); + regcache->raw_supply (HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4); + regcache->raw_supply (HPPA_SR0_REGNUM, regs + 37 * 4); + regcache->raw_supply (HPPA_SR1_REGNUM, regs + 38 * 4); + regcache->raw_supply (HPPA_SR2_REGNUM, regs + 39 * 4); + regcache->raw_supply (HPPA_SR3_REGNUM, regs + 40 * 4); + regcache->raw_supply (HPPA_SR4_REGNUM, regs + 41 * 4); + regcache->raw_supply (HPPA_SR5_REGNUM, regs + 42 * 4); + regcache->raw_supply (HPPA_SR6_REGNUM, regs + 43 * 4); + regcache->raw_supply (HPPA_SR7_REGNUM, regs + 44 * 4); + regcache->raw_supply (HPPA_CR26_REGNUM, regs + 45 * 4); + regcache->raw_supply (HPPA_CR27_REGNUM, regs + 46 * 4); } else { - regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs); - regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4); - regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4); + regcache->raw_supply (HPPA_SAR_REGNUM, regs); + regcache->raw_supply (HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4); + regcache->raw_supply (HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4); } } @@ -102,8 +102,8 @@ hppaobsd_supply_fpregset (struct regcache *regcache, const void *fpregs) for (regnum = HPPA_FP0_REGNUM; regnum <= HPPA_FP31R_REGNUM; regnum += 2, regs += 8) { - regcache_raw_supply (regcache, regnum, regs); - regcache_raw_supply (regcache, regnum + 1, regs + 4); + regcache->raw_supply (regnum, regs); + regcache->raw_supply (regnum + 1, regs + 4); } } diff --git a/gdb/hppa-obsd-tdep.c b/gdb/hppa-obsd-tdep.c index 974a072..403e9dd 100644 --- a/gdb/hppa-obsd-tdep.c +++ b/gdb/hppa-obsd-tdep.c @@ -51,56 +51,56 @@ hppaobsd_supply_gregset (const struct regset *regset, gdb_assert (len >= HPPAOBSD_SIZEOF_GREGS); if (regnum == -1 || regnum == HPPA_R0_REGNUM) - regcache_raw_supply (regcache, HPPA_R0_REGNUM, &zero); + regcache->raw_supply (HPPA_R0_REGNUM, &zero); for (i = HPPA_R1_REGNUM, offset = 4; i <= HPPA_R31_REGNUM; i++, offset += 4) { if (regnum == -1 || regnum == i) - regcache_raw_supply (regcache, i, regs + offset); + regcache->raw_supply (i, regs + offset); } if (len >= HPPANBSD_SIZEOF_GREGS) { if (regnum == -1 || regnum == HPPA_IPSW_REGNUM) - regcache_raw_supply (regcache, HPPA_IPSW_REGNUM, regs); + regcache->raw_supply (HPPA_IPSW_REGNUM, regs); if (regnum == -1 || regnum == HPPA_SAR_REGNUM) - regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs + 32 * 4); + regcache->raw_supply (HPPA_SAR_REGNUM, regs + 32 * 4); if (regnum == -1 || regnum == HPPA_PCSQ_HEAD_REGNUM) - regcache_raw_supply (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4); + regcache->raw_supply (HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4); if (regnum == -1 || regnum == HPPA_PCSQ_TAIL_REGNUM) - regcache_raw_supply (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4); + regcache->raw_supply (HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4); if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM) - regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4); + regcache->raw_supply (HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4); if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM) - regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4); + regcache->raw_supply (HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4); if (regnum == -1 || regnum == HPPA_SR0_REGNUM) - regcache_raw_supply (regcache, HPPA_SR0_REGNUM, regs + 37 * 4); + regcache->raw_supply (HPPA_SR0_REGNUM, regs + 37 * 4); if (regnum == -1 || regnum == HPPA_SR1_REGNUM) - regcache_raw_supply (regcache, HPPA_SR1_REGNUM, regs + 38 * 4); + regcache->raw_supply (HPPA_SR1_REGNUM, regs + 38 * 4); if (regnum == -1 || regnum == HPPA_SR2_REGNUM) - regcache_raw_supply (regcache, HPPA_SR2_REGNUM, regs + 39 * 4); + regcache->raw_supply (HPPA_SR2_REGNUM, regs + 39 * 4); if (regnum == -1 || regnum == HPPA_SR3_REGNUM) - regcache_raw_supply (regcache, HPPA_SR3_REGNUM, regs + 40 * 4); + regcache->raw_supply (HPPA_SR3_REGNUM, regs + 40 * 4); if (regnum == -1 || regnum == HPPA_SR4_REGNUM) - regcache_raw_supply (regcache, HPPA_SR4_REGNUM, regs + 41 * 4); + regcache->raw_supply (HPPA_SR4_REGNUM, regs + 41 * 4); if (regnum == -1 || regnum == HPPA_SR5_REGNUM) - regcache_raw_supply (regcache, HPPA_SR5_REGNUM, regs + 42 * 4); + regcache->raw_supply (HPPA_SR5_REGNUM, regs + 42 * 4); if (regnum == -1 || regnum == HPPA_SR6_REGNUM) - regcache_raw_supply (regcache, HPPA_SR6_REGNUM, regs + 43 * 4); + regcache->raw_supply (HPPA_SR6_REGNUM, regs + 43 * 4); if (regnum == -1 || regnum == HPPA_SR7_REGNUM) - regcache_raw_supply (regcache, HPPA_SR7_REGNUM, regs + 44 * 4); + regcache->raw_supply (HPPA_SR7_REGNUM, regs + 44 * 4); if (regnum == -1 || regnum == HPPA_CR26_REGNUM) - regcache_raw_supply (regcache, HPPA_CR26_REGNUM, regs + 45 * 4); + regcache->raw_supply (HPPA_CR26_REGNUM, regs + 45 * 4); if (regnum == -1 || regnum == HPPA_CR27_REGNUM) - regcache_raw_supply (regcache, HPPA_CR27_REGNUM, regs + 46 * 4); + regcache->raw_supply (HPPA_CR27_REGNUM, regs + 46 * 4); } else { if (regnum == -1 || regnum == HPPA_SAR_REGNUM) - regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs); + regcache->raw_supply (HPPA_SAR_REGNUM, regs); if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM) - regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4); + regcache->raw_supply (HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4); if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM) - regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4); + regcache->raw_supply (HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4); } } @@ -121,7 +121,7 @@ hppaobsd_supply_fpregset (const struct regset *regset, for (i = HPPA_FP0_REGNUM; i <= HPPA_FP31R_REGNUM; i++) { if (regnum == i || regnum == -1) - regcache_raw_supply (regcache, i, regs + (i - HPPA_FP0_REGNUM) * 4); + regcache->raw_supply (i, regs + (i - HPPA_FP0_REGNUM) * 4); } } diff --git a/gdb/i386-bsd-nat.c b/gdb/i386-bsd-nat.c index cca4629..2753366 100644 --- a/gdb/i386-bsd-nat.c +++ b/gdb/i386-bsd-nat.c @@ -97,7 +97,7 @@ i386bsd_supply_gregset (struct regcache *regcache, const void *gregs) int offset = i386bsd_r_reg_offset[regnum]; if (offset != -1) - regcache_raw_supply (regcache, regnum, regs + offset); + regcache->raw_supply (regnum, regs + offset); } } diff --git a/gdb/i386-darwin-nat.c b/gdb/i386-darwin-nat.c index 03adb20..2dbf95f 100644 --- a/gdb/i386-darwin-nat.c +++ b/gdb/i386-darwin-nat.c @@ -132,9 +132,8 @@ i386_darwin_nat_target::fetch_registers (struct regcache *regcache, int regno) MACH_CHECK_ERROR (ret); } for (i = 0; i < I386_NUM_GREGS; i++) - regcache_raw_supply - (regcache, i, - (char *)&gp_regs + i386_darwin_thread_state_reg_offset[i]); + regcache->raw_supply + (i, (char *) &gp_regs + i386_darwin_thread_state_reg_offset[i]); fetched++; } @@ -164,7 +163,7 @@ i386_darwin_nat_target::fetch_registers (struct regcache *regcache, int regno) if (! fetched) { warning (_("unknown register %d"), regno); - regcache_raw_supply (regcache, regno, NULL); + regcache->raw_supply (regno, NULL); } } diff --git a/gdb/i386-fbsd-nat.c b/gdb/i386-fbsd-nat.c index 0d3762a..46f9a86 100644 --- a/gdb/i386-fbsd-nat.c +++ b/gdb/i386-fbsd-nat.c @@ -123,13 +123,13 @@ i386fbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) return 0; pcb->pcb_esp += 4; - regcache_raw_supply (regcache, I386_EDI_REGNUM, &pcb->pcb_edi); - regcache_raw_supply (regcache, I386_ESI_REGNUM, &pcb->pcb_esi); - regcache_raw_supply (regcache, I386_EBP_REGNUM, &pcb->pcb_ebp); - regcache_raw_supply (regcache, I386_ESP_REGNUM, &pcb->pcb_esp); - regcache_raw_supply (regcache, I386_EBX_REGNUM, &pcb->pcb_ebx); - regcache_raw_supply (regcache, I386_EIP_REGNUM, &pcb->pcb_eip); - regcache_raw_supply (regcache, I386_GS_REGNUM, &pcb->pcb_gs); + regcache->raw_supply (I386_EDI_REGNUM, &pcb->pcb_edi); + regcache->raw_supply (I386_ESI_REGNUM, &pcb->pcb_esi); + regcache->raw_supply (I386_EBP_REGNUM, &pcb->pcb_ebp); + regcache->raw_supply (I386_ESP_REGNUM, &pcb->pcb_esp); + regcache->raw_supply (I386_EBX_REGNUM, &pcb->pcb_ebx); + regcache->raw_supply (I386_EIP_REGNUM, &pcb->pcb_eip); + regcache->raw_supply (I386_GS_REGNUM, &pcb->pcb_gs); return 1; } diff --git a/gdb/i386-gnu-nat.c b/gdb/i386-gnu-nat.c index a738308..1acfc07 100644 --- a/gdb/i386-gnu-nat.c +++ b/gdb/i386-gnu-nat.c @@ -138,7 +138,7 @@ gnu_fetch_registers (struct target_ops *ops, proc_debug (thread, "fetching all register"); for (i = 0; i < I386_NUM_GREGS; i++) - regcache_raw_supply (regcache, i, REG_ADDR (state, i)); + regcache->raw_supply (i, REG_ADDR (state, i)); thread->fetched_regs = ~0; } else @@ -147,8 +147,7 @@ gnu_fetch_registers (struct target_ops *ops, gdbarch_register_name (regcache->arch (), regno)); - regcache_raw_supply (regcache, regno, - REG_ADDR (state, regno)); + regcache->raw_supply (regno, REG_ADDR (state, regno)); thread->fetched_regs |= (1 << regno); } } @@ -250,8 +249,8 @@ gnu_store_registers (struct target_ops *ops, gdbarch_register_name (gdbarch, check_regno)); if (regno >= 0 && regno != check_regno) /* Update GDB's copy of the register. */ - regcache_raw_supply (regcache, check_regno, - REG_ADDR (state, check_regno)); + regcache->raw_supply (check_regno, + REG_ADDR (state, check_regno)); else warning (_("... also writing this register! " "Suspicious...")); diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c index 054638b..1d8483a 100644 --- a/gdb/i386-linux-nat.c +++ b/gdb/i386-linux-nat.c @@ -112,7 +112,7 @@ fetch_register (struct regcache *regcache, int regno) gdb_assert (!have_ptrace_getregs); if (i386_linux_gregset_reg_offset[regno] == -1) { - regcache_raw_supply (regcache, regno, NULL); + regcache->raw_supply (regno, NULL); return; } @@ -126,7 +126,7 @@ fetch_register (struct regcache *regcache, int regno) gdbarch_register_name (regcache->arch (), regno), regno, safe_strerror (errno)); - regcache_raw_supply (regcache, regno, &val); + regcache->raw_supply (regno, &val); } /* Store one register. */ @@ -167,13 +167,13 @@ supply_gregset (struct regcache *regcache, const elf_gregset_t *gregsetp) int i; for (i = 0; i < I386_NUM_GREGS; i++) - regcache_raw_supply (regcache, i, - regp + i386_linux_gregset_reg_offset[i]); + regcache->raw_supply (i, regp + i386_linux_gregset_reg_offset[i]); if (I386_LINUX_ORIG_EAX_REGNUM < gdbarch_num_regs (regcache->arch ())) - regcache_raw_supply (regcache, I386_LINUX_ORIG_EAX_REGNUM, regp - + i386_linux_gregset_reg_offset[I386_LINUX_ORIG_EAX_REGNUM]); + regcache->raw_supply + (I386_LINUX_ORIG_EAX_REGNUM, + regp + i386_linux_gregset_reg_offset[I386_LINUX_ORIG_EAX_REGNUM]); } /* Fill register REGNO (if it is a general-purpose register) in diff --git a/gdb/i386-nbsd-nat.c b/gdb/i386-nbsd-nat.c index bc875e0..dd1ac29 100644 --- a/gdb/i386-nbsd-nat.c +++ b/gdb/i386-nbsd-nat.c @@ -61,12 +61,12 @@ i386nbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) read_memory (pcb->pcb_esp, (gdb_byte *)&sf, sizeof sf); pcb->pcb_esp += sizeof (struct switchframe); - regcache_raw_supply (regcache, I386_EDI_REGNUM, &sf.sf_edi); - regcache_raw_supply (regcache, I386_ESI_REGNUM, &sf.sf_esi); - regcache_raw_supply (regcache, I386_EBP_REGNUM, &pcb->pcb_ebp); - regcache_raw_supply (regcache, I386_ESP_REGNUM, &pcb->pcb_esp); - regcache_raw_supply (regcache, I386_EBX_REGNUM, &sf.sf_ebx); - regcache_raw_supply (regcache, I386_EIP_REGNUM, &sf.sf_eip); + regcache->raw_supply (I386_EDI_REGNUM, &sf.sf_edi); + regcache->raw_supply (I386_ESI_REGNUM, &sf.sf_esi); + regcache->raw_supply (I386_EBP_REGNUM, &pcb->pcb_ebp); + regcache->raw_supply (I386_ESP_REGNUM, &pcb->pcb_esp); + regcache->raw_supply (I386_EBX_REGNUM, &sf.sf_ebx); + regcache->raw_supply (I386_EIP_REGNUM, &sf.sf_eip); return 1; } diff --git a/gdb/i386-obsd-nat.c b/gdb/i386-obsd-nat.c index a3221ed..faae83e 100644 --- a/gdb/i386-obsd-nat.c +++ b/gdb/i386-obsd-nat.c @@ -67,10 +67,10 @@ i386obsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) /* Yes, we have a frame that matches cpu_switch(). */ read_memory (pcb->pcb_esp, (gdb_byte *) &sf, sizeof sf); pcb->pcb_esp += sizeof (struct switchframe); - regcache_raw_supply (regcache, I386_EDI_REGNUM, &sf.sf_edi); - regcache_raw_supply (regcache, I386_ESI_REGNUM, &sf.sf_esi); - regcache_raw_supply (regcache, I386_EBX_REGNUM, &sf.sf_ebx); - regcache_raw_supply (regcache, I386_EIP_REGNUM, &sf.sf_eip); + regcache->raw_supply (I386_EDI_REGNUM, &sf.sf_edi); + regcache->raw_supply (I386_ESI_REGNUM, &sf.sf_esi); + regcache->raw_supply (I386_EBX_REGNUM, &sf.sf_ebx); + regcache->raw_supply (I386_EIP_REGNUM, &sf.sf_eip); } else #endif @@ -79,11 +79,11 @@ i386obsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) pcb->pcb_esp = pcb->pcb_ebp; pcb->pcb_ebp = read_memory_integer(pcb->pcb_esp, 4, byte_order); sf.sf_eip = read_memory_integer(pcb->pcb_esp + 4, 4, byte_order); - regcache_raw_supply (regcache, I386_EIP_REGNUM, &sf.sf_eip); + regcache->raw_supply (I386_EIP_REGNUM, &sf.sf_eip); } - regcache_raw_supply (regcache, I386_EBP_REGNUM, &pcb->pcb_ebp); - regcache_raw_supply (regcache, I386_ESP_REGNUM, &pcb->pcb_esp); + regcache->raw_supply (I386_EBP_REGNUM, &pcb->pcb_ebp); + regcache->raw_supply (I386_ESP_REGNUM, &pcb->pcb_esp); return 1; } diff --git a/gdb/i386-obsd-tdep.c b/gdb/i386-obsd-tdep.c index 1533ed2..da2b88a 100644 --- a/gdb/i386-obsd-tdep.c +++ b/gdb/i386-obsd-tdep.c @@ -210,7 +210,7 @@ i386obsd_supply_uthread (struct regcache *regcache, returned from _thread_machdep_switch. */ offset = i386obsd_uthread_reg_offset[I386_EIP_REGNUM] + 4; store_unsigned_integer (buf, 4, byte_order, sp + offset); - regcache_raw_supply (regcache, I386_ESP_REGNUM, buf); + regcache->raw_supply (I386_ESP_REGNUM, buf); } for (i = 0; i < ARRAY_SIZE (i386obsd_uthread_reg_offset); i++) @@ -225,7 +225,7 @@ i386obsd_supply_uthread (struct regcache *regcache, /* Read the saved register from the stack frame. */ read_memory (sp + i386obsd_uthread_reg_offset[i], buf, 4); - regcache_raw_supply (regcache, i, buf); + regcache->raw_supply (i, buf); } } } diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 158344f..f535cb3 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -3815,7 +3815,7 @@ i386_supply_gregset (const struct regset *regset, struct regcache *regcache, { if ((regnum == i || regnum == -1) && tdep->gregset_reg_offset[i] != -1) - regcache_raw_supply (regcache, i, regs + tdep->gregset_reg_offset[i]); + regcache->raw_supply (i, regs + tdep->gregset_reg_offset[i]); } } diff --git a/gdb/i386-v4-nat.c b/gdb/i386-v4-nat.c index 36e07fa..2313ff8 100644 --- a/gdb/i386-v4-nat.c +++ b/gdb/i386-v4-nat.c @@ -107,7 +107,7 @@ supply_gregset (struct regcache *regcache, const gregset_t *gregsetp) int regnum; for (regnum = 0; regnum < I386_NUM_GREGS; regnum++) - regcache_raw_supply (regcache, regnum, regp + regmap[regnum]); + regcache->raw_supply (regnum, regp + regmap[regnum]); } /* Fill register REGNUM (if it is a general-purpose register) in diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c index b465fda..b545f74 100644 --- a/gdb/i387-tdep.c +++ b/gdb/i387-tdep.c @@ -450,7 +450,7 @@ i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave) { if (fsave == NULL) { - regcache_raw_supply (regcache, i, NULL); + regcache->raw_supply (i, NULL); continue; } @@ -465,22 +465,22 @@ i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave) val[2] = val[3] = 0; if (i == I387_FOP_REGNUM (tdep)) val[1] &= ((1 << 3) - 1); - regcache_raw_supply (regcache, i, val); + regcache->raw_supply (i, val); } else - regcache_raw_supply (regcache, i, FSAVE_ADDR (tdep, regs, i)); + regcache->raw_supply (i, FSAVE_ADDR (tdep, regs, i)); } /* Provide dummy values for the SSE registers. */ for (i = I387_XMM0_REGNUM (tdep); i < I387_MXCSR_REGNUM (tdep); i++) if (regnum == -1 || regnum == i) - regcache_raw_supply (regcache, i, NULL); + regcache->raw_supply (i, NULL); if (regnum == -1 || regnum == I387_MXCSR_REGNUM (tdep)) { gdb_byte buf[4]; store_unsigned_integer (buf, 4, byte_order, I387_MXCSR_INIT_VAL); - regcache_raw_supply (regcache, I387_MXCSR_REGNUM (tdep), buf); + regcache->raw_supply (I387_MXCSR_REGNUM (tdep), buf); } } @@ -597,7 +597,7 @@ i387_supply_fxsave (struct regcache *regcache, int regnum, const void *fxsave) { if (regs == NULL) { - regcache_raw_supply (regcache, i, NULL); + regcache->raw_supply (i, NULL); continue; } @@ -644,18 +644,18 @@ i387_supply_fxsave (struct regcache *regcache, int regnum, const void *fxsave) val[0] = ftag & 0xff; val[1] = (ftag >> 8) & 0xff; } - regcache_raw_supply (regcache, i, val); + regcache->raw_supply (i, val); } else - regcache_raw_supply (regcache, i, FXSAVE_ADDR (tdep, regs, i)); + regcache->raw_supply (i, FXSAVE_ADDR (tdep, regs, i)); } if (regnum == I387_MXCSR_REGNUM (tdep) || regnum == -1) { if (regs == NULL) - regcache_raw_supply (regcache, I387_MXCSR_REGNUM (tdep), NULL); + regcache->raw_supply (I387_MXCSR_REGNUM (tdep), NULL); else - regcache_raw_supply (regcache, I387_MXCSR_REGNUM (tdep), + regcache->raw_supply (I387_MXCSR_REGNUM (tdep), FXSAVE_MXCSR_ADDR (regs)); } } @@ -996,74 +996,68 @@ i387_supply_xsave (struct regcache *regcache, int regnum, case pkeys: if ((clear_bv & X86_XSTATE_PKRU)) - regcache_raw_supply (regcache, regnum, zero); + regcache->raw_supply (regnum, zero); else - regcache_raw_supply (regcache, regnum, - XSAVE_PKEYS_ADDR (tdep, regs, regnum)); + regcache->raw_supply (regnum, XSAVE_PKEYS_ADDR (tdep, regs, regnum)); return; case avx512_zmm_h: if ((clear_bv & (X86_XSTATE_ZMM_H | X86_XSTATE_ZMM))) - regcache_raw_supply (regcache, regnum, zero); + regcache->raw_supply (regnum, zero); else - regcache_raw_supply (regcache, regnum, - XSAVE_AVX512_ZMM_H_ADDR (tdep, regs, regnum)); + regcache->raw_supply (regnum, + XSAVE_AVX512_ZMM_H_ADDR (tdep, regs, regnum)); return; case avx512_k: if ((clear_bv & X86_XSTATE_K)) - regcache_raw_supply (regcache, regnum, zero); + regcache->raw_supply (regnum, zero); else - regcache_raw_supply (regcache, regnum, - XSAVE_AVX512_K_ADDR (tdep, regs, regnum)); + regcache->raw_supply (regnum, XSAVE_AVX512_K_ADDR (tdep, regs, regnum)); return; case avx512_ymmh_avx512: if ((clear_bv & X86_XSTATE_ZMM)) - regcache_raw_supply (regcache, regnum, zero); + regcache->raw_supply (regnum, zero); else - regcache_raw_supply (regcache, regnum, - XSAVE_YMM_AVX512_ADDR (tdep, regs, regnum)); + regcache->raw_supply (regnum, + XSAVE_YMM_AVX512_ADDR (tdep, regs, regnum)); return; case avx512_xmm_avx512: if ((clear_bv & X86_XSTATE_ZMM)) - regcache_raw_supply (regcache, regnum, zero); + regcache->raw_supply (regnum, zero); else - regcache_raw_supply (regcache, regnum, - XSAVE_XMM_AVX512_ADDR (tdep, regs, regnum)); + regcache->raw_supply (regnum, + XSAVE_XMM_AVX512_ADDR (tdep, regs, regnum)); return; case avxh: if ((clear_bv & X86_XSTATE_AVX)) - regcache_raw_supply (regcache, regnum, zero); + regcache->raw_supply (regnum, zero); else - regcache_raw_supply (regcache, regnum, - XSAVE_AVXH_ADDR (tdep, regs, regnum)); + regcache->raw_supply (regnum, XSAVE_AVXH_ADDR (tdep, regs, regnum)); return; case mpx: if ((clear_bv & X86_XSTATE_BNDREGS)) - regcache_raw_supply (regcache, regnum, zero); + regcache->raw_supply (regnum, zero); else - regcache_raw_supply (regcache, regnum, - XSAVE_MPX_ADDR (tdep, regs, regnum)); + regcache->raw_supply (regnum, XSAVE_MPX_ADDR (tdep, regs, regnum)); return; case sse: if ((clear_bv & X86_XSTATE_SSE)) - regcache_raw_supply (regcache, regnum, zero); + regcache->raw_supply (regnum, zero); else - regcache_raw_supply (regcache, regnum, - FXSAVE_ADDR (tdep, regs, regnum)); + regcache->raw_supply (regnum, FXSAVE_ADDR (tdep, regs, regnum)); return; case x87: if ((clear_bv & X86_XSTATE_X87)) - regcache_raw_supply (regcache, regnum, zero); + regcache->raw_supply (regnum, zero); else - regcache_raw_supply (regcache, regnum, - FXSAVE_ADDR (tdep, regs, regnum)); + regcache->raw_supply (regnum, FXSAVE_ADDR (tdep, regs, regnum)); return; case all: @@ -1075,15 +1069,14 @@ i387_supply_xsave (struct regcache *regcache, int regnum, for (i = I387_PKRU_REGNUM (tdep); i < I387_PKEYSEND_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, zero); + regcache->raw_supply (i, zero); } else { for (i = I387_PKRU_REGNUM (tdep); i < I387_PKEYSEND_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, - XSAVE_PKEYS_ADDR (tdep, regs, i)); + regcache->raw_supply (i, XSAVE_PKEYS_ADDR (tdep, regs, i)); } } @@ -1095,15 +1088,15 @@ i387_supply_xsave (struct regcache *regcache, int regnum, for (i = I387_ZMM0H_REGNUM (tdep); i < I387_ZMMENDH_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, zero); + regcache->raw_supply (i, zero); } else { for (i = I387_ZMM0H_REGNUM (tdep); i < I387_ZMMENDH_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, - XSAVE_AVX512_ZMM_H_ADDR (tdep, regs, i)); + regcache->raw_supply (i, + XSAVE_AVX512_ZMM_H_ADDR (tdep, regs, i)); } } @@ -1115,15 +1108,14 @@ i387_supply_xsave (struct regcache *regcache, int regnum, for (i = I387_K0_REGNUM (tdep); i < I387_KEND_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, zero); + regcache->raw_supply (i, zero); } else { for (i = I387_K0_REGNUM (tdep); i < I387_KEND_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, - XSAVE_AVX512_K_ADDR (tdep, regs, i)); + regcache->raw_supply (i, XSAVE_AVX512_K_ADDR (tdep, regs, i)); } } @@ -1135,24 +1127,22 @@ i387_supply_xsave (struct regcache *regcache, int regnum, for (i = I387_YMM16H_REGNUM (tdep); i < I387_YMMH_AVX512_END_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, zero); + regcache->raw_supply (i, zero); for (i = I387_XMM16_REGNUM (tdep); i < I387_XMM_AVX512_END_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, zero); + regcache->raw_supply (i, zero); } else { for (i = I387_YMM16H_REGNUM (tdep); i < I387_YMMH_AVX512_END_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, - XSAVE_YMM_AVX512_ADDR (tdep, regs, i)); + regcache->raw_supply (i, XSAVE_YMM_AVX512_ADDR (tdep, regs, i)); for (i = I387_XMM16_REGNUM (tdep); i < I387_XMM_AVX512_END_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, - XSAVE_XMM_AVX512_ADDR (tdep, regs, i)); + regcache->raw_supply (i, XSAVE_XMM_AVX512_ADDR (tdep, regs, i)); } } /* Handle the upper YMM registers. */ @@ -1163,15 +1153,14 @@ i387_supply_xsave (struct regcache *regcache, int regnum, for (i = I387_YMM0H_REGNUM (tdep); i < I387_YMMENDH_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, zero); + regcache->raw_supply (i, zero); } else { for (i = I387_YMM0H_REGNUM (tdep); i < I387_YMMENDH_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, - XSAVE_AVXH_ADDR (tdep, regs, i)); + regcache->raw_supply (i, XSAVE_AVXH_ADDR (tdep, regs, i)); } } @@ -1182,14 +1171,13 @@ i387_supply_xsave (struct regcache *regcache, int regnum, { for (i = I387_BND0R_REGNUM (tdep); i < I387_BNDCFGU_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, zero); + regcache->raw_supply (i, zero); } else { for (i = I387_BND0R_REGNUM (tdep); i < I387_BNDCFGU_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, - XSAVE_MPX_ADDR (tdep, regs, i)); + regcache->raw_supply (i, XSAVE_MPX_ADDR (tdep, regs, i)); } } @@ -1200,14 +1188,13 @@ i387_supply_xsave (struct regcache *regcache, int regnum, { for (i = I387_BNDCFGU_REGNUM (tdep); i < I387_MPXEND_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, zero); + regcache->raw_supply (i, zero); } else { for (i = I387_BNDCFGU_REGNUM (tdep); i < I387_MPXEND_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, - XSAVE_MPX_ADDR (tdep, regs, i)); + regcache->raw_supply (i, XSAVE_MPX_ADDR (tdep, regs, i)); } } @@ -1219,14 +1206,13 @@ i387_supply_xsave (struct regcache *regcache, int regnum, for (i = I387_XMM0_REGNUM (tdep); i < I387_MXCSR_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, zero); + regcache->raw_supply (i, zero); } else { for (i = I387_XMM0_REGNUM (tdep); i < I387_MXCSR_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, - FXSAVE_ADDR (tdep, regs, i)); + regcache->raw_supply (i, FXSAVE_ADDR (tdep, regs, i)); } } @@ -1238,14 +1224,14 @@ i387_supply_xsave (struct regcache *regcache, int regnum, for (i = I387_ST0_REGNUM (tdep); i < I387_FCTRL_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, zero); + regcache->raw_supply (i, zero); } else { for (i = I387_ST0_REGNUM (tdep); i < I387_FCTRL_REGNUM (tdep); i++) - regcache_raw_supply (regcache, i, FXSAVE_ADDR (tdep, regs, i)); + regcache->raw_supply (i, FXSAVE_ADDR (tdep, regs, i)); } } break; @@ -1263,17 +1249,17 @@ i387_supply_xsave (struct regcache *regcache, int regnum, store_unsigned_integer (buf, 4, byte_order, I387_FCTRL_INIT_VAL); - regcache_raw_supply (regcache, i, buf); + regcache->raw_supply (i, buf); } else if (i == I387_FTAG_REGNUM (tdep)) { gdb_byte buf[4]; store_unsigned_integer (buf, 4, byte_order, 0xffff); - regcache_raw_supply (regcache, i, buf); + regcache->raw_supply (i, buf); } else - regcache_raw_supply (regcache, i, zero); + regcache->raw_supply (i, zero); } /* Most of the FPU control registers occupy only 16 bits in the xsave extended state. Give those a special treatment. */ @@ -1318,10 +1304,10 @@ i387_supply_xsave (struct regcache *regcache, int regnum, val[0] = ftag & 0xff; val[1] = (ftag >> 8) & 0xff; } - regcache_raw_supply (regcache, i, val); + regcache->raw_supply (i, val); } else - regcache_raw_supply (regcache, i, FXSAVE_ADDR (tdep, regs, i)); + regcache->raw_supply (i, FXSAVE_ADDR (tdep, regs, i)); } if (regnum == I387_MXCSR_REGNUM (tdep) || regnum == -1) @@ -1334,11 +1320,11 @@ i387_supply_xsave (struct regcache *regcache, int regnum, gdb_byte buf[4]; store_unsigned_integer (buf, 4, byte_order, I387_MXCSR_INIT_VAL); - regcache_raw_supply (regcache, I387_MXCSR_REGNUM (tdep), buf); + regcache->raw_supply (I387_MXCSR_REGNUM (tdep), buf); } else - regcache_raw_supply (regcache, I387_MXCSR_REGNUM (tdep), - FXSAVE_MXCSR_ADDR (regs)); + regcache->raw_supply (I387_MXCSR_REGNUM (tdep), + FXSAVE_MXCSR_ADDR (regs)); } } diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c index d095bde..98fd953 100644 --- a/gdb/ia64-linux-nat.c +++ b/gdb/ia64-linux-nat.c @@ -414,33 +414,32 @@ supply_gregset (struct regcache *regcache, const gregset_t *gregsetp) for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++) { - regcache_raw_supply (regcache, regi, regp + (regi - IA64_GR0_REGNUM)); + regcache->raw_supply (regi, regp + (regi - IA64_GR0_REGNUM)); } /* FIXME: NAT collection bits are at index 32; gotta deal with these somehow... */ - regcache_raw_supply (regcache, IA64_PR_REGNUM, regp + 33); + regcache->raw_supply (IA64_PR_REGNUM, regp + 33); for (regi = IA64_BR0_REGNUM; regi <= IA64_BR7_REGNUM; regi++) { - regcache_raw_supply (regcache, regi, - regp + 34 + (regi - IA64_BR0_REGNUM)); + regcache->raw_supply (regi, regp + 34 + (regi - IA64_BR0_REGNUM)); } - regcache_raw_supply (regcache, IA64_IP_REGNUM, regp + 42); - regcache_raw_supply (regcache, IA64_CFM_REGNUM, regp + 43); - regcache_raw_supply (regcache, IA64_PSR_REGNUM, regp + 44); - regcache_raw_supply (regcache, IA64_RSC_REGNUM, regp + 45); - regcache_raw_supply (regcache, IA64_BSP_REGNUM, regp + 46); - regcache_raw_supply (regcache, IA64_BSPSTORE_REGNUM, regp + 47); - regcache_raw_supply (regcache, IA64_RNAT_REGNUM, regp + 48); - regcache_raw_supply (regcache, IA64_CCV_REGNUM, regp + 49); - regcache_raw_supply (regcache, IA64_UNAT_REGNUM, regp + 50); - regcache_raw_supply (regcache, IA64_FPSR_REGNUM, regp + 51); - regcache_raw_supply (regcache, IA64_PFS_REGNUM, regp + 52); - regcache_raw_supply (regcache, IA64_LC_REGNUM, regp + 53); - regcache_raw_supply (regcache, IA64_EC_REGNUM, regp + 54); + regcache->raw_supply (IA64_IP_REGNUM, regp + 42); + regcache->raw_supply (IA64_CFM_REGNUM, regp + 43); + regcache->raw_supply (IA64_PSR_REGNUM, regp + 44); + regcache->raw_supply (IA64_RSC_REGNUM, regp + 45); + regcache->raw_supply (IA64_BSP_REGNUM, regp + 46); + regcache->raw_supply (IA64_BSPSTORE_REGNUM, regp + 47); + regcache->raw_supply (IA64_RNAT_REGNUM, regp + 48); + regcache->raw_supply (IA64_CCV_REGNUM, regp + 49); + regcache->raw_supply (IA64_UNAT_REGNUM, regp + 50); + regcache->raw_supply (IA64_FPSR_REGNUM, regp + 51); + regcache->raw_supply (IA64_PFS_REGNUM, regp + 52); + regcache->raw_supply (IA64_LC_REGNUM, regp + 53); + regcache->raw_supply (IA64_EC_REGNUM, regp + 54); } void @@ -500,14 +499,14 @@ supply_fpregset (struct regcache *regcache, const fpregset_t *fpregsetp) for fr0/fr1 and always supply their expected values. */ /* fr0 is always read as zero. */ - regcache_raw_supply (regcache, IA64_FR0_REGNUM, f_zero); + regcache->raw_supply (IA64_FR0_REGNUM, f_zero); /* fr1 is always read as one (1.0). */ - regcache_raw_supply (regcache, IA64_FR1_REGNUM, f_one); + regcache->raw_supply (IA64_FR1_REGNUM, f_one); for (regi = IA64_FR2_REGNUM; regi <= IA64_FR127_REGNUM; regi++) { from = (const char *) &((*fpregsetp)[regi - IA64_FR0_REGNUM]); - regcache_raw_supply (regcache, regi, from); + regcache->raw_supply (regi, from); } } @@ -748,7 +747,7 @@ ia64_linux_fetch_register (struct regcache *regcache, int regnum) const gdb_byte zero[8] = { 0 }; gdb_assert (sizeof (zero) == register_size (gdbarch, regnum)); - regcache_raw_supply (regcache, regnum, zero); + regcache->raw_supply (regnum, zero); return; } @@ -758,7 +757,7 @@ ia64_linux_fetch_register (struct regcache *regcache, int regnum) const gdb_byte f_zero[16] = { 0 }; gdb_assert (sizeof (f_zero) == register_size (gdbarch, regnum)); - regcache_raw_supply (regcache, regnum, f_zero); + regcache->raw_supply (regnum, f_zero); return; } @@ -769,13 +768,13 @@ ia64_linux_fetch_register (struct regcache *regcache, int regnum) { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0xff, 0, 0, 0, 0, 0, 0 }; gdb_assert (sizeof (f_one) == register_size (gdbarch, regnum)); - regcache_raw_supply (regcache, regnum, f_one); + regcache->raw_supply (regnum, f_one); return; } if (ia64_cannot_fetch_register (gdbarch, regnum)) { - regcache_raw_supply (regcache, regnum, NULL); + regcache->raw_supply (regnum, NULL); return; } @@ -800,7 +799,7 @@ ia64_linux_fetch_register (struct regcache *regcache, int regnum) addr += sizeof (PTRACE_TYPE_RET); } - regcache_raw_supply (regcache, regnum, buf); + regcache->raw_supply (regnum, buf); } /* Fetch register REGNUM from the inferior. If REGNUM is -1, do this diff --git a/gdb/ia64-linux-tdep.c b/gdb/ia64-linux-tdep.c index b1662f2..19d0cf2 100644 --- a/gdb/ia64-linux-tdep.c +++ b/gdb/ia64-linux-tdep.c @@ -184,9 +184,9 @@ ia64_linux_supply_fpregset (const struct regset *regset, did the same. So ignore whatever might be recorded in fpregset_t for fr0/fr1 and always supply their expected values. */ if (regnum == -1 || regnum == IA64_FR0_REGNUM) - regcache_raw_supply (regcache, IA64_FR0_REGNUM, f_zero); + regcache->raw_supply (IA64_FR0_REGNUM, f_zero); if (regnum == -1 || regnum == IA64_FR1_REGNUM) - regcache_raw_supply (regcache, IA64_FR1_REGNUM, f_one); + regcache->raw_supply (IA64_FR1_REGNUM, f_one); } static const struct regset ia64_linux_gregset = diff --git a/gdb/linux-nat-trad.c b/gdb/linux-nat-trad.c index ed75eed..23abb0f 100644 --- a/gdb/linux-nat-trad.c +++ b/gdb/linux-nat-trad.c @@ -41,7 +41,7 @@ linux_nat_trad_target::fetch_register (struct regcache *regcache, int regnum) if (addr == (CORE_ADDR)-1 || gdbarch_cannot_fetch_register (gdbarch, regnum)) { - regcache_raw_supply (regcache, regnum, NULL); + regcache->raw_supply (regnum, NULL); return; } @@ -66,7 +66,7 @@ linux_nat_trad_target::fetch_register (struct regcache *regcache, int regnum) addr += sizeof (PTRACE_TYPE_RET); } - regcache_raw_supply (regcache, regnum, buf); + regcache->raw_supply (regnum, buf); } /* Fetch register REGNUM from the inferior. If REGNUM is -1, do this diff --git a/gdb/m32r-linux-nat.c b/gdb/m32r-linux-nat.c index 9d833fa..3c72357 100644 --- a/gdb/m32r-linux-nat.c +++ b/gdb/m32r-linux-nat.c @@ -101,11 +101,11 @@ supply_gregset (struct regcache *regcache, const elf_gregset_t * gregsetp) } if (i != M32R_SP_REGNUM) - regcache_raw_supply (regcache, i, ®val); + regcache->raw_supply (i, ®val); else if (psw & 0x8000) - regcache_raw_supply (regcache, i, regp + SPU_REGMAP); + regcache->raw_supply (i, regp + SPU_REGMAP); else - regcache_raw_supply (regcache, i, regp + SPI_REGMAP); + regcache->raw_supply (i, regp + SPI_REGMAP); } } diff --git a/gdb/m32r-linux-tdep.c b/gdb/m32r-linux-tdep.c index 352a6f0..5618218 100644 --- a/gdb/m32r-linux-tdep.c +++ b/gdb/m32r-linux-tdep.c @@ -385,7 +385,7 @@ m32r_linux_supply_gregset (const struct regset *regset, p = regs + m32r_pt_regs_offset[i]; } - regcache_raw_supply (regcache, i, p); + regcache->raw_supply (i, p); } } diff --git a/gdb/m68k-bsd-nat.c b/gdb/m68k-bsd-nat.c index c44f736..8d2f548 100644 --- a/gdb/m68k-bsd-nat.c +++ b/gdb/m68k-bsd-nat.c @@ -58,7 +58,7 @@ m68kbsd_supply_gregset (struct regcache *regcache, const void *gregs) int regnum; for (regnum = M68K_D0_REGNUM; regnum <= M68K_PC_REGNUM; regnum++) - regcache_raw_supply (regcache, regnum, regs + regnum * 4); + regcache->raw_supply (regnum, regs + regnum * 4); } /* Supply the floating-point registers stored in FPREGS to REGCACHE. */ @@ -71,8 +71,8 @@ m68kbsd_supply_fpregset (struct regcache *regcache, const void *fpregs) int regnum; for (regnum = M68K_FP0_REGNUM; regnum <= M68K_FPI_REGNUM; regnum++) - regcache_raw_supply (regcache, regnum, - regs + m68kbsd_fpreg_offset (gdbarch, regnum)); + regcache->raw_supply (regnum, + regs + m68kbsd_fpreg_offset (gdbarch, regnum)); } /* Collect the general-purpose registers from REGCACHE and store them @@ -209,15 +209,15 @@ m68kbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) return 0; for (regnum = M68K_D2_REGNUM; regnum <= M68K_D7_REGNUM; regnum++) - regcache_raw_supply (regcache, regnum, &pcb->pcb_regs[i++]); + regcache->raw_supply (regnum, &pcb->pcb_regs[i++]); for (regnum = M68K_A2_REGNUM; regnum <= M68K_SP_REGNUM; regnum++) - regcache_raw_supply (regcache, regnum, &pcb->pcb_regs[i++]); + regcache->raw_supply (regnum, &pcb->pcb_regs[i++]); tmp = pcb->pcb_ps & 0xffff; - regcache_raw_supply (regcache, M68K_PS_REGNUM, &tmp); + regcache->raw_supply (M68K_PS_REGNUM, &tmp); read_memory (pcb->pcb_regs[PCB_REGS_FP] + 4, (char *) &tmp, sizeof tmp); - regcache_raw_supply (regcache, M68K_PC_REGNUM, &tmp); + regcache->raw_supply (M68K_PC_REGNUM, &tmp); return 1; } diff --git a/gdb/m68k-bsd-tdep.c b/gdb/m68k-bsd-tdep.c index 99c4d74..2f53870 100644 --- a/gdb/m68k-bsd-tdep.c +++ b/gdb/m68k-bsd-tdep.c @@ -67,8 +67,7 @@ m68kbsd_supply_fpregset (const struct regset *regset, for (i = M68K_FP0_REGNUM; i <= M68K_PC_REGNUM; i++) { if (regnum == i || regnum == -1) - regcache_raw_supply (regcache, i, - regs + m68kbsd_fpreg_offset (gdbarch, i)); + regcache->raw_supply (i, regs + m68kbsd_fpreg_offset (gdbarch, i)); } } @@ -89,7 +88,7 @@ m68kbsd_supply_gregset (const struct regset *regset, for (i = M68K_D0_REGNUM; i <= M68K_PC_REGNUM; i++) { if (regnum == i || regnum == -1) - regcache_raw_supply (regcache, i, regs + i * 4); + regcache->raw_supply (i, regs + i * 4); } if (len >= M68KBSD_SIZEOF_GREGS + M68KBSD_SIZEOF_FPREGS) diff --git a/gdb/m68k-linux-nat.c b/gdb/m68k-linux-nat.c index 409a4fd..2dbf857 100644 --- a/gdb/m68k-linux-nat.c +++ b/gdb/m68k-linux-nat.c @@ -133,7 +133,7 @@ fetch_register (struct regcache *regcache, int regno) gdbarch_register_name (gdbarch, regno), regno, safe_strerror (errno)); } - regcache_raw_supply (regcache, regno, buf); + regcache->raw_supply (regno, buf); } /* Fetch register values from the inferior. @@ -224,11 +224,9 @@ supply_gregset (struct regcache *regcache, const elf_gregset_t *gregsetp) for (regi = M68K_D0_REGNUM; regi <= gdbarch_sp_regnum (gdbarch); regi++) - regcache_raw_supply (regcache, regi, ®p[regmap[regi]]); - regcache_raw_supply (regcache, gdbarch_ps_regnum (gdbarch), - ®p[PT_SR]); - regcache_raw_supply (regcache, - gdbarch_pc_regnum (gdbarch), ®p[PT_PC]); + regcache->raw_supply (regi, ®p[regmap[regi]]); + regcache->raw_supply (gdbarch_ps_regnum (gdbarch), ®p[PT_SR]); + regcache->raw_supply (gdbarch_pc_regnum (gdbarch), ®p[PT_PC]); } /* Fill register REGNO (if it is a general-purpose register) in @@ -318,12 +316,11 @@ supply_fpregset (struct regcache *regcache, const elf_fpregset_t *fpregsetp) for (regi = gdbarch_fp0_regnum (gdbarch); regi < gdbarch_fp0_regnum (gdbarch) + 8; regi++) - regcache_raw_supply (regcache, regi, - FPREG_ADDR (fpregsetp, - regi - gdbarch_fp0_regnum (gdbarch))); - regcache_raw_supply (regcache, M68K_FPC_REGNUM, &fpregsetp->fpcntl[0]); - regcache_raw_supply (regcache, M68K_FPS_REGNUM, &fpregsetp->fpcntl[1]); - regcache_raw_supply (regcache, M68K_FPI_REGNUM, &fpregsetp->fpcntl[2]); + regcache->raw_supply + (regi, FPREG_ADDR (fpregsetp, regi - gdbarch_fp0_regnum (gdbarch))); + regcache->raw_supply (M68K_FPC_REGNUM, &fpregsetp->fpcntl[0]); + regcache->raw_supply (M68K_FPS_REGNUM, &fpregsetp->fpcntl[1]); + regcache->raw_supply (M68K_FPI_REGNUM, &fpregsetp->fpcntl[2]); } /* Fill register REGNO (if it is a floating-point register) in diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c index 84cc405..1dd9764 100644 --- a/gdb/mips-linux-tdep.c +++ b/gdb/mips-linux-tdep.c @@ -282,9 +282,9 @@ supply_64bit_reg (struct regcache *regcache, int regnum, struct gdbarch *gdbarch = regcache->arch (); if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG && register_size (gdbarch, regnum) == 4) - regcache_raw_supply (regcache, regnum, buf + 4); + regcache->raw_supply (regnum, buf + 4); else - regcache_raw_supply (regcache, regnum, buf); + regcache->raw_supply (regnum, buf); } /* Unpack a 64-bit elf_gregset_t into GDB's register cache. */ @@ -422,15 +422,12 @@ mips64_supply_fpregset (struct regcache *regcache, = (const gdb_byte *) (*fpregsetp + (regi & ~1)); if ((gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) != (regi & 1)) reg_ptr += 4; - regcache_raw_supply (regcache, - gdbarch_fp0_regnum (gdbarch) + regi, - reg_ptr); + regcache->raw_supply (gdbarch_fp0_regnum (gdbarch) + regi, reg_ptr); } else for (regi = 0; regi < 32; regi++) - regcache_raw_supply (regcache, - gdbarch_fp0_regnum (gdbarch) + regi, - (const char *) (*fpregsetp + regi)); + regcache->raw_supply (gdbarch_fp0_regnum (gdbarch) + regi, + (const char *) (*fpregsetp + regi)); supply_32bit_reg (regcache, mips_regnum (gdbarch)->fp_control_status, (const gdb_byte *) (*fpregsetp + 32)); diff --git a/gdb/mips-nbsd-tdep.c b/gdb/mips-nbsd-tdep.c index d805f0d..5a14b2f 100644 --- a/gdb/mips-nbsd-tdep.c +++ b/gdb/mips-nbsd-tdep.c @@ -64,8 +64,7 @@ mipsnbsd_supply_fpregset (const struct regset *regset, for (i = MIPS_FP0_REGNUM; i <= MIPS_FSR_REGNUM; i++) { if (regnum == i || regnum == -1) - regcache_raw_supply (regcache, i, - regs + (i - MIPS_FP0_REGNUM) * regsize); + regcache->raw_supply (i, regs + (i - MIPS_FP0_REGNUM) * regsize); } } @@ -87,7 +86,7 @@ mipsnbsd_supply_gregset (const struct regset *regset, for (i = 0; i <= MIPS_PC_REGNUM; i++) { if (regnum == i || regnum == -1) - regcache_raw_supply (regcache, i, regs + i * regsize); + regcache->raw_supply (i, regs + i * regsize); } if (len >= (MIPSNBSD_NUM_GREGS + MIPSNBSD_NUM_FPREGS) * regsize) @@ -145,10 +144,10 @@ mipsnbsd_supply_reg (struct regcache *regcache, const char *regs, int regno) if (regno == i || regno == -1) { if (gdbarch_cannot_fetch_register (gdbarch, i)) - regcache_raw_supply (regcache, i, NULL); + regcache->raw_supply (i, NULL); else - regcache_raw_supply (regcache, i, - regs + (i * mips_isa_regsize (gdbarch))); + regcache->raw_supply + (i, regs + (i * mips_isa_regsize (gdbarch))); } } } @@ -180,10 +179,10 @@ mipsnbsd_supply_fpreg (struct regcache *regcache, if (regno == i || regno == -1) { if (gdbarch_cannot_fetch_register (gdbarch, i)) - regcache_raw_supply (regcache, i, NULL); + regcache->raw_supply (i, NULL); else - regcache_raw_supply (regcache, i, - fpregs + regcache->raw_supply (i, + fpregs + ((i - gdbarch_fp0_regnum (gdbarch)) * mips_isa_regsize (gdbarch))); } diff --git a/gdb/mips64-obsd-nat.c b/gdb/mips64-obsd-nat.c index 27e1ab6..9c306dd 100644 --- a/gdb/mips64-obsd-nat.c +++ b/gdb/mips64-obsd-nat.c @@ -52,10 +52,10 @@ mips64obsd_supply_gregset (struct regcache *regcache, const void *gregs) int regnum; for (regnum = MIPS_ZERO_REGNUM; regnum <= MIPS_PC_REGNUM; regnum++) - regcache_raw_supply (regcache, regnum, regs + regnum * 8); + regcache->raw_supply (regnum, regs + regnum * 8); for (regnum = MIPS_FP0_REGNUM; regnum <= MIPS_FSR_REGNUM; regnum++) - regcache_raw_supply (regcache, regnum, regs + (regnum + 2) * 8); + regcache->raw_supply (regnum, regs + (regnum + 2) * 8); } /* Collect the general-purpose registers from REGCACHE and store them diff --git a/gdb/mips64-obsd-tdep.c b/gdb/mips64-obsd-tdep.c index ef706e3..ab910ed 100644 --- a/gdb/mips64-obsd-tdep.c +++ b/gdb/mips64-obsd-tdep.c @@ -52,7 +52,7 @@ mips64obsd_supply_gregset (const struct regset *regset, for (i = 0; i < MIPS64OBSD_NUM_REGS; i++) { if (regnum == i || regnum == -1) - regcache_raw_supply (regcache, i, regs + i * 8); + regcache->raw_supply (i, regs + i * 8); } } diff --git a/gdb/mn10300-linux-tdep.c b/gdb/mn10300-linux-tdep.c index 32f34ce..a79f1f2 100644 --- a/gdb/mn10300-linux-tdep.c +++ b/gdb/mn10300-linux-tdep.c @@ -93,96 +93,96 @@ am33_supply_gregset_method (const struct regset *regset, switch (regnum) { case E_D0_REGNUM: - regcache_raw_supply (regcache, E_D0_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D0)); + regcache->raw_supply (E_D0_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D0)); break; case E_D1_REGNUM: - regcache_raw_supply (regcache, E_D1_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D1)); + regcache->raw_supply (E_D1_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D1)); break; case E_D2_REGNUM: - regcache_raw_supply (regcache, E_D2_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D2)); + regcache->raw_supply (E_D2_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D2)); break; case E_D3_REGNUM: - regcache_raw_supply (regcache, E_D3_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D3)); + regcache->raw_supply (E_D3_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D3)); break; case E_A0_REGNUM: - regcache_raw_supply (regcache, E_A0_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A0)); + regcache->raw_supply (E_A0_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A0)); break; case E_A1_REGNUM: - regcache_raw_supply (regcache, E_A1_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A1)); + regcache->raw_supply (E_A1_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A1)); break; case E_A2_REGNUM: - regcache_raw_supply (regcache, E_A2_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A2)); + regcache->raw_supply (E_A2_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A2)); break; case E_A3_REGNUM: - regcache_raw_supply (regcache, E_A3_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A3)); + regcache->raw_supply (E_A3_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A3)); break; case E_SP_REGNUM: - regcache_raw_supply (regcache, E_SP_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_SP)); + regcache->raw_supply (E_SP_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_SP)); break; case E_PC_REGNUM: - regcache_raw_supply (regcache, E_PC_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_PC)); + regcache->raw_supply (E_PC_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_PC)); break; case E_MDR_REGNUM: - regcache_raw_supply (regcache, E_MDR_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDR)); + regcache->raw_supply (E_MDR_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDR)); break; case E_PSW_REGNUM: - regcache_raw_supply (regcache, E_PSW_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_EPSW)); + regcache->raw_supply (E_PSW_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_EPSW)); break; case E_LIR_REGNUM: - regcache_raw_supply (regcache, E_LIR_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LIR)); + regcache->raw_supply (E_LIR_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LIR)); break; case E_LAR_REGNUM: - regcache_raw_supply (regcache, E_LAR_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LAR)); + regcache->raw_supply (E_LAR_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LAR)); break; case E_MDRQ_REGNUM: - regcache_raw_supply (regcache, E_MDRQ_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDRQ)); + regcache->raw_supply (E_MDRQ_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDRQ)); break; case E_E0_REGNUM: - regcache_raw_supply (regcache, E_E0_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E0)); + regcache->raw_supply (E_E0_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E0)); break; case E_E1_REGNUM: - regcache_raw_supply (regcache, E_E1_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E1)); + regcache->raw_supply (E_E1_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E1)); break; case E_E2_REGNUM: - regcache_raw_supply (regcache, E_E2_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E2)); + regcache->raw_supply (E_E2_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E2)); break; case E_E3_REGNUM: - regcache_raw_supply (regcache, E_E3_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E3)); + regcache->raw_supply (E_E3_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E3)); break; case E_E4_REGNUM: - regcache_raw_supply (regcache, E_E4_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E4)); + regcache->raw_supply (E_E4_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E4)); break; case E_E5_REGNUM: - regcache_raw_supply (regcache, E_E5_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E5)); + regcache->raw_supply (E_E5_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E5)); break; case E_E6_REGNUM: - regcache_raw_supply (regcache, E_E6_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E6)); + regcache->raw_supply (E_E6_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E6)); break; case E_E7_REGNUM: - regcache_raw_supply (regcache, E_E7_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E7)); + regcache->raw_supply (E_E7_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E7)); break; /* ssp, msp, and usp are inaccessible. */ @@ -196,16 +196,16 @@ am33_supply_gregset_method (const struct regset *regset, regcache->raw_supply_zeroed (E_E10_REGNUM); break; case E_MCRH_REGNUM: - regcache_raw_supply (regcache, E_MCRH_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRH)); + regcache->raw_supply (E_MCRH_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRH)); break; case E_MCRL_REGNUM: - regcache_raw_supply (regcache, E_MCRL_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRL)); + regcache->raw_supply (E_MCRL_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRL)); break; case E_MCVF_REGNUM: - regcache_raw_supply (regcache, E_MCVF_REGNUM, - (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCVF)); + regcache->raw_supply (E_MCVF_REGNUM, + (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCVF)); break; case E_FPCR_REGNUM: /* FPCR is numbered among the GP regs, but handled as an FP reg. @@ -252,12 +252,10 @@ am33_supply_fpregset_method (const struct regset *regset, E_FPCR_REGNUM, fpregs, len); } else if (regnum == E_FPCR_REGNUM) - regcache_raw_supply (regcache, E_FPCR_REGNUM, - &fpregset->fpcr); + regcache->raw_supply (E_FPCR_REGNUM, &fpregset->fpcr); else if (E_FS0_REGNUM <= regnum && regnum < E_FS0_REGNUM + MN10300_ELF_NFPREG) - regcache_raw_supply (regcache, regnum, - &fpregset->fpregs[regnum - E_FS0_REGNUM]); + regcache->raw_supply (regnum, &fpregset->fpregs[regnum - E_FS0_REGNUM]); return; } diff --git a/gdb/nios2-linux-tdep.c b/gdb/nios2-linux-tdep.c index 005c82a..7ee6f14 100644 --- a/gdb/nios2-linux-tdep.c +++ b/gdb/nios2-linux-tdep.c @@ -67,10 +67,9 @@ nios2_supply_gregset (const struct regset *regset, if (regnum == -1 || regnum == regno) { if (reg_offsets[regno] != -1) - regcache_raw_supply (regcache, regno, - gregs + 4 * reg_offsets[regno]); + regcache->raw_supply (regno, gregs + 4 * reg_offsets[regno]); else - regcache_raw_supply (regcache, regno, zero_buf); + regcache->raw_supply (regno, zero_buf); } } diff --git a/gdb/ppc-fbsd-nat.c b/gdb/ppc-fbsd-nat.c index 89a7e6e..44661e9 100644 --- a/gdb/ppc-fbsd-nat.c +++ b/gdb/ppc-fbsd-nat.c @@ -192,11 +192,11 @@ ppcfbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) if (pcb->pcb_sp == 0) return 0; - regcache_raw_supply (regcache, gdbarch_sp_regnum (gdbarch), &pcb->pcb_sp); - regcache_raw_supply (regcache, tdep->ppc_cr_regnum, &pcb->pcb_cr); - regcache_raw_supply (regcache, tdep->ppc_lr_regnum, &pcb->pcb_lr); + regcache->raw_supply (gdbarch_sp_regnum (gdbarch), &pcb->pcb_sp); + regcache->raw_supply (tdep->ppc_cr_regnum, &pcb->pcb_cr); + regcache->raw_supply (tdep->ppc_lr_regnum, &pcb->pcb_lr); for (i = 0, regnum = tdep->ppc_gp0_regnum + 14; i < 20; i++, regnum++) - regcache_raw_supply (regcache, regnum, &pcb->pcb_context[i]); + regcache->raw_supply (regnum, &pcb->pcb_context[i]); return 1; } diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index 7606081..7f209f4 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -512,22 +512,20 @@ fetch_spe_register (struct regcache *regcache, int tid, int regno) int i; for (i = 0; i < ppc_num_gprs; i++) - regcache_raw_supply (regcache, tdep->ppc_ev0_upper_regnum + i, - &evrregs.evr[i]); + regcache->raw_supply (tdep->ppc_ev0_upper_regnum + i, &evrregs.evr[i]); } else if (tdep->ppc_ev0_upper_regnum <= regno && regno < tdep->ppc_ev0_upper_regnum + ppc_num_gprs) - regcache_raw_supply (regcache, regno, - &evrregs.evr[regno - tdep->ppc_ev0_upper_regnum]); + regcache->raw_supply (regno, + &evrregs.evr[regno - tdep->ppc_ev0_upper_regnum]); if (regno == -1 || regno == tdep->ppc_acc_regnum) - regcache_raw_supply (regcache, tdep->ppc_acc_regnum, &evrregs.acc); + regcache->raw_supply (tdep->ppc_acc_regnum, &evrregs.acc); if (regno == -1 || regno == tdep->ppc_spefscr_regnum) - regcache_raw_supply (regcache, tdep->ppc_spefscr_regnum, - &evrregs.spefscr); + regcache->raw_supply (tdep->ppc_spefscr_regnum, &evrregs.spefscr); } static void @@ -573,7 +571,7 @@ fetch_register (struct regcache *regcache, int tid, int regno) if (regaddr == -1) { memset (buf, '\0', register_size (gdbarch, regno)); /* Supply zeroes */ - regcache_raw_supply (regcache, regno, buf); + regcache->raw_supply (regno, buf); return; } @@ -606,14 +604,14 @@ fetch_register (struct regcache *regcache, int tid, int regno) { /* Little-endian values are always found at the left end of the bytes transferred. */ - regcache_raw_supply (regcache, regno, buf); + regcache->raw_supply (regno, buf); } else if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) { /* Big-endian values are found at the right end of the bytes transferred. */ size_t padding = (bytes_transferred - register_size (gdbarch, regno)); - regcache_raw_supply (regcache, regno, buf + padding); + regcache->raw_supply (regno, buf + padding); } else internal_error (__FILE__, __LINE__, diff --git a/gdb/ppc-nbsd-nat.c b/gdb/ppc-nbsd-nat.c index 037b261..ea163f3 100644 --- a/gdb/ppc-nbsd-nat.c +++ b/gdb/ppc-nbsd-nat.c @@ -162,20 +162,19 @@ ppcnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) return 0; read_memory (pcb->pcb_sp, (gdb_byte *)&sf, sizeof sf); - regcache_raw_supply (regcache, tdep->ppc_cr_regnum, &sf.cr); - regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 2, &sf.fixreg2); + regcache->raw_supply (tdep->ppc_cr_regnum, &sf.cr); + regcache->raw_supply (tdep->ppc_gp0_regnum + 2, &sf.fixreg2); for (i = 0 ; i < 19 ; i++) - regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 13 + i, - &sf.fixreg[i]); + regcache->raw_supply (tdep->ppc_gp0_regnum + 13 + i, &sf.fixreg[i]); read_memory(sf.sp, (gdb_byte *)&cf, sizeof(cf)); - regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 30, &cf.r30); - regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 31, &cf.r31); - regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 1, &cf.sp); + regcache->raw_supply (tdep->ppc_gp0_regnum + 30, &cf.r30); + regcache->raw_supply (tdep->ppc_gp0_regnum + 31, &cf.r31); + regcache->raw_supply (tdep->ppc_gp0_regnum + 1, &cf.sp); read_memory(cf.sp, (gdb_byte *)&cf, sizeof(cf)); - regcache_raw_supply (regcache, tdep->ppc_lr_regnum, &cf.lr); - regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch), &cf.lr); + regcache->raw_supply (tdep->ppc_lr_regnum, &cf.lr); + regcache->raw_supply (gdbarch_pc_regnum (gdbarch), &cf.lr); return 1; } diff --git a/gdb/ppc-obsd-nat.c b/gdb/ppc-obsd-nat.c index 88ba0c5..ee71b742 100644 --- a/gdb/ppc-obsd-nat.c +++ b/gdb/ppc-obsd-nat.c @@ -173,16 +173,16 @@ ppcobsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) return 0; read_memory (pcb->pcb_sp, (gdb_byte *)&sf, sizeof sf); - regcache_raw_supply (regcache, gdbarch_sp_regnum (gdbarch), &sf.sp); - regcache_raw_supply (regcache, tdep->ppc_cr_regnum, &sf.cr); - regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 2, &sf.fixreg2); + regcache->raw_supply (gdbarch_sp_regnum (gdbarch), &sf.sp); + regcache->raw_supply (tdep->ppc_cr_regnum, &sf.cr); + regcache->raw_supply (tdep->ppc_gp0_regnum + 2, &sf.fixreg2); for (i = 0, regnum = tdep->ppc_gp0_regnum + 13; i < 19; i++, regnum++) - regcache_raw_supply (regcache, regnum, &sf.fixreg[i]); + regcache->raw_supply (regnum, &sf.fixreg[i]); read_memory (sf.sp, (gdb_byte *)&cf, sizeof cf); - regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch), &cf.lr); - regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 30, &cf.r30); - regcache_raw_supply (regcache, tdep->ppc_gp0_regnum + 31, &cf.r31); + regcache->raw_supply (gdbarch_pc_regnum (gdbarch), &cf.lr); + regcache->raw_supply (tdep->ppc_gp0_regnum + 30, &cf.r30); + regcache->raw_supply (tdep->ppc_gp0_regnum + 31, &cf.r31); return 1; } diff --git a/gdb/ppc-ravenscar-thread.c b/gdb/ppc-ravenscar-thread.c index 38f2667..ae5ad24 100644 --- a/gdb/ppc-ravenscar-thread.c +++ b/gdb/ppc-ravenscar-thread.c @@ -125,7 +125,7 @@ supply_register_at_address (struct regcache *regcache, int regnum, buf = (gdb_byte *) alloca (buf_size); read_memory (register_addr, buf, buf_size); - regcache_raw_supply (regcache, regnum, buf); + regcache->raw_supply (regnum, buf); } /* Return true if, for a non-running thread, REGNUM has been saved on the diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c index 35c8421..47a31b7 100644 --- a/gdb/record-btrace.c +++ b/gdb/record-btrace.c @@ -1558,7 +1558,7 @@ record_btrace_target::fetch_registers (struct regcache *regcache, int regno) insn = btrace_insn_get (replay); gdb_assert (insn != NULL); - regcache_raw_supply (regcache, regno, &insn->pc); + regcache->raw_supply (regno, &insn->pc); } else this->beneath->fetch_registers (regcache, regno); diff --git a/gdb/regcache.c b/gdb/regcache.c index 758f21c..8d47fda 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -879,15 +879,6 @@ regcache::cooked_write_part (int regnum, int offset, int len, write_part (regnum, offset, len, buf, false); } -/* Supply register REGNUM, whose contents are stored in BUF, to REGCACHE. */ - -void -regcache_raw_supply (struct regcache *regcache, int regnum, const void *buf) -{ - gdb_assert (regcache != NULL); - regcache->raw_supply (regnum, buf); -} - void detached_regcache::raw_supply (int regnum, const void *buf) { diff --git a/gdb/regcache.h b/gdb/regcache.h index 064930c..b60f031 100644 --- a/gdb/regcache.h +++ b/gdb/regcache.h @@ -71,8 +71,6 @@ extern void regcache_write_pc (struct regcache *regcache, CORE_ADDR pc); target. These functions are called by the target in response to a target_fetch_registers() or target_store_registers(). */ -extern void regcache_raw_supply (struct regcache *regcache, - int regnum, const void *buf); extern void regcache_raw_collect (const struct regcache *regcache, int regnum, void *buf); @@ -243,6 +241,7 @@ public: : readable_regcache (gdbarch, has_pseudo) {} + /* Supply register REGNUM, whose contents are stored in BUF, to REGCACHE. */ void raw_supply (int regnum, const void *buf); void raw_supply (int regnum, const reg_buffer &src) diff --git a/gdb/remote.c b/gdb/remote.c index 3aca5fb..3f0b678 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -7786,7 +7786,7 @@ remote_target::process_stop_reply (struct stop_reply *stop_reply, VEC_iterate (cached_reg_t, stop_reply->regcache, ix, reg); ix++) { - regcache_raw_supply (regcache, reg->num, reg->data); + regcache->raw_supply (reg->num, reg->data); xfree (reg->data); } @@ -8080,7 +8080,7 @@ remote_target::fetch_register_using_p (struct regcache *regcache, /* If this register is unfetchable, tell the regcache. */ if (buf[0] == 'x') { - regcache_raw_supply (regcache, reg->regnum, NULL); + regcache->raw_supply (reg->regnum, NULL); return 1; } @@ -8095,7 +8095,7 @@ remote_target::fetch_register_using_p (struct regcache *regcache, regp[i++] = fromhex (p[0]) * 16 + fromhex (p[1]); p += 2; } - regcache_raw_supply (regcache, reg->regnum, regp); + regcache->raw_supply (reg->regnum, regp); return 1; } @@ -8233,11 +8233,10 @@ remote_target::process_g_packet (struct regcache *regcache) gdb_assert (r->offset * 2 < strlen (rs->buf)); /* The register isn't available, mark it as such (at the same time setting the value to zero). */ - regcache_raw_supply (regcache, r->regnum, NULL); + regcache->raw_supply (r->regnum, NULL); } else - regcache_raw_supply (regcache, r->regnum, - regs + r->offset); + regcache->raw_supply (r->regnum, regs + r->offset); } } } @@ -8304,7 +8303,7 @@ remote_target::fetch_registers (struct regcache *regcache, int regnum) return; /* This register is not available. */ - regcache_raw_supply (regcache, reg->regnum, NULL); + regcache->raw_supply (reg->regnum, NULL); return; } @@ -8316,7 +8315,7 @@ remote_target::fetch_registers (struct regcache *regcache, int regnum) if (!fetch_register_using_p (regcache, &rsa->regs[i])) { /* This register is not available. */ - regcache_raw_supply (regcache, i, NULL); + regcache->raw_supply (i, NULL); } } diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index 689d8e8..7e39d57 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -231,7 +231,7 @@ fetch_register (struct regcache *regcache, int regno) } if (!errno) - regcache_raw_supply (regcache, regno, (char *) addr); + regcache->raw_supply (regno, (char *) addr); else { #if 0 diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 2523ff6..e165d1b 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -389,7 +389,7 @@ ppc_supply_reg (struct regcache *regcache, int regnum, && gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) offset += regsize - gdb_regsize; } - regcache_raw_supply (regcache, regnum, regs + offset); + regcache->raw_supply (regnum, regs + offset); } } diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c index abb06a9..303cbee 100644 --- a/gdb/s390-linux-nat.c +++ b/gdb/s390-linux-nat.c @@ -170,10 +170,10 @@ supply_gregset (struct regcache *regcache, const gregset_t *regp) pswa = extract_unsigned_integer ((const gdb_byte *) regp + S390_PSWA_OFFSET, 8, byte_order); store_unsigned_integer (buf, 4, byte_order, (pswm >> 32) | 0x80000); - regcache_raw_supply (regcache, S390_PSWM_REGNUM, buf); + regcache->raw_supply (S390_PSWM_REGNUM, buf); store_unsigned_integer (buf, 4, byte_order, (pswa & 0x7fffffff) | (pswm & 0x80000000)); - regcache_raw_supply (regcache, S390_PSWA_REGNUM, buf); + regcache->raw_supply (S390_PSWA_REGNUM, buf); return; } #endif diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index a3a3cb6..e4e08c7 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -1074,10 +1074,10 @@ s390_guess_tracepoint_registers (struct gdbarch *gdbarch, } store_unsigned_integer (reg, sz, gdbarch_byte_order (gdbarch), pswa); - regcache_raw_supply (regcache, S390_PSWA_REGNUM, reg); + regcache->raw_supply (S390_PSWA_REGNUM, reg); store_unsigned_integer (reg, sz, gdbarch_byte_order (gdbarch), pswm); - regcache_raw_supply (regcache, S390_PSWM_REGNUM, reg); + regcache->raw_supply (S390_PSWM_REGNUM, reg); } /* Return the name of register REGNO. Return the empty string for diff --git a/gdb/score-tdep.c b/gdb/score-tdep.c index e764c65..16bf00e 100644 --- a/gdb/score-tdep.c +++ b/gdb/score-tdep.c @@ -1428,9 +1428,8 @@ score7_linux_supply_gregset(const struct regset *regset, collect function will store the PC in that slot. */ if ((regnum == -1 || regnum == SCORE_EPC_REGNUM) && size >= SCORE7_LINUX_EPC_OFFSET + 4) - regcache_raw_supply (regcache, SCORE_EPC_REGNUM, - (const gdb_byte *) buf - + SCORE7_LINUX_EPC_OFFSET); + regcache->raw_supply + (SCORE_EPC_REGNUM, (const gdb_byte *) buf + SCORE7_LINUX_EPC_OFFSET); } static const struct regset score7_linux_gregset = diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index 97e4a75..5e9fd09 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -2175,8 +2175,8 @@ sh_corefile_supply_regset (const struct regset *regset, { if ((regnum == -1 || regnum == regmap[i].regnum) && regmap[i].offset + 4 <= len) - regcache_raw_supply (regcache, regmap[i].regnum, - (char *)regs + regmap[i].offset); + regcache->raw_supply + (regmap[i].regnum, (char *) regs + regmap[i].offset); } } diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c index 86a6b5a..c133a3e 100644 --- a/gdb/sparc-nat.c +++ b/gdb/sparc-nat.c @@ -158,7 +158,7 @@ sparc_fetch_inferior_registers (struct regcache *regcache, int regnum) { gdb_byte zero[8] = { 0 }; - regcache_raw_supply (regcache, SPARC_G0_REGNUM, &zero); + regcache->raw_supply (SPARC_G0_REGNUM, &zero); return; } diff --git a/gdb/sparc-nbsd-nat.c b/gdb/sparc-nbsd-nat.c index e1ed442..c8ed129 100644 --- a/gdb/sparc-nbsd-nat.c +++ b/gdb/sparc-nbsd-nat.c @@ -44,11 +44,11 @@ sparc32nbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) if (pcb->pcb_sp == 0) return 0; - regcache_raw_supply (regcache, SPARC_SP_REGNUM, &pcb->pcb_sp); - regcache_raw_supply (regcache, SPARC_O7_REGNUM, &pcb->pcb_pc); - regcache_raw_supply (regcache, SPARC32_PSR_REGNUM, &pcb->pcb_psr); - regcache_raw_supply (regcache, SPARC32_WIM_REGNUM, &pcb->pcb_wim); - regcache_raw_supply (regcache, SPARC32_PC_REGNUM, &pcb->pcb_pc); + regcache->raw_supply (SPARC_SP_REGNUM, &pcb->pcb_sp); + regcache->raw_supply (SPARC_O7_REGNUM, &pcb->pcb_pc); + regcache->raw_supply (SPARC32_PSR_REGNUM, &pcb->pcb_psr); + regcache->raw_supply (SPARC32_WIM_REGNUM, &pcb->pcb_wim); + regcache->raw_supply (SPARC32_PC_REGNUM, &pcb->pcb_pc); sparc_supply_rwindow (regcache, pcb->pcb_sp, -1); diff --git a/gdb/sparc-obsd-tdep.c b/gdb/sparc-obsd-tdep.c index 3ef2fb9..c821562 100644 --- a/gdb/sparc-obsd-tdep.c +++ b/gdb/sparc-obsd-tdep.c @@ -163,7 +163,7 @@ sparc32obsd_supply_uthread (struct regcache *regcache, if (regnum == SPARC_SP_REGNUM || regnum == -1) { store_unsigned_integer (buf, 4, byte_order, fp); - regcache_raw_supply (regcache, SPARC_SP_REGNUM, buf); + regcache->raw_supply (SPARC_SP_REGNUM, buf); if (regnum == SPARC_SP_REGNUM) return; @@ -178,12 +178,12 @@ sparc32obsd_supply_uthread (struct regcache *regcache, if (regnum == SPARC32_PC_REGNUM || regnum == -1) { store_unsigned_integer (buf, 4, byte_order, i7 + 8); - regcache_raw_supply (regcache, SPARC32_PC_REGNUM, buf); + regcache->raw_supply (SPARC32_PC_REGNUM, buf); } if (regnum == SPARC32_NPC_REGNUM || regnum == -1) { store_unsigned_integer (buf, 4, byte_order, i7 + 12); - regcache_raw_supply (regcache, SPARC32_NPC_REGNUM, buf); + regcache->raw_supply (SPARC32_NPC_REGNUM, buf); } if (regnum == SPARC32_PC_REGNUM || regnum == SPARC32_NPC_REGNUM) diff --git a/gdb/sparc-ravenscar-thread.c b/gdb/sparc-ravenscar-thread.c index 1cd1915..129b4b6 100644 --- a/gdb/sparc-ravenscar-thread.c +++ b/gdb/sparc-ravenscar-thread.c @@ -68,7 +68,7 @@ supply_register_at_address (struct regcache *regcache, int regnum, buf = (gdb_byte *) alloca (buf_size); read_memory (register_addr, buf, buf_size); - regcache_raw_supply (regcache, regnum, buf); + regcache->raw_supply (regnum, buf); } /* Return true if, for a non-running thread, REGNUM has been saved on the diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index 40d213f..ad0d2b4 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -1970,7 +1970,7 @@ sparc_supply_rwindow (struct regcache *regcache, CORE_ADDR sp, int regnum) i7 ^ wcookie); } - regcache_raw_supply (regcache, i, buf); + regcache->raw_supply (i, buf); } } } @@ -2006,7 +2006,7 @@ sparc_supply_rwindow (struct regcache *regcache, CORE_ADDR sp, int regnum) i7 ^ wcookie); } - regcache_raw_supply (regcache, i, buf); + regcache->raw_supply (i, buf); } } } @@ -2093,23 +2093,19 @@ sparc32_supply_gregset (const struct sparc_gregmap *gregmap, int i; if (regnum == SPARC32_PSR_REGNUM || regnum == -1) - regcache_raw_supply (regcache, SPARC32_PSR_REGNUM, - regs + gregmap->r_psr_offset); + regcache->raw_supply (SPARC32_PSR_REGNUM, regs + gregmap->r_psr_offset); if (regnum == SPARC32_PC_REGNUM || regnum == -1) - regcache_raw_supply (regcache, SPARC32_PC_REGNUM, - regs + gregmap->r_pc_offset); + regcache->raw_supply (SPARC32_PC_REGNUM, regs + gregmap->r_pc_offset); if (regnum == SPARC32_NPC_REGNUM || regnum == -1) - regcache_raw_supply (regcache, SPARC32_NPC_REGNUM, - regs + gregmap->r_npc_offset); + regcache->raw_supply (SPARC32_NPC_REGNUM, regs + gregmap->r_npc_offset); if (regnum == SPARC32_Y_REGNUM || regnum == -1) - regcache_raw_supply (regcache, SPARC32_Y_REGNUM, - regs + gregmap->r_y_offset); + regcache->raw_supply (SPARC32_Y_REGNUM, regs + gregmap->r_y_offset); if (regnum == SPARC_G0_REGNUM || regnum == -1) - regcache_raw_supply (regcache, SPARC_G0_REGNUM, &zero); + regcache->raw_supply (SPARC_G0_REGNUM, &zero); if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_O7_REGNUM) || regnum == -1) { @@ -2118,7 +2114,7 @@ sparc32_supply_gregset (const struct sparc_gregmap *gregmap, for (i = SPARC_G1_REGNUM; i <= SPARC_O7_REGNUM; i++) { if (regnum == i || regnum == -1) - regcache_raw_supply (regcache, i, regs + offset); + regcache->raw_supply (i, regs + offset); offset += 4; } } @@ -2141,7 +2137,7 @@ sparc32_supply_gregset (const struct sparc_gregmap *gregmap, for (i = SPARC_L0_REGNUM; i <= SPARC_I7_REGNUM; i++) { if (regnum == i || regnum == -1) - regcache_raw_supply (regcache, i, regs + offset); + regcache->raw_supply (i, regs + offset); offset += 4; } } @@ -2214,13 +2210,12 @@ sparc32_supply_fpregset (const struct sparc_fpregmap *fpregmap, for (i = 0; i < 32; i++) { if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1) - regcache_raw_supply (regcache, SPARC_F0_REGNUM + i, - regs + fpregmap->r_f0_offset + (i * 4)); + regcache->raw_supply (SPARC_F0_REGNUM + i, + regs + fpregmap->r_f0_offset + (i * 4)); } if (regnum == SPARC32_FSR_REGNUM || regnum == -1) - regcache_raw_supply (regcache, SPARC32_FSR_REGNUM, - regs + fpregmap->r_fsr_offset); + regcache->raw_supply (SPARC32_FSR_REGNUM, regs + fpregmap->r_fsr_offset); } void diff --git a/gdb/sparc64-fbsd-nat.c b/gdb/sparc64-fbsd-nat.c index 20c6a28..4be8cde 100644 --- a/gdb/sparc64-fbsd-nat.c +++ b/gdb/sparc64-fbsd-nat.c @@ -46,12 +46,12 @@ sparc64fbsd_kvm_supply_pcb (struct regcache *regcache, struct pcb *pcb) if (pcb->pcb_sp == 0) return 0; - regcache_raw_supply (regcache, SPARC_SP_REGNUM, &pcb->pcb_sp); - regcache_raw_supply (regcache, SPARC64_PC_REGNUM, &pcb->pcb_pc); + regcache->raw_supply (SPARC_SP_REGNUM, &pcb->pcb_sp); + regcache->raw_supply (SPARC64_PC_REGNUM, &pcb->pcb_pc); /* Synthesize %npc. */ pcb->pcb_pc += 4; - regcache_raw_supply (regcache, SPARC64_NPC_REGNUM, &pcb->pcb_pc); + regcache->raw_supply (SPARC64_NPC_REGNUM, &pcb->pcb_pc); /* Read `local' and `in' registers from the stack. */ sparc_supply_rwindow (regcache, pcb->pcb_sp, -1); diff --git a/gdb/sparc64-nbsd-nat.c b/gdb/sparc64-nbsd-nat.c index ac760b3..cb8643a 100644 --- a/gdb/sparc64-nbsd-nat.c +++ b/gdb/sparc64-nbsd-nat.c @@ -156,11 +156,11 @@ sparc64nbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) read_memory(pcb->pcb_sp + BIAS - 176 + (11 * 8), (gdb_byte *)&pcb->pcb_pc, sizeof pcb->pcb_pc); - regcache_raw_supply (regcache, SPARC_SP_REGNUM, &pcb->pcb_sp); - regcache_raw_supply (regcache, SPARC64_PC_REGNUM, &pcb->pcb_pc); + regcache->raw_supply (SPARC_SP_REGNUM, &pcb->pcb_sp); + regcache->raw_supply (SPARC64_PC_REGNUM, &pcb->pcb_pc); state = pcb->pcb_pstate << 8 | pcb->pcb_cwp; - regcache_raw_supply (regcache, SPARC64_STATE_REGNUM, &state); + regcache->raw_supply (SPARC64_STATE_REGNUM, &state); sparc_supply_rwindow (regcache, pcb->pcb_sp, -1); diff --git a/gdb/sparc64-obsd-nat.c b/gdb/sparc64-obsd-nat.c index eeef363..593a7ac 100644 --- a/gdb/sparc64-obsd-nat.c +++ b/gdb/sparc64-obsd-nat.c @@ -95,11 +95,11 @@ sparc64obsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) read_memory(pcb->pcb_sp + BIAS - 176 + (11 * 8), (gdb_byte *)&pcb->pcb_pc, sizeof pcb->pcb_pc); - regcache_raw_supply (regcache, SPARC_SP_REGNUM, &pcb->pcb_sp); - regcache_raw_supply (regcache, SPARC64_PC_REGNUM, &pcb->pcb_pc); + regcache->raw_supply (SPARC_SP_REGNUM, &pcb->pcb_sp); + regcache->raw_supply (SPARC64_PC_REGNUM, &pcb->pcb_pc); state = pcb->pcb_pstate << 8 | pcb->pcb_cwp; - regcache_raw_supply (regcache, SPARC64_STATE_REGNUM, &state); + regcache->raw_supply (SPARC64_STATE_REGNUM, &state); sparc_supply_rwindow (regcache, pcb->pcb_sp, -1); diff --git a/gdb/sparc64-obsd-tdep.c b/gdb/sparc64-obsd-tdep.c index f18b593..6af5f08 100644 --- a/gdb/sparc64-obsd-tdep.c +++ b/gdb/sparc64-obsd-tdep.c @@ -334,7 +334,7 @@ sparc64obsd_supply_uthread (struct regcache *regcache, if (regnum == SPARC_SP_REGNUM || regnum == -1) { store_unsigned_integer (buf, 8, byte_order, fp); - regcache_raw_supply (regcache, SPARC_SP_REGNUM, buf); + regcache->raw_supply (SPARC_SP_REGNUM, buf); if (regnum == SPARC_SP_REGNUM) return; @@ -349,12 +349,12 @@ sparc64obsd_supply_uthread (struct regcache *regcache, if (regnum == SPARC64_PC_REGNUM || regnum == -1) { store_unsigned_integer (buf, 8, byte_order, i7 + 8); - regcache_raw_supply (regcache, SPARC64_PC_REGNUM, buf); + regcache->raw_supply (SPARC64_PC_REGNUM, buf); } if (regnum == SPARC64_NPC_REGNUM || regnum == -1) { store_unsigned_integer (buf, 8, byte_order, i7 + 12); - regcache_raw_supply (regcache, SPARC64_NPC_REGNUM, buf); + regcache->raw_supply (SPARC64_NPC_REGNUM, buf); } if (regnum == SPARC64_PC_REGNUM || regnum == SPARC64_NPC_REGNUM) diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c index dea8e4d..083ad72 100644 --- a/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c @@ -1897,36 +1897,36 @@ sparc64_supply_gregset (const struct sparc_gregmap *gregmap, psr = ((tstate & TSTATE_CWP) | PSR_S | ((tstate & TSTATE_ICC) >> 12) | ((tstate & TSTATE_XCC) >> 20) | PSR_V8PLUS); store_unsigned_integer (buf, 4, byte_order, psr); - regcache_raw_supply (regcache, SPARC32_PSR_REGNUM, buf); + regcache->raw_supply (SPARC32_PSR_REGNUM, buf); } if (regnum == SPARC32_PC_REGNUM || regnum == -1) - regcache_raw_supply (regcache, SPARC32_PC_REGNUM, - regs + gregmap->r_pc_offset + 4); + regcache->raw_supply (SPARC32_PC_REGNUM, + regs + gregmap->r_pc_offset + 4); if (regnum == SPARC32_NPC_REGNUM || regnum == -1) - regcache_raw_supply (regcache, SPARC32_NPC_REGNUM, - regs + gregmap->r_npc_offset + 4); + regcache->raw_supply (SPARC32_NPC_REGNUM, + regs + gregmap->r_npc_offset + 4); if (regnum == SPARC32_Y_REGNUM || regnum == -1) { int offset = gregmap->r_y_offset + 8 - gregmap->r_y_size; - regcache_raw_supply (regcache, SPARC32_Y_REGNUM, regs + offset); + regcache->raw_supply (SPARC32_Y_REGNUM, regs + offset); } } else { if (regnum == SPARC64_STATE_REGNUM || regnum == -1) - regcache_raw_supply (regcache, SPARC64_STATE_REGNUM, - regs + gregmap->r_tstate_offset); + regcache->raw_supply (SPARC64_STATE_REGNUM, + regs + gregmap->r_tstate_offset); if (regnum == SPARC64_PC_REGNUM || regnum == -1) - regcache_raw_supply (regcache, SPARC64_PC_REGNUM, - regs + gregmap->r_pc_offset); + regcache->raw_supply (SPARC64_PC_REGNUM, + regs + gregmap->r_pc_offset); if (regnum == SPARC64_NPC_REGNUM || regnum == -1) - regcache_raw_supply (regcache, SPARC64_NPC_REGNUM, - regs + gregmap->r_npc_offset); + regcache->raw_supply (SPARC64_NPC_REGNUM, + regs + gregmap->r_npc_offset); if (regnum == SPARC64_Y_REGNUM || regnum == -1) { @@ -1935,17 +1935,17 @@ sparc64_supply_gregset (const struct sparc_gregmap *gregmap, memset (buf, 0, 8); memcpy (buf + 8 - gregmap->r_y_size, regs + gregmap->r_y_offset, gregmap->r_y_size); - regcache_raw_supply (regcache, SPARC64_Y_REGNUM, buf); + regcache->raw_supply (SPARC64_Y_REGNUM, buf); } if ((regnum == SPARC64_FPRS_REGNUM || regnum == -1) && gregmap->r_fprs_offset != -1) - regcache_raw_supply (regcache, SPARC64_FPRS_REGNUM, - regs + gregmap->r_fprs_offset); + regcache->raw_supply (SPARC64_FPRS_REGNUM, + regs + gregmap->r_fprs_offset); } if (regnum == SPARC_G0_REGNUM || regnum == -1) - regcache_raw_supply (regcache, SPARC_G0_REGNUM, &zero); + regcache->raw_supply (SPARC_G0_REGNUM, &zero); if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_O7_REGNUM) || regnum == -1) { @@ -1957,7 +1957,7 @@ sparc64_supply_gregset (const struct sparc_gregmap *gregmap, for (i = SPARC_G1_REGNUM; i <= SPARC_O7_REGNUM; i++) { if (regnum == i || regnum == -1) - regcache_raw_supply (regcache, i, regs + offset); + regcache->raw_supply (i, regs + offset); offset += 8; } } @@ -1983,7 +1983,7 @@ sparc64_supply_gregset (const struct sparc_gregmap *gregmap, for (i = SPARC_L0_REGNUM; i <= SPARC_I7_REGNUM; i++) { if (regnum == i || regnum == -1) - regcache_raw_supply (regcache, i, regs + offset); + regcache->raw_supply (i, regs + offset); offset += 8; } } @@ -2112,14 +2112,14 @@ sparc64_supply_fpregset (const struct sparc_fpregmap *fpregmap, for (i = 0; i < 32; i++) { if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1) - regcache_raw_supply (regcache, SPARC_F0_REGNUM + i, + regcache->raw_supply (SPARC_F0_REGNUM + i, regs + fpregmap->r_f0_offset + (i * 4)); } if (sparc32) { if (regnum == SPARC32_FSR_REGNUM || regnum == -1) - regcache_raw_supply (regcache, SPARC32_FSR_REGNUM, + regcache->raw_supply (SPARC32_FSR_REGNUM, regs + fpregmap->r_fsr_offset); } else @@ -2127,14 +2127,14 @@ sparc64_supply_fpregset (const struct sparc_fpregmap *fpregmap, for (i = 0; i < 16; i++) { if (regnum == (SPARC64_F32_REGNUM + i) || regnum == -1) - regcache_raw_supply (regcache, SPARC64_F32_REGNUM + i, - (regs + fpregmap->r_f0_offset - + (32 * 4) + (i * 8))); + regcache->raw_supply + (SPARC64_F32_REGNUM + i, + regs + fpregmap->r_f0_offset + (32 * 4) + (i * 8)); } if (regnum == SPARC64_FSR_REGNUM || regnum == -1) - regcache_raw_supply (regcache, SPARC64_FSR_REGNUM, - regs + fpregmap->r_fsr_offset); + regcache->raw_supply (SPARC64_FSR_REGNUM, + regs + fpregmap->r_fsr_offset); } } diff --git a/gdb/spu-linux-nat.c b/gdb/spu-linux-nat.c index 81bb5dd..6a5be8b 100644 --- a/gdb/spu-linux-nat.c +++ b/gdb/spu-linux-nat.c @@ -529,7 +529,7 @@ spu_linux_nat_target::fetch_registers (struct regcache *regcache, int regno) enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); gdb_byte buf[4]; store_unsigned_integer (buf, 4, byte_order, fd); - regcache_raw_supply (regcache, SPU_ID_REGNUM, buf); + regcache->raw_supply (SPU_ID_REGNUM, buf); } /* The NPC register is found at ADDR. */ @@ -537,7 +537,7 @@ spu_linux_nat_target::fetch_registers (struct regcache *regcache, int regno) { gdb_byte buf[4]; if (fetch_ppc_memory (addr, buf, 4) == 0) - regcache_raw_supply (regcache, SPU_PC_REGNUM, buf); + regcache->raw_supply (SPU_PC_REGNUM, buf); } /* The GPRs are found in the "regs" spufs file. */ @@ -553,7 +553,7 @@ spu_linux_nat_target::fetch_registers (struct regcache *regcache, int regno) == TARGET_XFER_OK) && len == sizeof buf) for (i = 0; i < SPU_NUM_GPRS; i++) - regcache_raw_supply (regcache, i, buf + i*16); + regcache->raw_supply (i, buf + i*16); } } diff --git a/gdb/spu-multiarch.c b/gdb/spu-multiarch.c index 4a4d500..dc99f60 100644 --- a/gdb/spu-multiarch.c +++ b/gdb/spu-multiarch.c @@ -207,7 +207,7 @@ spu_multiarch_target::fetch_registers (struct regcache *regcache, int regno) { gdb_byte buf[4]; store_unsigned_integer (buf, 4, byte_order, spufs_fd); - regcache_raw_supply (regcache, SPU_ID_REGNUM, buf); + regcache->raw_supply (SPU_ID_REGNUM, buf); } /* The NPC register is found in PPC memory at SPUFS_ADDR. */ @@ -217,7 +217,7 @@ spu_multiarch_target::fetch_registers (struct regcache *regcache, int regno) if (target_read (ops_beneath, TARGET_OBJECT_MEMORY, NULL, buf, spufs_addr, sizeof buf) == sizeof buf) - regcache_raw_supply (regcache, SPU_PC_REGNUM, buf); + regcache->raw_supply (SPU_PC_REGNUM, buf); } /* The GPRs are found in the "regs" spufs file. */ @@ -231,7 +231,7 @@ spu_multiarch_target::fetch_registers (struct regcache *regcache, int regno) if (target_read (ops_beneath, TARGET_OBJECT_SPU, annex, buf, 0, sizeof buf) == sizeof buf) for (i = 0; i < SPU_NUM_GPRS; i++) - regcache_raw_supply (regcache, i, buf + i*16); + regcache->raw_supply (i, buf + i*16); } } diff --git a/gdb/tilegx-linux-nat.c b/gdb/tilegx-linux-nat.c index 9b596c0..1ff6485 100644 --- a/gdb/tilegx-linux-nat.c +++ b/gdb/tilegx-linux-nat.c @@ -88,7 +88,7 @@ supply_gregset (struct regcache* regcache, for (i = 0; i < sizeof (regmap) / sizeof (regmap[0]); i++) if (regmap[i] >= 0) - regcache_raw_supply (regcache, i, regp + regmap[i]); + regcache->raw_supply (i, regp + regmap[i]); } /* Fill registers in *GREGSETPS with the values in GDB's diff --git a/gdb/tracefile-tfile.c b/gdb/tracefile-tfile.c index 32f5722..2327d9e 100644 --- a/gdb/tracefile-tfile.c +++ b/gdb/tracefile-tfile.c @@ -898,12 +898,12 @@ tfile_target::fetch_registers (struct regcache *regcache, int regno) { if (regno == regn) { - regcache_raw_supply (regcache, regno, regs + offset); + regcache->raw_supply (regno, regs + offset); break; } else if (regno == -1) { - regcache_raw_supply (regcache, regn, regs + offset); + regcache->raw_supply (regn, regs + offset); } } } diff --git a/gdb/tracefile.c b/gdb/tracefile.c index f7e69f2..ab34ecf 100644 --- a/gdb/tracefile.c +++ b/gdb/tracefile.c @@ -394,7 +394,7 @@ tracefile_fetch_registers (struct regcache *regcache, int regno) /* We get here if no register data has been found. Mark registers as unavailable. */ for (regn = 0; regn < gdbarch_num_regs (gdbarch); regn++) - regcache_raw_supply (regcache, regn, NULL); + regcache->raw_supply (regn, NULL); /* We can often usefully guess that the PC is going to be the same as the address of the tracepoint. */ diff --git a/gdb/vax-bsd-nat.c b/gdb/vax-bsd-nat.c index 5f67061..527d718 100644 --- a/gdb/vax-bsd-nat.c +++ b/gdb/vax-bsd-nat.c @@ -46,7 +46,7 @@ vaxbsd_supply_gregset (struct regcache *regcache, const void *gregs) int regnum; for (regnum = 0; regnum < VAX_NUM_REGS; regnum++) - regcache_raw_supply (regcache, regnum, regs + regnum * 4); + regcache->raw_supply (regnum, regs + regnum * 4); } /* Collect the general-purpose registers from REGCACHE and store them @@ -122,12 +122,12 @@ vaxbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) return 0; for (regnum = VAX_R0_REGNUM; regnum < VAX_AP_REGNUM; regnum++) - regcache_raw_supply (regcache, regnum, &pcb->R[regnum - VAX_R0_REGNUM]); - regcache_raw_supply (regcache, VAX_AP_REGNUM, &pcb->AP); - regcache_raw_supply (regcache, VAX_FP_REGNUM, &pcb->FP); - regcache_raw_supply (regcache, VAX_SP_REGNUM, &pcb->KSP); - regcache_raw_supply (regcache, VAX_PC_REGNUM, &pcb->PC); - regcache_raw_supply (regcache, VAX_PS_REGNUM, &pcb->PSL); + regcache->raw_supply (regnum, &pcb->R[regnum - VAX_R0_REGNUM]); + regcache->raw_supply (VAX_AP_REGNUM, &pcb->AP); + regcache->raw_supply (VAX_FP_REGNUM, &pcb->FP); + regcache->raw_supply (VAX_SP_REGNUM, &pcb->KSP); + regcache->raw_supply (VAX_PC_REGNUM, &pcb->PC); + regcache->raw_supply (VAX_PS_REGNUM, &pcb->PSL); return 1; } diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c index de07fdb..d07a477 100644 --- a/gdb/vax-tdep.c +++ b/gdb/vax-tdep.c @@ -76,7 +76,7 @@ vax_supply_gregset (const struct regset *regset, struct regcache *regcache, for (i = 0; i < VAX_NUM_REGS; i++) { if (regnum == i || regnum == -1) - regcache_raw_supply (regcache, i, regs + i * 4); + regcache->raw_supply (i, regs + i * 4); } } diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 3fd8415..2d6ece0 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -555,12 +555,12 @@ do_windows_fetch_inferior_registers (struct regcache *regcache, if (r == I387_FISEG_REGNUM (tdep)) { l = *((long *) context_offset) & 0xffff; - regcache_raw_supply (regcache, r, (char *) &l); + regcache->raw_supply (r, (char *) &l); } else if (r == I387_FOP_REGNUM (tdep)) { l = (*((long *) context_offset) >> 16) & ((1 << 11) - 1); - regcache_raw_supply (regcache, r, (char *) &l); + regcache->raw_supply (r, (char *) &l); } else if (segment_register_p (r)) { @@ -568,10 +568,10 @@ do_windows_fetch_inferior_registers (struct regcache *regcache, in fact only 16 bits long. Make sure we do not read extra bits from our source buffer. */ l = *((long *) context_offset) & 0xffff; - regcache_raw_supply (regcache, r, (char *) &l); + regcache->raw_supply (r, (char *) &l); } else if (r >= 0) - regcache_raw_supply (regcache, r, context_offset); + regcache->raw_supply (r, context_offset); else { for (r = 0; r < gdbarch_num_regs (gdbarch); r++) diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c index 57a44e3..8737a9a 100644 --- a/gdb/xtensa-linux-nat.c +++ b/gdb/xtensa-linux-nat.c @@ -134,63 +134,54 @@ supply_gregset_reg (struct regcache *regcache, struct gdbarch *gdbarch = regcache->arch (); if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1) - regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch), ®s->pc); + regcache->raw_supply (gdbarch_pc_regnum (gdbarch), ®s->pc); if (regnum == gdbarch_ps_regnum (gdbarch) || regnum == -1) - regcache_raw_supply (regcache, gdbarch_ps_regnum (gdbarch), ®s->ps); + regcache->raw_supply (gdbarch_ps_regnum (gdbarch), ®s->ps); if (regnum == gdbarch_tdep (gdbarch)->wb_regnum || regnum == -1) - regcache_raw_supply (regcache, - gdbarch_tdep (gdbarch)->wb_regnum, + regcache->raw_supply (gdbarch_tdep (gdbarch)->wb_regnum, ®s->windowbase); if (regnum == gdbarch_tdep (gdbarch)->ws_regnum || regnum == -1) - regcache_raw_supply (regcache, - gdbarch_tdep (gdbarch)->ws_regnum, + regcache->raw_supply (gdbarch_tdep (gdbarch)->ws_regnum, ®s->windowstart); if (regnum == gdbarch_tdep (gdbarch)->lbeg_regnum || regnum == -1) - regcache_raw_supply (regcache, - gdbarch_tdep (gdbarch)->lbeg_regnum, + regcache->raw_supply (gdbarch_tdep (gdbarch)->lbeg_regnum, ®s->lbeg); if (regnum == gdbarch_tdep (gdbarch)->lend_regnum || regnum == -1) - regcache_raw_supply (regcache, - gdbarch_tdep (gdbarch)->lend_regnum, + regcache->raw_supply (gdbarch_tdep (gdbarch)->lend_regnum, ®s->lend); if (regnum == gdbarch_tdep (gdbarch)->lcount_regnum || regnum == -1) - regcache_raw_supply (regcache, - gdbarch_tdep (gdbarch)->lcount_regnum, + regcache->raw_supply (gdbarch_tdep (gdbarch)->lcount_regnum, ®s->lcount); if (regnum == gdbarch_tdep (gdbarch)->sar_regnum || regnum == -1) - regcache_raw_supply (regcache, - gdbarch_tdep (gdbarch)->sar_regnum, + regcache->raw_supply (gdbarch_tdep (gdbarch)->sar_regnum, ®s->sar); if (regnum == gdbarch_tdep (gdbarch)->threadptr_regnum || regnum == -1) - regcache_raw_supply (regcache, - gdbarch_tdep (gdbarch)->threadptr_regnum, + regcache->raw_supply (gdbarch_tdep (gdbarch)->threadptr_regnum, ®s->threadptr); if (regnum >=gdbarch_tdep (gdbarch)->ar_base && regnum < gdbarch_tdep (gdbarch)->ar_base + gdbarch_tdep (gdbarch)->num_aregs) - regcache_raw_supply (regcache,regnum, + regcache->raw_supply (regnum, ®s->ar[regnum - gdbarch_tdep (gdbarch)->ar_base]); else if (regnum == -1) { for (i = 0; i < gdbarch_tdep (gdbarch)->num_aregs; ++i) - regcache_raw_supply (regcache, - gdbarch_tdep (gdbarch)->ar_base + i, + regcache->raw_supply (gdbarch_tdep (gdbarch)->ar_base + i, ®s->ar[i]); } if (regnum >= gdbarch_tdep (gdbarch)->a0_base && regnum < gdbarch_tdep (gdbarch)->a0_base + C0_NREGS) - regcache_raw_supply (regcache, regnum, - ®s->ar[(4 * regs->windowbase + regnum - - gdbarch_tdep (gdbarch)->a0_base) + regcache->raw_supply (regnum, + ®s->ar[(4 * regs->windowbase + regnum + - gdbarch_tdep (gdbarch)->a0_base) % gdbarch_tdep (gdbarch)->num_aregs]); else if (regnum == -1) { for (i = 0; i < C0_NREGS; ++i) - regcache_raw_supply (regcache, - gdbarch_tdep (gdbarch)->a0_base + i, - ®s->ar[(4 * regs->windowbase + i) - % gdbarch_tdep (gdbarch)->num_aregs]); + regcache->raw_supply (gdbarch_tdep (gdbarch)->a0_base + i, + ®s->ar[(4 * regs->windowbase + i) + % gdbarch_tdep (gdbarch)->num_aregs]); } } @@ -276,8 +267,7 @@ fetch_xtregs (struct regcache *regcache, int regnum) for (ptr = xtensa_regmap_table; ptr->name; ptr++) if (regnum == ptr->gdb_regnum || regnum == -1) - regcache_raw_supply (regcache, ptr->gdb_regnum, - xtregs + ptr->ptrace_offset); + regcache->raw_supply (ptr->gdb_regnum, xtregs + ptr->ptrace_offset); } static void diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c index 1f87b9c..60e34c3 100644 --- a/gdb/xtensa-tdep.c +++ b/gdb/xtensa-tdep.c @@ -848,38 +848,37 @@ xtensa_supply_gregset (const struct regset *regset, DEBUGTRACE ("xtensa_supply_gregset (..., regnum==%d, ...)\n", regnum); if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1) - regcache_raw_supply (rc, gdbarch_pc_regnum (gdbarch), (char *) ®s->pc); + rc->raw_supply (gdbarch_pc_regnum (gdbarch), (char *) ®s->pc); if (regnum == gdbarch_ps_regnum (gdbarch) || regnum == -1) - regcache_raw_supply (rc, gdbarch_ps_regnum (gdbarch), (char *) ®s->ps); + rc->raw_supply (gdbarch_ps_regnum (gdbarch), (char *) ®s->ps); if (regnum == gdbarch_tdep (gdbarch)->wb_regnum || regnum == -1) - regcache_raw_supply (rc, gdbarch_tdep (gdbarch)->wb_regnum, - (char *) ®s->windowbase); + rc->raw_supply (gdbarch_tdep (gdbarch)->wb_regnum, + (char *) ®s->windowbase); if (regnum == gdbarch_tdep (gdbarch)->ws_regnum || regnum == -1) - regcache_raw_supply (rc, gdbarch_tdep (gdbarch)->ws_regnum, - (char *) ®s->windowstart); + rc->raw_supply (gdbarch_tdep (gdbarch)->ws_regnum, + (char *) ®s->windowstart); if (regnum == gdbarch_tdep (gdbarch)->lbeg_regnum || regnum == -1) - regcache_raw_supply (rc, gdbarch_tdep (gdbarch)->lbeg_regnum, - (char *) ®s->lbeg); + rc->raw_supply (gdbarch_tdep (gdbarch)->lbeg_regnum, + (char *) ®s->lbeg); if (regnum == gdbarch_tdep (gdbarch)->lend_regnum || regnum == -1) - regcache_raw_supply (rc, gdbarch_tdep (gdbarch)->lend_regnum, - (char *) ®s->lend); + rc->raw_supply (gdbarch_tdep (gdbarch)->lend_regnum, + (char *) ®s->lend); if (regnum == gdbarch_tdep (gdbarch)->lcount_regnum || regnum == -1) - regcache_raw_supply (rc, gdbarch_tdep (gdbarch)->lcount_regnum, - (char *) ®s->lcount); + rc->raw_supply (gdbarch_tdep (gdbarch)->lcount_regnum, + (char *) ®s->lcount); if (regnum == gdbarch_tdep (gdbarch)->sar_regnum || regnum == -1) - regcache_raw_supply (rc, gdbarch_tdep (gdbarch)->sar_regnum, - (char *) ®s->sar); + rc->raw_supply (gdbarch_tdep (gdbarch)->sar_regnum, + (char *) ®s->sar); if (regnum >=gdbarch_tdep (gdbarch)->ar_base && regnum < gdbarch_tdep (gdbarch)->ar_base + gdbarch_tdep (gdbarch)->num_aregs) - regcache_raw_supply (rc, regnum, - (char *) ®s->ar[regnum - gdbarch_tdep - (gdbarch)->ar_base]); + rc->raw_supply + (regnum, (char *) ®s->ar[regnum - gdbarch_tdep (gdbarch)->ar_base]); else if (regnum == -1) { for (i = 0; i < gdbarch_tdep (gdbarch)->num_aregs; ++i) - regcache_raw_supply (rc, gdbarch_tdep (gdbarch)->ar_base + i, - (char *) ®s->ar[i]); + rc->raw_supply (gdbarch_tdep (gdbarch)->ar_base + i, + (char *) ®s->ar[i]); } } |