aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/aarch32-linux-nat.c9
-rw-r--r--gdb/aarch64-linux-nat.c13
-rw-r--r--gdb/aix-thread.c46
-rw-r--r--gdb/alpha-tdep.c11
-rw-r--r--gdb/amd64-bsd-nat.c4
-rw-r--r--gdb/amd64-linux-nat.c4
-rw-r--r--gdb/amd64-nat.c2
-rw-r--r--gdb/amd64-obsd-tdep.c4
-rw-r--r--gdb/amd64-tdep.c8
-rw-r--r--gdb/arm-linux-nat.c13
-rw-r--r--gdb/arm-linux-tdep.c21
-rw-r--r--gdb/arm-nbsd-nat.c61
-rw-r--r--gdb/go32-nat.c4
-rw-r--r--gdb/hppa-linux-nat.c8
-rw-r--r--gdb/hppa-nbsd-nat.c34
-rw-r--r--gdb/hppa-obsd-nat.c44
-rw-r--r--gdb/i386-bsd-nat.c2
-rw-r--r--gdb/i386-darwin-nat.c5
-rw-r--r--gdb/i386-gnu-nat.c4
-rw-r--r--gdb/i386-linux-nat.c10
-rw-r--r--gdb/i386-nto-tdep.c2
-rw-r--r--gdb/i386-obsd-tdep.c4
-rw-r--r--gdb/i386-tdep.c2
-rw-r--r--gdb/i386-v4-nat.c2
-rw-r--r--gdb/i387-tdep.c40
-rw-r--r--gdb/ia64-linux-nat.c7
-rw-r--r--gdb/linux-nat-trad.c2
-rw-r--r--gdb/m32r-linux-nat.c6
-rw-r--r--gdb/m32r-linux-tdep.c9
-rw-r--r--gdb/m68k-bsd-nat.c5
-rw-r--r--gdb/m68k-linux-nat.c12
-rw-r--r--gdb/mips-linux-tdep.c8
-rw-r--r--gdb/mips-nbsd-tdep.c9
-rw-r--r--gdb/mips64-obsd-nat.c4
-rw-r--r--gdb/mn10300-linux-tdep.c110
-rw-r--r--gdb/nios2-linux-tdep.c3
-rw-r--r--gdb/nto-procfs.c2
-rw-r--r--gdb/ppc-linux-nat.c23
-rw-r--r--gdb/ppc-ravenscar-thread.c2
-rw-r--r--gdb/regcache.c9
-rw-r--r--gdb/regcache.h8
-rw-r--r--gdb/remote.c4
-rw-r--r--gdb/rs6000-nat.c2
-rw-r--r--gdb/rs6000-tdep.c2
-rw-r--r--gdb/s390-linux-nat.c4
-rw-r--r--gdb/sh-tdep.c2
-rw-r--r--gdb/sparc-obsd-tdep.c6
-rw-r--r--gdb/sparc-ravenscar-thread.c2
-rw-r--r--gdb/sparc-tdep.c28
-rw-r--r--gdb/sparc64-obsd-tdep.c6
-rw-r--r--gdb/sparc64-tdep.c54
-rw-r--r--gdb/spu-linux-nat.c4
-rw-r--r--gdb/spu-multiarch.c4
-rw-r--r--gdb/tilegx-linux-nat.c2
-rw-r--r--gdb/vax-bsd-nat.c2
-rw-r--r--gdb/windows-nat.c3
-rw-r--r--gdb/xtensa-linux-nat.c64
58 files changed, 354 insertions, 417 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c7dd3d6..ddb9277 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
+ * regcache.h (regcache_raw_collect): Remove, update callers to
+ use regcache::raw_collect.
+ * regcache.c (regcache_raw_collect): Remove.
+
+2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
+
* regcache.h (regcache_raw_supply): Remove, update callers to
use detached_regcache::raw_supply.
* regcache.c (regcache_raw_supply): Remove.
diff --git a/gdb/aarch32-linux-nat.c b/gdb/aarch32-linux-nat.c
index 3297d6c..e390361 100644
--- a/gdb/aarch32-linux-nat.c
+++ b/gdb/aarch32-linux-nat.c
@@ -62,7 +62,7 @@ aarch32_gp_regcache_collect (const struct regcache *regcache, uint32_t *regs,
for (regno = ARM_A1_REGNUM; regno <= ARM_PC_REGNUM; regno++)
{
if (REG_VALID == regcache->get_register_status (regno))
- regcache_raw_collect (regcache, regno, &regs[regno]);
+ regcache->raw_collect (regno, &regs[regno]);
}
if (arm_apcs_32
@@ -70,8 +70,7 @@ aarch32_gp_regcache_collect (const struct regcache *regcache, uint32_t *regs,
{
uint32_t cpsr = regs[ARM_CPSR_GREGNUM];
- regcache_raw_collect (regcache, ARM_PS_REGNUM,
- &regs[ARM_CPSR_GREGNUM]);
+ regcache->raw_collect (ARM_PS_REGNUM, &regs[ARM_CPSR_GREGNUM]);
/* Keep reserved bits bit 20 to bit 23. */
regs[ARM_CPSR_GREGNUM] = ((regs[ARM_CPSR_GREGNUM] & 0xff0fffff)
| (cpsr & 0x00f00000));
@@ -103,7 +102,7 @@ aarch32_vfp_regcache_collect (const struct regcache *regcache, gdb_byte *regs,
int regno;
for (regno = 0; regno < vfp_register_count; regno++)
- regcache_raw_collect (regcache, regno + ARM_D0_REGNUM, regs + regno * 8);
+ regcache->raw_collect (regno + ARM_D0_REGNUM, regs + regno * 8);
- regcache_raw_collect (regcache, ARM_FPSCR_REGNUM, regs + 32 * 8);
+ regcache->raw_collect (ARM_FPSCR_REGNUM, regs + 32 * 8);
}
diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c
index a46bace..950fa0a 100644
--- a/gdb/aarch64-linux-nat.c
+++ b/gdb/aarch64-linux-nat.c
@@ -265,8 +265,7 @@ store_gregs_to_thread (const struct regcache *regcache)
for (regno = AARCH64_X0_REGNUM; regno <= AARCH64_CPSR_REGNUM; regno++)
if (REG_VALID == regcache->get_register_status (regno))
- regcache_raw_collect (regcache, regno,
- &regs[regno - AARCH64_X0_REGNUM]);
+ regcache->raw_collect (regno, &regs[regno - AARCH64_X0_REGNUM]);
}
ret = ptrace (PTRACE_SETREGSET, tid, NT_PRSTATUS, &iovec);
@@ -361,15 +360,13 @@ store_fpregs_to_thread (const struct regcache *regcache)
for (regno = AARCH64_V0_REGNUM; regno <= AARCH64_V31_REGNUM; regno++)
if (REG_VALID == regcache->get_register_status (regno))
- regcache_raw_collect (regcache, regno,
- (char *) &regs.vregs[regno - AARCH64_V0_REGNUM]);
+ regcache->raw_collect
+ (regno, (char *) &regs.vregs[regno - AARCH64_V0_REGNUM]);
if (REG_VALID == regcache->get_register_status (AARCH64_FPSR_REGNUM))
- regcache_raw_collect (regcache, AARCH64_FPSR_REGNUM,
- (char *) &regs.fpsr);
+ regcache->raw_collect (AARCH64_FPSR_REGNUM, (char *) &regs.fpsr);
if (REG_VALID == regcache->get_register_status (AARCH64_FPCR_REGNUM))
- regcache_raw_collect (regcache, AARCH64_FPCR_REGNUM,
- (char *) &regs.fpcr);
+ regcache->raw_collect (AARCH64_FPCR_REGNUM, (char *) &regs.fpcr);
}
if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 32)
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index 838b1a3..ebd4bee 100644
--- a/gdb/aix-thread.c
+++ b/gdb/aix-thread.c
@@ -1386,8 +1386,7 @@ fill_gprs64 (const struct regcache *regcache, uint64_t *vals)
for (regno = 0; regno < ppc_num_gprs; regno++)
if (REG_VALID == regcache->get_register_status
(tdep->ppc_gp0_regnum + regno))
- regcache_raw_collect (regcache, tdep->ppc_gp0_regnum + regno,
- vals + regno);
+ regcache->raw_collect (tdep->ppc_gp0_regnum + regno, vals + regno);
}
static void
@@ -1399,8 +1398,7 @@ fill_gprs32 (const struct regcache *regcache, uint32_t *vals)
for (regno = 0; regno < ppc_num_gprs; regno++)
if (REG_VALID == regcache->get_register_status
(tdep->ppc_gp0_regnum + regno))
- regcache_raw_collect (regcache, tdep->ppc_gp0_regnum + regno,
- vals + regno);
+ regcache->raw_collect (tdep->ppc_gp0_regnum + regno, vals + regno);
}
/* Store the floating point registers into a double array. */
@@ -1419,8 +1417,7 @@ fill_fprs (const struct regcache *regcache, double *vals)
regno < tdep->ppc_fp0_regnum + ppc_num_fprs;
regno++)
if (REG_VALID == regcache->get_register_status (regno))
- regcache_raw_collect (regcache, regno,
- vals + regno - tdep->ppc_fp0_regnum);
+ regcache->raw_collect (regno, vals + regno - tdep->ppc_fp0_regnum);
}
/* Store the special registers into the specified 64-bit and 32-bit
@@ -1444,20 +1441,20 @@ fill_sprs64 (const struct regcache *regcache,
(gdbarch, gdbarch_pc_regnum (gdbarch)));
if (REG_VALID == regcache->get_register_status (gdbarch_pc_regnum (gdbarch)))
- regcache_raw_collect (regcache, gdbarch_pc_regnum (gdbarch), iar);
+ regcache->raw_collect (gdbarch_pc_regnum (gdbarch), iar);
if (REG_VALID == regcache->get_register_status (tdep->ppc_ps_regnum))
- regcache_raw_collect (regcache, tdep->ppc_ps_regnum, msr);
+ regcache->raw_collect (tdep->ppc_ps_regnum, msr);
if (REG_VALID == regcache->get_register_status (tdep->ppc_cr_regnum))
- regcache_raw_collect (regcache, tdep->ppc_cr_regnum, cr);
+ regcache->raw_collect (tdep->ppc_cr_regnum, cr);
if (REG_VALID == regcache->get_register_status (tdep->ppc_lr_regnum))
- regcache_raw_collect (regcache, tdep->ppc_lr_regnum, lr);
+ regcache->raw_collect (tdep->ppc_lr_regnum, lr);
if (REG_VALID == regcache->get_register_status (tdep->ppc_ctr_regnum))
- regcache_raw_collect (regcache, tdep->ppc_ctr_regnum, ctr);
+ regcache->raw_collect (tdep->ppc_ctr_regnum, ctr);
if (REG_VALID == regcache->get_register_status (tdep->ppc_xer_regnum))
- regcache_raw_collect (regcache, tdep->ppc_xer_regnum, xer);
+ regcache->raw_collect (tdep->ppc_xer_regnum, xer);
if (tdep->ppc_fpscr_regnum >= 0
&& REG_VALID == regcache->get_register_status (tdep->ppc_fpscr_regnum))
- regcache_raw_collect (regcache, tdep->ppc_fpscr_regnum, fpscr);
+ regcache->raw_collect (tdep->ppc_fpscr_regnum, fpscr);
}
static void
@@ -1478,20 +1475,20 @@ fill_sprs32 (const struct regcache *regcache,
gdbarch_pc_regnum (gdbarch)));
if (REG_VALID == regcache->get_register_status (gdbarch_pc_regnum (gdbarch)))
- regcache_raw_collect (regcache, gdbarch_pc_regnum (gdbarch), iar);
+ regcache->raw_collect (gdbarch_pc_regnum (gdbarch), iar);
if (REG_VALID == regcache->get_register_status (tdep->ppc_ps_regnum))
- regcache_raw_collect (regcache, tdep->ppc_ps_regnum, msr);
+ regcache->raw_collect (tdep->ppc_ps_regnum, msr);
if (REG_VALID == regcache->get_register_status (tdep->ppc_cr_regnum))
- regcache_raw_collect (regcache, tdep->ppc_cr_regnum, cr);
+ regcache->raw_collect (tdep->ppc_cr_regnum, cr);
if (REG_VALID == regcache->get_register_status (tdep->ppc_lr_regnum))
- regcache_raw_collect (regcache, tdep->ppc_lr_regnum, lr);
+ regcache->raw_collect (tdep->ppc_lr_regnum, lr);
if (REG_VALID == regcache->get_register_status (tdep->ppc_ctr_regnum))
- regcache_raw_collect (regcache, tdep->ppc_ctr_regnum, ctr);
+ regcache->raw_collect (tdep->ppc_ctr_regnum, ctr);
if (REG_VALID == regcache->get_register_status (tdep->ppc_xer_regnum))
- regcache_raw_collect (regcache, tdep->ppc_xer_regnum, xer);
+ regcache->raw_collect (tdep->ppc_xer_regnum, xer);
if (tdep->ppc_fpscr_regnum >= 0
&& REG_VALID == regcache->get_register_status (tdep->ppc_fpscr_regnum))
- regcache_raw_collect (regcache, tdep->ppc_fpscr_regnum, fpscr);
+ regcache->raw_collect (tdep->ppc_fpscr_regnum, fpscr);
}
/* Store all registers into pthread PDTID, which doesn't have a kernel
@@ -1529,14 +1526,12 @@ store_regs_user_thread (const struct regcache *regcache, pthdb_pthread_t pdtid)
{
if (arch64)
{
- regcache_raw_collect (regcache, tdep->ppc_gp0_regnum + i,
- (void *) &int64);
+ regcache->raw_collect (tdep->ppc_gp0_regnum + i, (void *) &int64);
ctx.gpr[i] = int64;
}
else
{
- regcache_raw_collect (regcache, tdep->ppc_gp0_regnum + i,
- (void *) &int32);
+ regcache->raw_collect (tdep->ppc_gp0_regnum + i, (void *) &int32);
ctx.gpr[i] = int32;
}
}
@@ -1689,8 +1684,7 @@ store_regs_kernel_thread (const struct regcache *regcache, int regno,
if (tdep->ppc_mq_regnum >= 0)
if (REG_VALID == regcache->get_register_status
(tdep->ppc_mq_regnum))
- regcache_raw_collect (regcache, tdep->ppc_mq_regnum,
- &sprs32.pt_mq);
+ regcache->raw_collect (tdep->ppc_mq_regnum, &sprs32.pt_mq);
ptrace32 (PTT_WRITE_SPRS, tid, (uintptr_t) &sprs32, 0, NULL);
}
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 8ca1e51..53943e1 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -1524,13 +1524,13 @@ alpha_fill_int_regs (const struct regcache *regcache,
for (i = 0; i < 31; ++i)
if (regno == i || regno == -1)
- regcache_raw_collect (regcache, i, regs + i * 8);
+ regcache->raw_collect (i, regs + i * 8);
if (regno == ALPHA_PC_REGNUM || regno == -1)
- regcache_raw_collect (regcache, ALPHA_PC_REGNUM, pc);
+ regcache->raw_collect (ALPHA_PC_REGNUM, pc);
if (unique && (regno == ALPHA_UNIQUE_REGNUM || regno == -1))
- regcache_raw_collect (regcache, ALPHA_UNIQUE_REGNUM, unique);
+ regcache->raw_collect (ALPHA_UNIQUE_REGNUM, unique);
}
void
@@ -1557,11 +1557,10 @@ alpha_fill_fp_regs (const struct regcache *regcache,
for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; ++i)
if (regno == i || regno == -1)
- regcache_raw_collect (regcache, i,
- regs + (i - ALPHA_FP0_REGNUM) * 8);
+ regcache->raw_collect (i, regs + (i - ALPHA_FP0_REGNUM) * 8);
if (regno == ALPHA_FPCR_REGNUM || regno == -1)
- regcache_raw_collect (regcache, ALPHA_FPCR_REGNUM, fpcr);
+ regcache->raw_collect (ALPHA_FPCR_REGNUM, fpcr);
}
diff --git a/gdb/amd64-bsd-nat.c b/gdb/amd64-bsd-nat.c
index 6c46303..cf3c3b3 100644
--- a/gdb/amd64-bsd-nat.c
+++ b/gdb/amd64-bsd-nat.c
@@ -138,7 +138,7 @@ amd64bsd_store_inferior_registers (struct regcache *regcache, int regnum)
{
register_t base;
- regcache_raw_collect (regcache, AMD64_FSBASE_REGNUM, &base);
+ regcache->raw_collect (AMD64_FSBASE_REGNUM, &base);
if (ptrace (PT_SETFSBASE, pid, (PTRACE_TYPE_ARG3) &base, 0) == -1)
perror_with_name (_("Couldn't write segment register fs_base"));
@@ -151,7 +151,7 @@ amd64bsd_store_inferior_registers (struct regcache *regcache, int regnum)
{
register_t base;
- regcache_raw_collect (regcache, AMD64_GSBASE_REGNUM, &base);
+ regcache->raw_collect (AMD64_GSBASE_REGNUM, &base);
if (ptrace (PT_SETGSBASE, pid, (PTRACE_TYPE_ARG3) &base, 0) == -1)
perror_with_name (_("Couldn't write segment register gs_base"));
diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c
index 623a90e..5a39fa8 100644
--- a/gdb/amd64-linux-nat.c
+++ b/gdb/amd64-linux-nat.c
@@ -287,7 +287,7 @@ amd64_linux_nat_target::store_registers (struct regcache *regcache, int regnum)
if (regnum == -1 || regnum == AMD64_FSBASE_REGNUM)
{
- regcache_raw_collect (regcache, AMD64_FSBASE_REGNUM, &base);
+ regcache->raw_collect (AMD64_FSBASE_REGNUM, &base);
if (ptrace (PTRACE_ARCH_PRCTL, tid, base, ARCH_SET_FS) < 0)
perror_with_name (_("Couldn't write segment register fs_base"));
@@ -295,7 +295,7 @@ amd64_linux_nat_target::store_registers (struct regcache *regcache, int regnum)
if (regnum == -1 || regnum == AMD64_GSBASE_REGNUM)
{
- regcache_raw_collect (regcache, AMD64_GSBASE_REGNUM, &base);
+ regcache->raw_collect (AMD64_GSBASE_REGNUM, &base);
if (ptrace (PTRACE_ARCH_PRCTL, tid, base, ARCH_SET_GS) < 0)
perror_with_name (_("Couldn't write segment register gs_base"));
}
diff --git a/gdb/amd64-nat.c b/gdb/amd64-nat.c
index 5dde69c..155683c 100644
--- a/gdb/amd64-nat.c
+++ b/gdb/amd64-nat.c
@@ -160,7 +160,7 @@ amd64_collect_native_gregset (const struct regcache *regcache,
int offset = amd64_native_gregset_reg_offset (gdbarch, i);
if (offset != -1)
- regcache_raw_collect (regcache, i, regs + offset);
+ regcache->raw_collect (i, regs + offset);
}
}
}
diff --git a/gdb/amd64-obsd-tdep.c b/gdb/amd64-obsd-tdep.c
index 4089200..1e078b1 100644
--- a/gdb/amd64-obsd-tdep.c
+++ b/gdb/amd64-obsd-tdep.c
@@ -281,7 +281,7 @@ amd64obsd_collect_uthread (const struct regcache *regcache,
/* Calculate the stack pointer (frame pointer) that will be
stored into the thread structure. */
offset = amd64obsd_uthread_reg_offset[AMD64_RIP_REGNUM] + 8;
- regcache_raw_collect (regcache, AMD64_RSP_REGNUM, buf);
+ regcache->raw_collect (AMD64_RSP_REGNUM, buf);
sp = extract_unsigned_integer (buf, 8, byte_order) - offset;
/* Store the stack pointer. */
@@ -303,7 +303,7 @@ amd64obsd_collect_uthread (const struct regcache *regcache,
sp = read_memory_unsigned_integer (sp_addr, 8, byte_order);
/* Write the register into the stack frame. */
- regcache_raw_collect (regcache, i, buf);
+ regcache->raw_collect (i, buf);
write_memory (sp + amd64obsd_uthread_reg_offset[i], buf, 8);
}
}
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index 8b925fd..9f8f018 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -3406,9 +3406,9 @@ amd64_collect_fxsave (const struct regcache *regcache, int regnum,
if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 64)
{
if (regnum == -1 || regnum == I387_FISEG_REGNUM (tdep))
- regcache_raw_collect (regcache, I387_FISEG_REGNUM (tdep), regs + 12);
+ regcache->raw_collect (I387_FISEG_REGNUM (tdep), regs + 12);
if (regnum == -1 || regnum == I387_FOSEG_REGNUM (tdep))
- regcache_raw_collect (regcache, I387_FOSEG_REGNUM (tdep), regs + 20);
+ regcache->raw_collect (I387_FOSEG_REGNUM (tdep), regs + 20);
}
}
@@ -3427,10 +3427,10 @@ amd64_collect_xsave (const struct regcache *regcache, int regnum,
if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 64)
{
if (regnum == -1 || regnum == I387_FISEG_REGNUM (tdep))
- regcache_raw_collect (regcache, I387_FISEG_REGNUM (tdep),
+ regcache->raw_collect (I387_FISEG_REGNUM (tdep),
regs + 12);
if (regnum == -1 || regnum == I387_FOSEG_REGNUM (tdep))
- regcache_raw_collect (regcache, I387_FOSEG_REGNUM (tdep),
+ regcache->raw_collect (I387_FOSEG_REGNUM (tdep),
regs + 20);
}
}
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
index 163e1be..984bbe2 100644
--- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c
@@ -176,7 +176,7 @@ store_fpregs (const struct regcache *regcache)
/* Store fpsr. */
if (REG_VALID == regcache->get_register_status (ARM_FPS_REGNUM))
- regcache_raw_collect (regcache, ARM_FPS_REGNUM, fp + NWFPE_FPSR_OFFSET);
+ regcache->raw_collect (ARM_FPS_REGNUM, fp + NWFPE_FPSR_OFFSET);
/* Store the floating point registers. */
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
@@ -317,18 +317,17 @@ store_wmmx_regs (const struct regcache *regcache)
for (regno = 0; regno < 16; regno++)
if (REG_VALID == regcache->get_register_status (regno + ARM_WR0_REGNUM))
- regcache_raw_collect (regcache, regno + ARM_WR0_REGNUM,
- &regbuf[regno * 8]);
+ regcache->raw_collect (regno + ARM_WR0_REGNUM, &regbuf[regno * 8]);
for (regno = 0; regno < 2; regno++)
if (REG_VALID == regcache->get_register_status (regno + ARM_WCSSF_REGNUM))
- regcache_raw_collect (regcache, regno + ARM_WCSSF_REGNUM,
- &regbuf[16 * 8 + regno * 4]);
+ regcache->raw_collect (regno + ARM_WCSSF_REGNUM,
+ &regbuf[16 * 8 + regno * 4]);
for (regno = 0; regno < 4; regno++)
if (REG_VALID == regcache->get_register_status (regno + ARM_WCGR0_REGNUM))
- regcache_raw_collect (regcache, regno + ARM_WCGR0_REGNUM,
- &regbuf[16 * 8 + 2 * 4 + regno * 4]);
+ regcache->raw_collect (regno + ARM_WCGR0_REGNUM,
+ &regbuf[16 * 8 + 2 * 4 + regno * 4]);
ret = ptrace (PTRACE_SETWMMXREGS, tid, 0, regbuf);
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index d8a8347..eb4e206 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -520,22 +520,22 @@ arm_linux_collect_gregset (const struct regset *regset,
for (regno = ARM_A1_REGNUM; regno < ARM_PC_REGNUM; regno++)
if (regnum == -1 || regnum == regno)
- regcache_raw_collect (regcache, regno,
+ regcache->raw_collect (regno,
gregs + INT_REGISTER_SIZE * regno);
if (regnum == ARM_PS_REGNUM || regnum == -1)
{
if (arm_apcs_32)
- regcache_raw_collect (regcache, ARM_PS_REGNUM,
+ regcache->raw_collect (ARM_PS_REGNUM,
gregs + INT_REGISTER_SIZE * ARM_CPSR_GREGNUM);
else
- regcache_raw_collect (regcache, ARM_PS_REGNUM,
+ regcache->raw_collect (ARM_PS_REGNUM,
gregs + INT_REGISTER_SIZE * ARM_PC_REGNUM);
}
if (regnum == ARM_PC_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, ARM_PC_REGNUM,
- gregs + INT_REGISTER_SIZE * ARM_PC_REGNUM);
+ regcache->raw_collect (ARM_PC_REGNUM,
+ gregs + INT_REGISTER_SIZE * ARM_PC_REGNUM);
}
/* Support for register format used by the NWFPE FPA emulator. */
@@ -588,7 +588,7 @@ collect_nwfpe_register (const struct regcache *regcache, int regno,
gdb_byte reg_tag;
gdb_byte buf[FP_REGISTER_SIZE];
- regcache_raw_collect (regcache, regno, buf);
+ regcache->raw_collect (regno, buf);
/* NOTE drow/2006-06-07: This code uses the tag already in the
register buffer. I've preserved that when moving the code
@@ -647,8 +647,8 @@ arm_linux_collect_nwfpe (const struct regset *regset,
collect_nwfpe_register (regcache, regno, regs);
if (regnum == ARM_FPS_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, ARM_FPS_REGNUM,
- regs + INT_REGISTER_SIZE * ARM_FPS_REGNUM);
+ regcache->raw_collect (ARM_FPS_REGNUM,
+ regs + INT_REGISTER_SIZE * ARM_FPS_REGNUM);
}
/* Support VFP register format. */
@@ -680,12 +680,11 @@ arm_linux_collect_vfp (const struct regset *regset,
int regno;
if (regnum == ARM_FPSCR_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, ARM_FPSCR_REGNUM, regs + 32 * 8);
+ regcache->raw_collect (ARM_FPSCR_REGNUM, regs + 32 * 8);
for (regno = ARM_D0_REGNUM; regno <= ARM_D31_REGNUM; regno++)
if (regnum == -1 || regnum == regno)
- regcache_raw_collect (regcache, regno,
- regs + (regno - ARM_D0_REGNUM) * 8);
+ regcache->raw_collect (regno, regs + (regno - ARM_D0_REGNUM) * 8);
}
static const struct regset arm_linux_gregset =
diff --git a/gdb/arm-nbsd-nat.c b/gdb/arm-nbsd-nat.c
index a641ccb..2a298ee 100644
--- a/gdb/arm-nbsd-nat.c
+++ b/gdb/arm-nbsd-nat.c
@@ -228,25 +228,22 @@ store_register (const struct regcache *regcache, int regno)
switch (regno)
{
case ARM_SP_REGNUM:
- regcache_raw_collect (regcache, ARM_SP_REGNUM,
- (char *) &inferior_registers.r_sp);
+ regcache->raw_collect (ARM_SP_REGNUM, (char *) &inferior_registers.r_sp);
break;
case ARM_LR_REGNUM:
- regcache_raw_collect (regcache, ARM_LR_REGNUM,
- (char *) &inferior_registers.r_lr);
+ regcache->raw_collect (ARM_LR_REGNUM, (char *) &inferior_registers.r_lr);
break;
case ARM_PC_REGNUM:
if (arm_apcs_32)
- regcache_raw_collect (regcache, ARM_PC_REGNUM,
- (char *) &inferior_registers.r_pc);
+ regcache->raw_collect (ARM_PC_REGNUM,
+ (char *) &inferior_registers.r_pc);
else
{
unsigned pc_val;
- regcache_raw_collect (regcache, ARM_PC_REGNUM,
- (char *) &pc_val);
+ regcache->raw_collect (ARM_PC_REGNUM, (char *) &pc_val);
pc_val = gdbarch_addr_bits_remove (gdbarch, pc_val);
inferior_registers.r_pc ^= gdbarch_addr_bits_remove
@@ -257,14 +254,13 @@ store_register (const struct regcache *regcache, int regno)
case ARM_PS_REGNUM:
if (arm_apcs_32)
- regcache_raw_collect (regcache, ARM_PS_REGNUM,
- (char *) &inferior_registers.r_cpsr);
+ regcache->raw_collect (ARM_PS_REGNUM,
+ (char *) &inferior_registers.r_cpsr);
else
{
unsigned psr_val;
- regcache_raw_collect (regcache, ARM_PS_REGNUM,
- (char *) &psr_val);
+ regcache->raw_collect (ARM_PS_REGNUM, (char *) &psr_val);
psr_val ^= gdbarch_addr_bits_remove (gdbarch, psr_val);
inferior_registers.r_pc = gdbarch_addr_bits_remove
@@ -274,8 +270,7 @@ store_register (const struct regcache *regcache, int regno)
break;
default:
- regcache_raw_collect (regcache, regno,
- (char *) &inferior_registers.r[regno]);
+ regcache->raw_collect (regno, (char *) &inferior_registers.r[regno]);
break;
}
@@ -296,30 +291,24 @@ store_regs (const struct regcache *regcache)
for (regno = ARM_A1_REGNUM; regno < ARM_SP_REGNUM; regno++)
- regcache_raw_collect (regcache, regno,
- (char *) &inferior_registers.r[regno]);
+ regcache->raw_collect (regno, (char *) &inferior_registers.r[regno]);
- regcache_raw_collect (regcache, ARM_SP_REGNUM,
- (char *) &inferior_registers.r_sp);
- regcache_raw_collect (regcache, ARM_LR_REGNUM,
- (char *) &inferior_registers.r_lr);
+ regcache->raw_collect (ARM_SP_REGNUM, (char *) &inferior_registers.r_sp);
+ regcache->raw_collect (ARM_LR_REGNUM, (char *) &inferior_registers.r_lr);
if (arm_apcs_32)
{
- regcache_raw_collect (regcache, ARM_PC_REGNUM,
- (char *) &inferior_registers.r_pc);
- regcache_raw_collect (regcache, ARM_PS_REGNUM,
- (char *) &inferior_registers.r_cpsr);
+ regcache->raw_collect (ARM_PC_REGNUM, (char *) &inferior_registers.r_pc);
+ regcache->raw_collect (ARM_PS_REGNUM,
+ (char *) &inferior_registers.r_cpsr);
}
else
{
unsigned pc_val;
unsigned psr_val;
- regcache_raw_collect (regcache, ARM_PC_REGNUM,
- (char *) &pc_val);
- regcache_raw_collect (regcache, ARM_PS_REGNUM,
- (char *) &psr_val);
+ regcache->raw_collect (ARM_PC_REGNUM, (char *) &pc_val);
+ regcache->raw_collect (ARM_PS_REGNUM, (char *) &psr_val);
pc_val = gdbarch_addr_bits_remove (gdbarch, pc_val);
psr_val ^= gdbarch_addr_bits_remove (gdbarch, psr_val);
@@ -352,13 +341,13 @@ store_fp_register (const struct regcache *regcache, int regno)
switch (regno)
{
case ARM_FPS_REGNUM:
- regcache_raw_collect (regcache, ARM_FPS_REGNUM,
- (char *) &inferior_fp_registers.fpr_fpsr);
+ regcache->raw_collect (ARM_FPS_REGNUM,
+ (char *) &inferior_fp_registers.fpr_fpsr);
break;
default:
- regcache_raw_collect (regcache, regno,
- (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
+ regcache->raw_collect
+ (regno, (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
break;
}
@@ -378,11 +367,11 @@ store_fp_regs (const struct regcache *regcache)
for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
- regcache_raw_collect (regcache, regno,
- (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
+ regcache->raw_collect
+ (regno, (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]);
- regcache_raw_collect (regcache, ARM_FPS_REGNUM,
- (char *) &inferior_fp_registers.fpr_fpsr);
+ regcache->raw_collect (ARM_FPS_REGNUM,
+ (char *) &inferior_fp_registers.fpr_fpsr);
ret = ptrace (PT_SETFPREGS, ptid_get_pid (regcache->ptid ()),
(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c
index a2affe1..81e2ea4 100644
--- a/gdb/go32-nat.c
+++ b/gdb/go32-nat.c
@@ -571,8 +571,8 @@ store_register (const struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = regcache->arch ();
if (regno < gdbarch_fp0_regnum (gdbarch))
- regcache_raw_collect (regcache, regno,
- (char *) &a_tss + regno_mapping[regno].tss_ofs);
+ regcache->raw_collect (regno,
+ (char *) &a_tss + regno_mapping[regno].tss_ofs);
else if (i386_fp_regnum_p (gdbarch, regno) || i386_fpc_regnum_p (gdbarch,
regno))
i387_collect_fsave (regcache, regno, &npx);
diff --git a/gdb/hppa-linux-nat.c b/gdb/hppa-linux-nat.c
index 7dea079..6fd70c6 100644
--- a/gdb/hppa-linux-nat.c
+++ b/gdb/hppa-linux-nat.c
@@ -260,7 +260,7 @@ store_register (const struct regcache *regcache, int regno)
tid = get_ptrace_pid (regcache->ptid ());
errno = 0;
- regcache_raw_collect (regcache, regno, &val);
+ regcache->raw_collect (regno, &val);
ptrace (PTRACE_POKEUSER, tid, hppa_linux_register_addr (regno, 0), val);
if (errno != 0)
error (_("Couldn't write register %s (#%d): %s."),
@@ -340,9 +340,7 @@ fill_gregset (const struct regcache *regcache,
int mregno = greg_map[i];
if (regno == -1 || regno == mregno)
- {
- regcache_raw_collect(regcache, mregno, &(*gregsetp)[i]);
- }
+ regcache->raw_collect (mregno, &(*gregsetp)[i]);
}
}
@@ -382,7 +380,7 @@ fill_fpregset (const struct regcache *regcache,
char *to = (char *) &((*fpregsetp)[(i - HPPA_FP0_REGNUM) / 2]);
if ((i - HPPA_FP0_REGNUM) & 1)
to += 4;
- regcache_raw_collect (regcache, i, to);
+ regcache->raw_collect (i, to);
}
}
diff --git a/gdb/hppa-nbsd-nat.c b/gdb/hppa-nbsd-nat.c
index 99dfd32..40a08b7 100644
--- a/gdb/hppa-nbsd-nat.c
+++ b/gdb/hppa-nbsd-nat.c
@@ -108,38 +108,38 @@ hppanbsd_collect_gregset (const struct regcache *regcache,
for (i = HPPA_R1_REGNUM; i <= HPPA_R31_REGNUM; i++)
{
if (regnum == -1 || regnum == i)
- regcache_raw_collect (regcache, i, regs + i * 4);
+ regcache->raw_collect (i, regs + i * 4);
}
if (regnum == -1 || regnum == HPPA_IPSW_REGNUM)
- regcache_raw_collect (regcache, HPPA_IPSW_REGNUM, regs);
+ regcache->raw_collect (HPPA_IPSW_REGNUM, regs);
if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
+ regcache->raw_collect (HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
+ regcache->raw_collect (HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
- regcache_raw_collect (regcache, HPPA_SAR_REGNUM, regs + 32 * 4);
+ regcache->raw_collect (HPPA_SAR_REGNUM, regs + 32 * 4);
if (regnum == -1 || regnum == HPPA_PCSQ_HEAD_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
+ regcache->raw_collect (HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
if (regnum == -1 || regnum == HPPA_PCSQ_TAIL_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
+ regcache->raw_collect (HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
+ regcache->raw_collect (HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
+ regcache->raw_collect (HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
if (regnum == -1 || regnum == HPPA_IPSW_REGNUM)
- regcache_raw_collect (regcache, HPPA_IPSW_REGNUM, regs);
+ regcache->raw_collect (HPPA_IPSW_REGNUM, regs);
if (regnum == -1 || regnum == HPPA_SR4_REGNUM)
- regcache_raw_collect (regcache, HPPA_SR4_REGNUM, regs + 41 * 4);
+ regcache->raw_collect (HPPA_SR4_REGNUM, regs + 41 * 4);
if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 1)
- regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 1, regs + 37 * 4);
+ regcache->raw_collect (HPPA_SR4_REGNUM + 1, regs + 37 * 4);
if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 2)
- regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 2, regs + 38 * 4);
+ regcache->raw_collect (HPPA_SR4_REGNUM + 2, regs + 38 * 4);
if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 3)
- regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 3, regs + 39 * 4);
+ regcache->raw_collect (HPPA_SR4_REGNUM + 3, regs + 39 * 4);
if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 4)
- regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 4, regs + 40 * 4);
+ regcache->raw_collect (HPPA_SR4_REGNUM + 4, regs + 40 * 4);
}
/* Collect the floating-point registers from REGCACHE and store them
@@ -156,8 +156,8 @@ hppanbsd_collect_fpregset (struct regcache *regcache,
{
if (regnum == -1 || regnum == i || regnum == i + 1)
{
- regcache_raw_collect (regcache, i, regs);
- regcache_raw_collect (regcache, i + 1, regs + 4);
+ regcache->raw_collect (i, regs);
+ regcache->raw_collect (i + 1, regs + 4);
}
}
}
diff --git a/gdb/hppa-obsd-nat.c b/gdb/hppa-obsd-nat.c
index 53880f6..eb056e3 100644
--- a/gdb/hppa-obsd-nat.c
+++ b/gdb/hppa-obsd-nat.c
@@ -120,52 +120,52 @@ hppaobsd_collect_gregset (const struct regcache *regcache,
for (i = HPPA_R1_REGNUM; i <= HPPA_R31_REGNUM; i++)
{
if (regnum == -1 || regnum == i)
- regcache_raw_collect (regcache, i, regs + i * 4);
+ regcache->raw_collect (i, regs + i * 4);
}
if (sizeof(struct reg) >= 46 * 4)
{
if (regnum == -1 || regnum == HPPA_IPSW_REGNUM)
- regcache_raw_collect (regcache, HPPA_IPSW_REGNUM, regs);
+ regcache->raw_collect (HPPA_IPSW_REGNUM, regs);
if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
- regcache_raw_collect (regcache, HPPA_SAR_REGNUM, regs + 32 * 4);
+ regcache->raw_collect (HPPA_SAR_REGNUM, regs + 32 * 4);
if (regnum == -1 || regnum == HPPA_PCSQ_HEAD_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
+ regcache->raw_collect (HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
if (regnum == -1 || regnum == HPPA_PCSQ_TAIL_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
+ regcache->raw_collect (HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
+ regcache->raw_collect (HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
+ regcache->raw_collect (HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
if (regnum == -1 || regnum == HPPA_SR0_REGNUM)
- regcache_raw_collect (regcache, HPPA_SR0_REGNUM, regs + 37 * 4);
+ regcache->raw_collect (HPPA_SR0_REGNUM, regs + 37 * 4);
if (regnum == -1 || regnum == HPPA_SR1_REGNUM)
- regcache_raw_collect (regcache, HPPA_SR1_REGNUM, regs + 38 * 4);
+ regcache->raw_collect (HPPA_SR1_REGNUM, regs + 38 * 4);
if (regnum == -1 || regnum == HPPA_SR2_REGNUM)
- regcache_raw_collect (regcache, HPPA_SR2_REGNUM, regs + 39 * 4);
+ regcache->raw_collect (HPPA_SR2_REGNUM, regs + 39 * 4);
if (regnum == -1 || regnum == HPPA_SR3_REGNUM)
- regcache_raw_collect (regcache, HPPA_SR3_REGNUM, regs + 40 * 4);
+ regcache->raw_collect (HPPA_SR3_REGNUM, regs + 40 * 4);
if (regnum == -1 || regnum == HPPA_SR4_REGNUM)
- regcache_raw_collect (regcache, HPPA_SR4_REGNUM, regs + 41 * 4);
+ regcache->raw_collect (HPPA_SR4_REGNUM, regs + 41 * 4);
if (regnum == -1 || regnum == HPPA_SR5_REGNUM)
- regcache_raw_collect (regcache, HPPA_SR5_REGNUM, regs + 42 * 4);
+ regcache->raw_collect (HPPA_SR5_REGNUM, regs + 42 * 4);
if (regnum == -1 || regnum == HPPA_SR6_REGNUM)
- regcache_raw_collect (regcache, HPPA_SR6_REGNUM, regs + 43 * 4);
+ regcache->raw_collect (HPPA_SR6_REGNUM, regs + 43 * 4);
if (regnum == -1 || regnum == HPPA_SR7_REGNUM)
- regcache_raw_collect (regcache, HPPA_SR7_REGNUM, regs + 44 * 4);
+ regcache->raw_collect (HPPA_SR7_REGNUM, regs + 44 * 4);
if (regnum == -1 || regnum == HPPA_CR26_REGNUM)
- regcache_raw_collect (regcache, HPPA_CR26_REGNUM, regs + 45 * 4);
+ regcache->raw_collect (HPPA_CR26_REGNUM, regs + 45 * 4);
if (regnum == -1 || regnum == HPPA_CR27_REGNUM)
- regcache_raw_collect (regcache, HPPA_CR27_REGNUM, regs + 46 * 4);
+ regcache->raw_collect (HPPA_CR27_REGNUM, regs + 46 * 4);
}
else
{
if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
- regcache_raw_collect (regcache, HPPA_SAR_REGNUM, regs);
+ regcache->raw_collect (HPPA_SAR_REGNUM, regs);
if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4);
+ regcache->raw_collect (HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4);
if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
- regcache_raw_collect (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4);
+ regcache->raw_collect (HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4);
}
}
@@ -183,8 +183,8 @@ hppaobsd_collect_fpregset (struct regcache *regcache,
{
if (regnum == -1 || regnum == i || regnum == i + 1)
{
- regcache_raw_collect (regcache, i, regs);
- regcache_raw_collect (regcache, i + 1, regs + 4);
+ regcache->raw_collect (i, regs);
+ regcache->raw_collect (i + 1, regs + 4);
}
}
}
diff --git a/gdb/i386-bsd-nat.c b/gdb/i386-bsd-nat.c
index 2753366..09ea99f 100644
--- a/gdb/i386-bsd-nat.c
+++ b/gdb/i386-bsd-nat.c
@@ -119,7 +119,7 @@ i386bsd_collect_gregset (const struct regcache *regcache,
int offset = i386bsd_r_reg_offset[i];
if (offset != -1)
- regcache_raw_collect (regcache, i, regs + offset);
+ regcache->raw_collect (i, regs + offset);
}
}
}
diff --git a/gdb/i386-darwin-nat.c b/gdb/i386-darwin-nat.c
index 2dbf95f..fbe6668 100644
--- a/gdb/i386-darwin-nat.c
+++ b/gdb/i386-darwin-nat.c
@@ -244,9 +244,8 @@ i386_darwin_nat_target::store_registers (struct regcache *regcache,
for (i = 0; i < I386_NUM_GREGS; i++)
if (regno == -1 || regno == i)
- regcache_raw_collect
- (regcache, i,
- (char *)&gp_regs + i386_darwin_thread_state_reg_offset[i]);
+ regcache->raw_collect
+ (i, (char *) &gp_regs + i386_darwin_thread_state_reg_offset[i]);
ret = thread_set_state (current_thread, x86_THREAD_STATE32,
(thread_state_t) &gp_regs,
diff --git a/gdb/i386-gnu-nat.c b/gdb/i386-gnu-nat.c
index 1acfc07..9875d81 100644
--- a/gdb/i386-gnu-nat.c
+++ b/gdb/i386-gnu-nat.c
@@ -265,7 +265,7 @@ gnu_store_registers (struct target_ops *ops,
for (i = 0; i < I386_NUM_GREGS; i++)
if (REG_VALID == regcache->get_register_status (i))
- regcache_raw_collect (regcache, i, REG_ADDR (state, i));
+ regcache->raw_collect (i, REG_ADDR (state, i));
}
else
{
@@ -273,7 +273,7 @@ gnu_store_registers (struct target_ops *ops,
gdbarch_register_name (gdbarch, regno));
gdb_assert (REG_VALID == regcache->get_register_status (regno));
- regcache_raw_collect (regcache, regno, REG_ADDR (state, regno));
+ regcache->raw_collect (regno, REG_ADDR (state, regno));
}
/* Restore the T bit. */
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
index 1d8483a..897a21f 100644
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -144,7 +144,7 @@ store_register (const struct regcache *regcache, int regno)
tid = get_ptrace_pid (regcache->ptid ());
errno = 0;
- regcache_raw_collect (regcache, regno, &val);
+ regcache->raw_collect (regno, &val);
ptrace (PTRACE_POKEUSER, tid,
i386_linux_gregset_reg_offset[regno], val);
if (errno != 0)
@@ -189,14 +189,14 @@ fill_gregset (const struct regcache *regcache,
for (i = 0; i < I386_NUM_GREGS; i++)
if (regno == -1 || regno == i)
- regcache_raw_collect (regcache, i,
- regp + i386_linux_gregset_reg_offset[i]);
+ regcache->raw_collect (i, regp + i386_linux_gregset_reg_offset[i]);
if ((regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM)
&& I386_LINUX_ORIG_EAX_REGNUM
< gdbarch_num_regs (regcache->arch ()))
- regcache_raw_collect (regcache, I386_LINUX_ORIG_EAX_REGNUM, regp
- + i386_linux_gregset_reg_offset[I386_LINUX_ORIG_EAX_REGNUM]);
+ regcache->raw_collect
+ (I386_LINUX_ORIG_EAX_REGNUM,
+ regp + i386_linux_gregset_reg_offset[I386_LINUX_ORIG_EAX_REGNUM]);
}
#ifdef HAVE_PTRACE_GETREGS
diff --git a/gdb/i386-nto-tdep.c b/gdb/i386-nto-tdep.c
index 83c05a2..1f8d7ca 100644
--- a/gdb/i386-nto-tdep.c
+++ b/gdb/i386-nto-tdep.c
@@ -250,7 +250,7 @@ i386nto_regset_fill (const struct regcache *regcache, int regset, char *data)
{
int offset = nto_reg_offset (regno);
if (offset != -1)
- regcache_raw_collect (regcache, regno, data + offset);
+ regcache->raw_collect (regno, data + offset);
}
}
else if (regset == NTO_REG_FLOAT)
diff --git a/gdb/i386-obsd-tdep.c b/gdb/i386-obsd-tdep.c
index da2b88a..851fec6 100644
--- a/gdb/i386-obsd-tdep.c
+++ b/gdb/i386-obsd-tdep.c
@@ -250,7 +250,7 @@ i386obsd_collect_uthread (const struct regcache *regcache,
/* Calculate the stack pointer (frame pointer) that will be
stored into the thread structure. */
offset = i386obsd_uthread_reg_offset[I386_EIP_REGNUM] + 4;
- regcache_raw_collect (regcache, I386_ESP_REGNUM, buf);
+ regcache->raw_collect (I386_ESP_REGNUM, buf);
sp = extract_unsigned_integer (buf, 4, byte_order) - offset;
/* Store the stack pointer. */
@@ -272,7 +272,7 @@ i386obsd_collect_uthread (const struct regcache *regcache,
sp = read_memory_unsigned_integer (sp_addr, 4, byte_order);
/* Write the register into the stack frame. */
- regcache_raw_collect (regcache, i, buf);
+ regcache->raw_collect (i, buf);
write_memory (sp + i386obsd_uthread_reg_offset[i], buf, 4);
}
}
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index f535cb3..b1d502f 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -3840,7 +3840,7 @@ i386_collect_gregset (const struct regset *regset,
{
if ((regnum == i || regnum == -1)
&& tdep->gregset_reg_offset[i] != -1)
- regcache_raw_collect (regcache, i, regs + tdep->gregset_reg_offset[i]);
+ regcache->raw_collect (i, regs + tdep->gregset_reg_offset[i]);
}
}
diff --git a/gdb/i386-v4-nat.c b/gdb/i386-v4-nat.c
index 2313ff8..ddf50d9 100644
--- a/gdb/i386-v4-nat.c
+++ b/gdb/i386-v4-nat.c
@@ -123,7 +123,7 @@ fill_gregset (const struct regcache *regcache,
for (i = 0; i < I386_NUM_GREGS; i++)
if (regnum == -1 || regnum == i)
- regcache_raw_collect (regcache, i, regp + regmap[i]);
+ regcache->raw_collect (i, regp + regmap[i]);
}
#endif /* HAVE_GREGSET_T */
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index b545f74..d0f64ad 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -508,7 +508,7 @@ i387_collect_fsave (const struct regcache *regcache, int regnum, void *fsave)
{
gdb_byte buf[4];
- regcache_raw_collect (regcache, i, buf);
+ regcache->raw_collect (i, buf);
if (i == I387_FOP_REGNUM (tdep))
{
@@ -520,7 +520,7 @@ i387_collect_fsave (const struct regcache *regcache, int regnum, void *fsave)
memcpy (FSAVE_ADDR (tdep, regs, i), buf, 2);
}
else
- regcache_raw_collect (regcache, i, FSAVE_ADDR (tdep, regs, i));
+ regcache->raw_collect (i, FSAVE_ADDR (tdep, regs, i));
}
}
@@ -685,7 +685,7 @@ i387_collect_fxsave (const struct regcache *regcache, int regnum, void *fxsave)
{
gdb_byte buf[4];
- regcache_raw_collect (regcache, i, buf);
+ regcache->raw_collect (i, buf);
if (i == I387_FOP_REGNUM (tdep))
{
@@ -716,11 +716,11 @@ i387_collect_fxsave (const struct regcache *regcache, int regnum, void *fxsave)
memcpy (FXSAVE_ADDR (tdep, regs, i), buf, 2);
}
else
- regcache_raw_collect (regcache, i, FXSAVE_ADDR (tdep, regs, i));
+ regcache->raw_collect (i, FXSAVE_ADDR (tdep, regs, i));
}
if (regnum == I387_MXCSR_REGNUM (tdep) || regnum == -1)
- regcache_raw_collect (regcache, I387_MXCSR_REGNUM (tdep),
+ regcache->raw_collect (I387_MXCSR_REGNUM (tdep),
FXSAVE_MXCSR_ADDR (regs));
}
@@ -1505,7 +1505,7 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
for (i = I387_PKRU_REGNUM (tdep);
i < I387_PKEYSEND_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = XSAVE_PKEYS_ADDR (tdep, regs, i);
if (memcmp (raw, p, 4) != 0)
{
@@ -1519,7 +1519,7 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
for (i = I387_ZMM0H_REGNUM (tdep);
i < I387_ZMMENDH_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = XSAVE_AVX512_ZMM_H_ADDR (tdep, regs, i);
if (memcmp (raw, p, 32) != 0)
{
@@ -1533,7 +1533,7 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
for (i = I387_K0_REGNUM (tdep);
i < I387_KEND_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = XSAVE_AVX512_K_ADDR (tdep, regs, i);
if (memcmp (raw, p, 8) != 0)
{
@@ -1548,7 +1548,7 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
for (i = I387_YMM16H_REGNUM (tdep);
i < I387_YMMH_AVX512_END_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = XSAVE_YMM_AVX512_ADDR (tdep, regs, i);
if (memcmp (raw, p, 16) != 0)
{
@@ -1559,7 +1559,7 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
for (i = I387_XMM16_REGNUM (tdep);
i < I387_XMM_AVX512_END_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = XSAVE_XMM_AVX512_ADDR (tdep, regs, i);
if (memcmp (raw, p, 16) != 0)
{
@@ -1574,7 +1574,7 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
for (i = I387_BND0R_REGNUM (tdep);
i < I387_BNDCFGU_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = XSAVE_MPX_ADDR (tdep, regs, i);
if (memcmp (raw, p, 16))
{
@@ -1588,7 +1588,7 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
for (i = I387_BNDCFGU_REGNUM (tdep);
i < I387_MPXEND_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = XSAVE_MPX_ADDR (tdep, regs, i);
if (memcmp (raw, p, 8))
{
@@ -1602,7 +1602,7 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
for (i = I387_YMM0H_REGNUM (tdep);
i < I387_YMMENDH_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = XSAVE_AVXH_ADDR (tdep, regs, i);
if (memcmp (raw, p, 16))
{
@@ -1616,7 +1616,7 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
for (i = I387_XMM0_REGNUM (tdep);
i < I387_MXCSR_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = FXSAVE_ADDR (tdep, regs, i);
if (memcmp (raw, p, 16))
{
@@ -1628,7 +1628,7 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
if ((tdep->xcr0 & X86_XSTATE_AVX) || (tdep->xcr0 & X86_XSTATE_SSE))
{
i = I387_MXCSR_REGNUM (tdep);
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = FXSAVE_MXCSR_ADDR (regs);
if (memcmp (raw, p, 4))
{
@@ -1649,7 +1649,7 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
for (i = I387_ST0_REGNUM (tdep);
i < I387_FCTRL_REGNUM (tdep); i++)
{
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
p = FXSAVE_ADDR (tdep, regs, i);
if (memcmp (raw, p, 10))
{
@@ -1661,7 +1661,7 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
else
{
/* Check if REGNUM is changed. */
- regcache_raw_collect (regcache, regnum, raw);
+ regcache->raw_collect (regnum, raw);
switch (regclass)
{
@@ -1731,7 +1731,7 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
case mpx:
if (regnum < I387_BNDCFGU_REGNUM (tdep))
{
- regcache_raw_collect (regcache, regnum, raw);
+ regcache->raw_collect (regnum, raw);
p = XSAVE_MPX_ADDR (tdep, regs, regnum);
if (memcmp (raw, p, 16))
{
@@ -1801,7 +1801,7 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
{
gdb_byte buf[4];
- regcache_raw_collect (regcache, i, buf);
+ regcache->raw_collect (i, buf);
if (i == I387_FOP_REGNUM (tdep))
{
@@ -1840,7 +1840,7 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
{
int regsize;
- regcache_raw_collect (regcache, i, raw);
+ regcache->raw_collect (i, raw);
regsize = regcache_register_size (regcache, i);
p = FXSAVE_ADDR (tdep, regs, i);
if (memcmp (raw, p, regsize))
diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c
index 98fd953..ef70da5 100644
--- a/gdb/ia64-linux-nat.c
+++ b/gdb/ia64-linux-nat.c
@@ -450,7 +450,7 @@ fill_gregset (const struct regcache *regcache, gregset_t *gregsetp, int regno)
#define COPY_REG(_idx_,_regi_) \
if ((regno == -1) || regno == _regi_) \
- regcache_raw_collect (regcache, _regi_, regp + _idx_)
+ regcache->raw_collect (_regi_, regp + _idx_)
for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++)
{
@@ -524,8 +524,7 @@ fill_fpregset (const struct regcache *regcache,
for (regi = IA64_FR0_REGNUM; regi <= IA64_FR127_REGNUM; regi++)
{
if ((regno == -1) || (regno == regi))
- regcache_raw_collect (regcache, regi,
- &((*fpregsetp)[regi - IA64_FR0_REGNUM]));
+ regcache->raw_collect (regi, &((*fpregsetp)[regi - IA64_FR0_REGNUM]));
}
}
@@ -842,7 +841,7 @@ ia64_linux_store_register (const struct regcache *regcache, int regnum)
buf = (PTRACE_TYPE_RET *) alloca (size);
/* Write the register contents into the inferior a chunk at a time. */
- regcache_raw_collect (regcache, regnum, buf);
+ regcache->raw_collect (regnum, buf);
for (i = 0; i < size / sizeof (PTRACE_TYPE_RET); i++)
{
errno = 0;
diff --git a/gdb/linux-nat-trad.c b/gdb/linux-nat-trad.c
index 23abb0f..9776a20 100644
--- a/gdb/linux-nat-trad.c
+++ b/gdb/linux-nat-trad.c
@@ -110,7 +110,7 @@ linux_nat_trad_target::store_register (const struct regcache *regcache,
buf = (gdb_byte *) alloca (size);
/* Write the register contents into the inferior a chunk at a time. */
- regcache_raw_collect (regcache, regnum, buf);
+ regcache->raw_collect (regnum, buf);
for (i = 0; i < size; i += sizeof (PTRACE_TYPE_RET))
{
size_t chunk = std::min (sizeof (PTRACE_TYPE_RET), size - i);
diff --git a/gdb/m32r-linux-nat.c b/gdb/m32r-linux-nat.c
index 3c72357..8740af5 100644
--- a/gdb/m32r-linux-nat.c
+++ b/gdb/m32r-linux-nat.c
@@ -150,11 +150,11 @@ fill_gregset (const struct regcache *regcache,
continue;
if (i != M32R_SP_REGNUM)
- regcache_raw_collect (regcache, i, regp + regmap[i]);
+ regcache->raw_collect (i, regp + regmap[i]);
else if (psw & 0x8000)
- regcache_raw_collect (regcache, i, regp + SPU_REGMAP);
+ regcache->raw_collect (i, regp + SPU_REGMAP);
else
- regcache_raw_collect (regcache, i, regp + SPI_REGMAP);
+ regcache->raw_collect (i, regp + SPI_REGMAP);
}
}
diff --git a/gdb/m32r-linux-tdep.c b/gdb/m32r-linux-tdep.c
index 5618218..be35b69 100644
--- a/gdb/m32r-linux-tdep.c
+++ b/gdb/m32r-linux-tdep.c
@@ -401,7 +401,7 @@ m32r_linux_collect_gregset (const struct regset *regset,
ULONGEST psw;
gdb_byte buf[4];
- regcache_raw_collect (regcache, PSW_REGNUM, buf);
+ regcache->raw_collect (PSW_REGNUM, buf);
psw = extract_unsigned_integer (buf, 4, byte_order);
for (i = 0; i < ARRAY_SIZE (m32r_pt_regs_offset); i++)
@@ -420,12 +420,11 @@ m32r_linux_collect_gregset (const struct regset *regset,
case CBR_REGNUM:
break;
case M32R_SP_REGNUM:
- regcache_raw_collect (regcache, i, regs
- + ((psw & 0x80) ? SPU_OFFSET : SPI_OFFSET));
+ regcache->raw_collect
+ (i, regs + ((psw & 0x80) ? SPU_OFFSET : SPI_OFFSET));
break;
default:
- regcache_raw_collect (regcache, i,
- regs + m32r_pt_regs_offset[i]);
+ regcache->raw_collect (i, regs + m32r_pt_regs_offset[i]);
}
}
}
diff --git a/gdb/m68k-bsd-nat.c b/gdb/m68k-bsd-nat.c
index 8d2f548..2111c27 100644
--- a/gdb/m68k-bsd-nat.c
+++ b/gdb/m68k-bsd-nat.c
@@ -88,7 +88,7 @@ m68kbsd_collect_gregset (const struct regcache *regcache,
for (i = M68K_D0_REGNUM; i <= M68K_PC_REGNUM; i++)
{
if (regnum == -1 || regnum == i)
- regcache_raw_collect (regcache, i, regs + i * 4);
+ regcache->raw_collect (i, regs + i * 4);
}
}
@@ -106,8 +106,7 @@ m68kbsd_collect_fpregset (struct regcache *regcache,
for (i = M68K_FP0_REGNUM; i <= M68K_FPI_REGNUM; i++)
{
if (regnum == -1 || regnum == i)
- regcache_raw_collect (regcache, i,
- regs + m68kbsd_fpreg_offset (gdbarch, i));
+ regcache->raw_collect (i, regs + m68kbsd_fpreg_offset (gdbarch, i));
}
}
diff --git a/gdb/m68k-linux-nat.c b/gdb/m68k-linux-nat.c
index 2dbf857..d66a630 100644
--- a/gdb/m68k-linux-nat.c
+++ b/gdb/m68k-linux-nat.c
@@ -172,7 +172,7 @@ store_register (const struct regcache *regcache, int regno)
regaddr = 4 * regmap[regno];
/* Put the contents of regno into a local buffer. */
- regcache_raw_collect (regcache, regno, buf);
+ regcache->raw_collect (regno, buf);
/* Store the local buffer into the inferior a chunk at the time. */
for (i = 0; i < register_size (gdbarch, regno); i += sizeof (long))
@@ -241,7 +241,7 @@ fill_gregset (const struct regcache *regcache,
for (i = 0; i < NUM_GREGS; i++)
if (regno == -1 || regno == i)
- regcache_raw_collect (regcache, i, regp + regmap[i]);
+ regcache->raw_collect (i, regp + regmap[i]);
}
#ifdef HAVE_PTRACE_GETREGS
@@ -338,15 +338,13 @@ fill_fpregset (const struct regcache *regcache,
for (i = gdbarch_fp0_regnum (gdbarch);
i < gdbarch_fp0_regnum (gdbarch) + 8; i++)
if (regno == -1 || regno == i)
- regcache_raw_collect (regcache, i,
- FPREG_ADDR (fpregsetp,
- i - gdbarch_fp0_regnum (gdbarch)));
+ regcache->raw_collect
+ (i, FPREG_ADDR (fpregsetp, i - gdbarch_fp0_regnum (gdbarch)));
/* Fill in the floating-point control registers. */
for (i = M68K_FPC_REGNUM; i <= M68K_FPI_REGNUM; i++)
if (regno == -1 || regno == i)
- regcache_raw_collect (regcache, i,
- &fpregsetp->fpcntl[i - M68K_FPC_REGNUM]);
+ regcache->raw_collect (i, &fpregsetp->fpcntl[i - M68K_FPC_REGNUM]);
}
#ifdef HAVE_PTRACE_GETREGS
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index 1dd9764..30d5feb 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -194,7 +194,7 @@ mips_fill_gregset (const struct regcache *regcache,
if (regno > 0 && regno < 32)
{
dst = regp + regno + EF_REG0;
- regcache_raw_collect (regcache, regno, dst);
+ regcache->raw_collect (regno, dst);
return;
}
@@ -219,7 +219,7 @@ mips_fill_gregset (const struct regcache *regcache,
if (regaddr != -1)
{
dst = regp + regaddr;
- regcache_raw_collect (regcache, regno, dst);
+ regcache->raw_collect (regno, dst);
}
}
@@ -471,13 +471,13 @@ mips64_fill_fpregset (const struct regcache *regcache,
to = (gdb_byte *) (*fpregsetp + (regi & ~1));
if ((gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) != (regi & 1))
to += 4;
- regcache_raw_collect (regcache, regno, to);
+ regcache->raw_collect (regno, to);
}
else
{
to = (gdb_byte *) (*fpregsetp + regno
- gdbarch_fp0_regnum (gdbarch));
- regcache_raw_collect (regcache, regno, to);
+ regcache->raw_collect (regno, to);
}
}
else if (regno == mips_regnum (gdbarch)->fp_control_status)
diff --git a/gdb/mips-nbsd-tdep.c b/gdb/mips-nbsd-tdep.c
index 5a14b2f..5f4db87 100644
--- a/gdb/mips-nbsd-tdep.c
+++ b/gdb/mips-nbsd-tdep.c
@@ -161,8 +161,7 @@ mipsnbsd_fill_reg (const struct regcache *regcache, char *regs, int regno)
for (i = 0; i <= gdbarch_pc_regnum (gdbarch); i++)
if ((regno == i || regno == -1)
&& ! gdbarch_cannot_store_register (gdbarch, i))
- regcache_raw_collect (regcache, i,
- regs + (i * mips_isa_regsize (gdbarch)));
+ regcache->raw_collect (i, regs + (i * mips_isa_regsize (gdbarch)));
}
void
@@ -200,9 +199,9 @@ mipsnbsd_fill_fpreg (const struct regcache *regcache, char *fpregs, int regno)
i++)
if ((regno == i || regno == -1)
&& ! gdbarch_cannot_store_register (gdbarch, i))
- regcache_raw_collect (regcache, i,
- fpregs + ((i - gdbarch_fp0_regnum (gdbarch))
- * mips_isa_regsize (gdbarch)));
+ regcache->raw_collect
+ (i, (fpregs + ((i - gdbarch_fp0_regnum (gdbarch))
+ * mips_isa_regsize (gdbarch))));
}
#if 0
diff --git a/gdb/mips64-obsd-nat.c b/gdb/mips64-obsd-nat.c
index 9c306dd..4627cbe 100644
--- a/gdb/mips64-obsd-nat.c
+++ b/gdb/mips64-obsd-nat.c
@@ -71,13 +71,13 @@ mips64obsd_collect_gregset (const struct regcache *regcache,
for (i = MIPS_ZERO_REGNUM; i <= MIPS_PC_REGNUM; i++)
{
if (regnum == -1 || regnum == i)
- regcache_raw_collect (regcache, i, regs + i * 8);
+ regcache->raw_collect (i, regs + i * 8);
}
for (i = MIPS_FP0_REGNUM; i <= MIPS_FSR_REGNUM; i++)
{
if (regnum == -1 || regnum == i)
- regcache_raw_collect (regcache, i, regs + (i + 2) * 8);
+ regcache->raw_collect (i, regs + (i + 2) * 8);
}
}
diff --git a/gdb/mn10300-linux-tdep.c b/gdb/mn10300-linux-tdep.c
index a79f1f2..070fb20 100644
--- a/gdb/mn10300-linux-tdep.c
+++ b/gdb/mn10300-linux-tdep.c
@@ -274,96 +274,96 @@ am33_collect_gregset_method (const struct regset *regset,
switch (regnum) {
case E_D0_REGNUM:
- regcache_raw_collect (regcache, E_D0_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D0));
+ regcache->raw_collect (E_D0_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D0));
break;
case E_D1_REGNUM:
- regcache_raw_collect (regcache, E_D1_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D1));
+ regcache->raw_collect (E_D1_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D1));
break;
case E_D2_REGNUM:
- regcache_raw_collect (regcache, E_D2_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D2));
+ regcache->raw_collect (E_D2_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D2));
break;
case E_D3_REGNUM:
- regcache_raw_collect (regcache, E_D3_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D3));
+ regcache->raw_collect (E_D3_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D3));
break;
case E_A0_REGNUM:
- regcache_raw_collect (regcache, E_A0_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A0));
+ regcache->raw_collect (E_A0_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A0));
break;
case E_A1_REGNUM:
- regcache_raw_collect (regcache, E_A1_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A1));
+ regcache->raw_collect (E_A1_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A1));
break;
case E_A2_REGNUM:
- regcache_raw_collect (regcache, E_A2_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A2));
+ regcache->raw_collect (E_A2_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A2));
break;
case E_A3_REGNUM:
- regcache_raw_collect (regcache, E_A3_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A3));
+ regcache->raw_collect (E_A3_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A3));
break;
case E_SP_REGNUM:
- regcache_raw_collect (regcache, E_SP_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_SP));
+ regcache->raw_collect (E_SP_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_SP));
break;
case E_PC_REGNUM:
- regcache_raw_collect (regcache, E_PC_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_PC));
+ regcache->raw_collect (E_PC_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_PC));
break;
case E_MDR_REGNUM:
- regcache_raw_collect (regcache, E_MDR_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDR));
+ regcache->raw_collect (E_MDR_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDR));
break;
case E_PSW_REGNUM:
- regcache_raw_collect (regcache, E_PSW_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_EPSW));
+ regcache->raw_collect (E_PSW_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_EPSW));
break;
case E_LIR_REGNUM:
- regcache_raw_collect (regcache, E_LIR_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LIR));
+ regcache->raw_collect (E_LIR_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LIR));
break;
case E_LAR_REGNUM:
- regcache_raw_collect (regcache, E_LAR_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LAR));
+ regcache->raw_collect (E_LAR_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LAR));
break;
case E_MDRQ_REGNUM:
- regcache_raw_collect (regcache, E_MDRQ_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDRQ));
+ regcache->raw_collect (E_MDRQ_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDRQ));
break;
case E_E0_REGNUM:
- regcache_raw_collect (regcache, E_E0_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E0));
+ regcache->raw_collect (E_E0_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E0));
break;
case E_E1_REGNUM:
- regcache_raw_collect (regcache, E_E1_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E1));
+ regcache->raw_collect (E_E1_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E1));
break;
case E_E2_REGNUM:
- regcache_raw_collect (regcache, E_E2_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E2));
+ regcache->raw_collect (E_E2_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E2));
break;
case E_E3_REGNUM:
- regcache_raw_collect (regcache, E_E3_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E3));
+ regcache->raw_collect (E_E3_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E3));
break;
case E_E4_REGNUM:
- regcache_raw_collect (regcache, E_E4_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E4));
+ regcache->raw_collect (E_E4_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E4));
break;
case E_E5_REGNUM:
- regcache_raw_collect (regcache, E_E5_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E5));
+ regcache->raw_collect (E_E5_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E5));
break;
case E_E6_REGNUM:
- regcache_raw_collect (regcache, E_E6_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E6));
+ regcache->raw_collect (E_E6_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E6));
break;
case E_E7_REGNUM:
- regcache_raw_collect (regcache, E_E7_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E7));
+ regcache->raw_collect (E_E7_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E7));
break;
/* ssp, msp, and usp are inaccessible. */
@@ -377,16 +377,16 @@ am33_collect_gregset_method (const struct regset *regset,
/* The gregset struct has noplace to put this: do nothing. */
break;
case E_MCRH_REGNUM:
- regcache_raw_collect (regcache, E_MCRH_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRH));
+ regcache->raw_collect (E_MCRH_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRH));
break;
case E_MCRL_REGNUM:
- regcache_raw_collect (regcache, E_MCRL_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRL));
+ regcache->raw_collect (E_MCRL_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRL));
break;
case E_MCVF_REGNUM:
- regcache_raw_collect (regcache, E_MCVF_REGNUM,
- (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCVF));
+ regcache->raw_collect (E_MCVF_REGNUM,
+ (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCVF));
break;
case E_FPCR_REGNUM:
/* FPCR is numbered among the GP regs, but handled as an FP reg.
@@ -429,12 +429,10 @@ am33_collect_fpregset_method (const struct regset *regset,
E_FPCR_REGNUM, fpregs, len);
}
else if (regnum == E_FPCR_REGNUM)
- regcache_raw_collect (regcache, E_FPCR_REGNUM,
- &fpregset->fpcr);
+ regcache->raw_collect (E_FPCR_REGNUM, &fpregset->fpcr);
else if (E_FS0_REGNUM <= regnum
&& regnum < E_FS0_REGNUM + MN10300_ELF_NFPREG)
- regcache_raw_collect (regcache, regnum,
- &fpregset->fpregs[regnum - E_FS0_REGNUM]);
+ regcache->raw_collect (regnum, &fpregset->fpregs[regnum - E_FS0_REGNUM]);
return;
}
diff --git a/gdb/nios2-linux-tdep.c b/gdb/nios2-linux-tdep.c
index 7ee6f14..e7f4ecf 100644
--- a/gdb/nios2-linux-tdep.c
+++ b/gdb/nios2-linux-tdep.c
@@ -87,8 +87,7 @@ nios2_collect_gregset (const struct regset *regset,
if (regnum == -1 || regnum == regno)
{
if (reg_offsets[regno] != -1)
- regcache_raw_collect (regcache, regno,
- gregs + 4 * reg_offsets[regno]);
+ regcache->raw_collect (regno, gregs + 4 * reg_offsets[regno]);
}
}
diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c
index fcd3001..63cae8a 100644
--- a/gdb/nto-procfs.c
+++ b/gdb/nto-procfs.c
@@ -1434,7 +1434,7 @@ nto_procfs_target::store_registers (struct regcache *regcache, int regno)
if (len < 1)
return;
- regcache_raw_collect (regcache, regno, (char *) &reg + off);
+ regcache->raw_collect (regno, (char *) &reg + off);
err = devctl (ctl_fd, dev_set, &reg, regsize, 0);
if (err != EOK)
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 7f209f4..62f3daf 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -895,26 +895,23 @@ store_spe_register (const struct regcache *regcache, int tid, int regno)
int i;
for (i = 0; i < ppc_num_gprs; i++)
- regcache_raw_collect (regcache,
- tdep->ppc_ev0_upper_regnum + i,
- &evrregs.evr[i]);
+ regcache->raw_collect (tdep->ppc_ev0_upper_regnum + i,
+ &evrregs.evr[i]);
}
else if (tdep->ppc_ev0_upper_regnum <= regno
&& regno < tdep->ppc_ev0_upper_regnum + ppc_num_gprs)
- regcache_raw_collect (regcache, regno,
- &evrregs.evr[regno - tdep->ppc_ev0_upper_regnum]);
+ regcache->raw_collect (regno,
+ &evrregs.evr[regno - tdep->ppc_ev0_upper_regnum]);
if (regno == -1
|| regno == tdep->ppc_acc_regnum)
- regcache_raw_collect (regcache,
- tdep->ppc_acc_regnum,
- &evrregs.acc);
+ regcache->raw_collect (tdep->ppc_acc_regnum,
+ &evrregs.acc);
if (regno == -1
|| regno == tdep->ppc_spefscr_regnum)
- regcache_raw_collect (regcache,
- tdep->ppc_spefscr_regnum,
- &evrregs.spefscr);
+ regcache->raw_collect (tdep->ppc_spefscr_regnum,
+ &evrregs.spefscr);
/* Write back the modified register set. */
set_spe_registers (tid, &evrregs);
@@ -958,13 +955,13 @@ store_register (const struct regcache *regcache, int tid, int regno)
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE)
{
/* Little-endian values always sit at the left end of the buffer. */
- regcache_raw_collect (regcache, regno, buf);
+ regcache->raw_collect (regno, buf);
}
else if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
{
/* Big-endian values sit at the right end of the buffer. */
size_t padding = (bytes_to_transfer - register_size (gdbarch, regno));
- regcache_raw_collect (regcache, regno, buf + padding);
+ regcache->raw_collect (regno, buf + padding);
}
for (i = 0; i < bytes_to_transfer; i += sizeof (long))
diff --git a/gdb/ppc-ravenscar-thread.c b/gdb/ppc-ravenscar-thread.c
index ae5ad24..7b83e45 100644
--- a/gdb/ppc-ravenscar-thread.c
+++ b/gdb/ppc-ravenscar-thread.c
@@ -197,7 +197,7 @@ ppc_ravenscar_generic_store_registers
else
return;
- regcache_raw_collect (regcache, regnum, buf);
+ regcache->raw_collect (regnum, buf);
write_memory (register_address,
buf,
buf_size);
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 8d47fda..a914b54 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -948,15 +948,6 @@ detached_regcache::raw_supply_zeroed (int regnum)
m_register_status[regnum] = REG_VALID;
}
-/* Collect register REGNUM from REGCACHE and store its contents in BUF. */
-
-void
-regcache_raw_collect (const struct regcache *regcache, int regnum, void *buf)
-{
- gdb_assert (regcache != NULL && buf != NULL);
- regcache->raw_collect (regnum, buf);
-}
-
void
regcache::raw_collect (int regnum, void *buf) const
{
diff --git a/gdb/regcache.h b/gdb/regcache.h
index b60f031..3edddf4 100644
--- a/gdb/regcache.h
+++ b/gdb/regcache.h
@@ -67,13 +67,6 @@ extern void regcache_cooked_write_unsigned (struct regcache *regcache,
/* For regcache_read_pc see common/common-regcache.h. */
extern void regcache_write_pc (struct regcache *regcache, CORE_ADDR pc);
-/* Transfer a raw register [0..NUM_REGS) between the regcache and the
- target. These functions are called by the target in response to a
- target_fetch_registers() or target_store_registers(). */
-
-extern void regcache_raw_collect (const struct regcache *regcache,
- int regnum, void *buf);
-
/* Mapping between register numbers and offsets in a buffer, for use
in the '*regset' functions below. In an array of
'regcache_map_entry' each element is interpreted like follows:
@@ -299,6 +292,7 @@ public:
void raw_update (int regnum) override;
+ /* Collect register REGNUM from REGCACHE and store its contents in BUF. */
void raw_collect (int regnum, void *buf) const;
void raw_collect_integer (int regnum, gdb_byte *addr, int addr_len,
diff --git a/gdb/remote.c b/gdb/remote.c
index 3f0b678..3013fbe 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -8367,7 +8367,7 @@ remote_target::store_register_using_P (const struct regcache *regcache,
xsnprintf (buf, get_remote_packet_size (), "P%s=", phex_nz (reg->pnum, 0));
p = buf + strlen (buf);
- regcache_raw_collect (regcache, reg->regnum, regp);
+ regcache->raw_collect (reg->regnum, regp);
bin2hex (regp, p, register_size (gdbarch, reg->regnum));
putpkt (rs->buf);
getpkt (&rs->buf, &rs->buf_size, 0);
@@ -8409,7 +8409,7 @@ remote_target::store_registers_using_G (const struct regcache *regcache)
struct packet_reg *r = &rsa->regs[i];
if (r->in_g_packet)
- regcache_raw_collect (regcache, r->regnum, regs + r->offset);
+ regcache->raw_collect (r->regnum, regs + r->offset);
}
}
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 7e39d57..31677c2 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -253,7 +253,7 @@ store_register (struct regcache *regcache, int regno)
pid_t pid = ptid_get_pid (regcache->ptid ());
/* Fetch the register's value from the register cache. */
- regcache_raw_collect (regcache, regno, addr);
+ regcache->raw_collect (regno, addr);
/* -1 can be a successful return value, so infer errors from errno. */
errno = 0;
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index e165d1b..a0f290f 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -418,7 +418,7 @@ ppc_collect_reg (const struct regcache *regcache, int regnum,
regsize - gdb_regsize);
}
}
- regcache_raw_collect (regcache, regnum, regs + offset);
+ regcache->raw_collect (regnum, regs + offset);
}
}
diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c
index 303cbee..60c549a 100644
--- a/gdb/s390-linux-nat.c
+++ b/gdb/s390-linux-nat.c
@@ -210,14 +210,14 @@ fill_gregset (const struct regcache *regcache, gregset_t *regp, int regno)
if (regno == -1 || regno == S390_PSWM_REGNUM)
{
pswm &= 0x80000000;
- regcache_raw_collect (regcache, S390_PSWM_REGNUM, buf);
+ regcache->raw_collect (S390_PSWM_REGNUM, buf);
pswm |= (extract_unsigned_integer (buf, 4, byte_order)
& 0xfff7ffff) << 32;
}
if (regno == -1 || regno == S390_PSWA_REGNUM)
{
- regcache_raw_collect (regcache, S390_PSWA_REGNUM, buf);
+ regcache->raw_collect (S390_PSWA_REGNUM, buf);
pswa = extract_unsigned_integer (buf, 4, byte_order);
pswm ^= (pswm ^ pswa) & 0x80000000;
pswa &= 0x7fffffff;
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 5e9fd09..d1a1434 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -2201,7 +2201,7 @@ sh_corefile_collect_regset (const struct regset *regset,
{
if ((regnum == -1 || regnum == regmap[i].regnum)
&& regmap[i].offset + 4 <= len)
- regcache_raw_collect (regcache, regmap[i].regnum,
+ regcache->raw_collect (regmap[i].regnum,
(char *)regs + regmap[i].offset);
}
}
diff --git a/gdb/sparc-obsd-tdep.c b/gdb/sparc-obsd-tdep.c
index c821562..0f6caa6 100644
--- a/gdb/sparc-obsd-tdep.c
+++ b/gdb/sparc-obsd-tdep.c
@@ -208,7 +208,7 @@ sparc32obsd_collect_uthread(const struct regcache *regcache,
{
CORE_ADDR fp_addr = addr + SPARC32OBSD_UTHREAD_FP_OFFSET;
- regcache_raw_collect (regcache, SPARC_SP_REGNUM, buf);
+ regcache->raw_collect (SPARC_SP_REGNUM, buf);
write_memory (fp_addr,buf, 4);
}
@@ -216,7 +216,7 @@ sparc32obsd_collect_uthread(const struct regcache *regcache,
{
CORE_ADDR i7, i7_addr = addr + SPARC32OBSD_UTHREAD_PC_OFFSET;
- regcache_raw_collect (regcache, SPARC32_PC_REGNUM, buf);
+ regcache->raw_collect (SPARC32_PC_REGNUM, buf);
i7 = extract_unsigned_integer (buf, 4, byte_order) - 8;
write_memory_unsigned_integer (i7_addr, 4, byte_order, i7);
@@ -224,7 +224,7 @@ sparc32obsd_collect_uthread(const struct regcache *regcache,
return;
}
- regcache_raw_collect (regcache, SPARC_SP_REGNUM, buf);
+ regcache->raw_collect (SPARC_SP_REGNUM, buf);
sp = extract_unsigned_integer (buf, 4, byte_order);
sparc_collect_rwindow (regcache, sp, regnum);
}
diff --git a/gdb/sparc-ravenscar-thread.c b/gdb/sparc-ravenscar-thread.c
index 129b4b6..0b4d68a 100644
--- a/gdb/sparc-ravenscar-thread.c
+++ b/gdb/sparc-ravenscar-thread.c
@@ -172,7 +172,7 @@ sparc_ravenscar_store_registers (struct regcache *regcache, int regnum)
else
return;
- regcache_raw_collect (regcache, regnum, buf);
+ regcache->raw_collect (regnum, buf);
write_memory (register_address,
buf,
buf_size);
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index ad0d2b4..65c1f00 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -2031,7 +2031,7 @@ sparc_collect_rwindow (const struct regcache *regcache,
{
if (regnum == -1 || regnum == SPARC_SP_REGNUM || regnum == i)
{
- regcache_raw_collect (regcache, i, buf);
+ regcache->raw_collect (i, buf);
/* Handle StackGhost. */
if (i == SPARC_I7_REGNUM)
@@ -2061,7 +2061,7 @@ sparc_collect_rwindow (const struct regcache *regcache,
{
if (regnum == -1 || regnum == SPARC_SP_REGNUM || regnum == i)
{
- regcache_raw_collect (regcache, i, buf);
+ regcache->raw_collect (i, buf);
/* Handle StackGhost. */
if (i == SPARC_I7_REGNUM)
@@ -2153,20 +2153,16 @@ sparc32_collect_gregset (const struct sparc_gregmap *gregmap,
int i;
if (regnum == SPARC32_PSR_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC32_PSR_REGNUM,
- regs + gregmap->r_psr_offset);
+ regcache->raw_collect (SPARC32_PSR_REGNUM, regs + gregmap->r_psr_offset);
if (regnum == SPARC32_PC_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC32_PC_REGNUM,
- regs + gregmap->r_pc_offset);
+ regcache->raw_collect (SPARC32_PC_REGNUM, regs + gregmap->r_pc_offset);
if (regnum == SPARC32_NPC_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC32_NPC_REGNUM,
- regs + gregmap->r_npc_offset);
+ regcache->raw_collect (SPARC32_NPC_REGNUM, regs + gregmap->r_npc_offset);
if (regnum == SPARC32_Y_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC32_Y_REGNUM,
- regs + gregmap->r_y_offset);
+ regcache->raw_collect (SPARC32_Y_REGNUM, regs + gregmap->r_y_offset);
if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_O7_REGNUM) || regnum == -1)
{
@@ -2176,7 +2172,7 @@ sparc32_collect_gregset (const struct sparc_gregmap *gregmap,
for (i = SPARC_G1_REGNUM; i <= SPARC_O7_REGNUM; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_collect (regcache, i, regs + offset);
+ regcache->raw_collect (i, regs + offset);
offset += 4;
}
}
@@ -2192,7 +2188,7 @@ sparc32_collect_gregset (const struct sparc_gregmap *gregmap,
for (i = SPARC_L0_REGNUM; i <= SPARC_I7_REGNUM; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_collect (regcache, i, regs + offset);
+ regcache->raw_collect (i, regs + offset);
offset += 4;
}
}
@@ -2229,13 +2225,13 @@ sparc32_collect_fpregset (const struct sparc_fpregmap *fpregmap,
for (i = 0; i < 32; i++)
{
if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1)
- regcache_raw_collect (regcache, SPARC_F0_REGNUM + i,
- regs + fpregmap->r_f0_offset + (i * 4));
+ regcache->raw_collect (SPARC_F0_REGNUM + i,
+ regs + fpregmap->r_f0_offset + (i * 4));
}
if (regnum == SPARC32_FSR_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC32_FSR_REGNUM,
- regs + fpregmap->r_fsr_offset);
+ regcache->raw_collect (SPARC32_FSR_REGNUM,
+ regs + fpregmap->r_fsr_offset);
}
diff --git a/gdb/sparc64-obsd-tdep.c b/gdb/sparc64-obsd-tdep.c
index 6af5f08..48b45c4 100644
--- a/gdb/sparc64-obsd-tdep.c
+++ b/gdb/sparc64-obsd-tdep.c
@@ -379,7 +379,7 @@ sparc64obsd_collect_uthread(const struct regcache *regcache,
{
CORE_ADDR fp_addr = addr + SPARC64OBSD_UTHREAD_FP_OFFSET;
- regcache_raw_collect (regcache, SPARC_SP_REGNUM, buf);
+ regcache->raw_collect (SPARC_SP_REGNUM, buf);
write_memory (fp_addr,buf, 8);
}
@@ -387,7 +387,7 @@ sparc64obsd_collect_uthread(const struct regcache *regcache,
{
CORE_ADDR i7, i7_addr = addr + SPARC64OBSD_UTHREAD_PC_OFFSET;
- regcache_raw_collect (regcache, SPARC64_PC_REGNUM, buf);
+ regcache->raw_collect (SPARC64_PC_REGNUM, buf);
i7 = extract_unsigned_integer (buf, 8, byte_order) - 8;
write_memory_unsigned_integer (i7_addr, 8, byte_order, i7);
@@ -395,7 +395,7 @@ sparc64obsd_collect_uthread(const struct regcache *regcache,
return;
}
- regcache_raw_collect (regcache, SPARC_SP_REGNUM, buf);
+ regcache->raw_collect (SPARC_SP_REGNUM, buf);
sp = extract_unsigned_integer (buf, 8, byte_order);
sparc_collect_rwindow (regcache, sp, regnum);
}
diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c
index 083ad72..86b5fcf 100644
--- a/gdb/sparc64-tdep.c
+++ b/gdb/sparc64-tdep.c
@@ -2010,7 +2010,7 @@ sparc64_collect_gregset (const struct sparc_gregmap *gregmap,
gdb_byte buf[8];
tstate = extract_unsigned_integer (regs + offset, 8, byte_order);
- regcache_raw_collect (regcache, SPARC32_PSR_REGNUM, buf);
+ regcache->raw_collect (SPARC32_PSR_REGNUM, buf);
psr = extract_unsigned_integer (buf, 4, byte_order);
tstate |= (psr & PSR_ICC) << 12;
if ((psr & (PSR_VERS | PSR_IMPL)) == PSR_V8PLUS)
@@ -2020,46 +2020,46 @@ sparc64_collect_gregset (const struct sparc_gregmap *gregmap,
}
if (regnum == SPARC32_PC_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC32_PC_REGNUM,
- regs + gregmap->r_pc_offset + 4);
+ regcache->raw_collect (SPARC32_PC_REGNUM,
+ regs + gregmap->r_pc_offset + 4);
if (regnum == SPARC32_NPC_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC32_NPC_REGNUM,
- regs + gregmap->r_npc_offset + 4);
+ regcache->raw_collect (SPARC32_NPC_REGNUM,
+ regs + gregmap->r_npc_offset + 4);
if (regnum == SPARC32_Y_REGNUM || regnum == -1)
{
int offset = gregmap->r_y_offset + 8 - gregmap->r_y_size;
- regcache_raw_collect (regcache, SPARC32_Y_REGNUM, regs + offset);
+ regcache->raw_collect (SPARC32_Y_REGNUM, regs + offset);
}
}
else
{
if (regnum == SPARC64_STATE_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC64_STATE_REGNUM,
- regs + gregmap->r_tstate_offset);
+ regcache->raw_collect (SPARC64_STATE_REGNUM,
+ regs + gregmap->r_tstate_offset);
if (regnum == SPARC64_PC_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC64_PC_REGNUM,
- regs + gregmap->r_pc_offset);
+ regcache->raw_collect (SPARC64_PC_REGNUM,
+ regs + gregmap->r_pc_offset);
if (regnum == SPARC64_NPC_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC64_NPC_REGNUM,
- regs + gregmap->r_npc_offset);
+ regcache->raw_collect (SPARC64_NPC_REGNUM,
+ regs + gregmap->r_npc_offset);
if (regnum == SPARC64_Y_REGNUM || regnum == -1)
{
gdb_byte buf[8];
- regcache_raw_collect (regcache, SPARC64_Y_REGNUM, buf);
+ regcache->raw_collect (SPARC64_Y_REGNUM, buf);
memcpy (regs + gregmap->r_y_offset,
buf + 8 - gregmap->r_y_size, gregmap->r_y_size);
}
if ((regnum == SPARC64_FPRS_REGNUM || regnum == -1)
&& gregmap->r_fprs_offset != -1)
- regcache_raw_collect (regcache, SPARC64_FPRS_REGNUM,
- regs + gregmap->r_fprs_offset);
+ regcache->raw_collect (SPARC64_FPRS_REGNUM,
+ regs + gregmap->r_fprs_offset);
}
@@ -2074,7 +2074,7 @@ sparc64_collect_gregset (const struct sparc_gregmap *gregmap,
for (i = SPARC_G1_REGNUM; i <= SPARC_O7_REGNUM; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_collect (regcache, i, regs + offset);
+ regcache->raw_collect (i, regs + offset);
offset += 8;
}
}
@@ -2093,7 +2093,7 @@ sparc64_collect_gregset (const struct sparc_gregmap *gregmap,
for (i = SPARC_L0_REGNUM; i <= SPARC_I7_REGNUM; i++)
{
if (regnum == i || regnum == -1)
- regcache_raw_collect (regcache, i, regs + offset);
+ regcache->raw_collect (i, regs + offset);
offset += 8;
}
}
@@ -2113,7 +2113,7 @@ sparc64_supply_fpregset (const struct sparc_fpregmap *fpregmap,
{
if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1)
regcache->raw_supply (SPARC_F0_REGNUM + i,
- regs + fpregmap->r_f0_offset + (i * 4));
+ regs + fpregmap->r_f0_offset + (i * 4));
}
if (sparc32)
@@ -2150,29 +2150,29 @@ sparc64_collect_fpregset (const struct sparc_fpregmap *fpregmap,
for (i = 0; i < 32; i++)
{
if (regnum == (SPARC_F0_REGNUM + i) || regnum == -1)
- regcache_raw_collect (regcache, SPARC_F0_REGNUM + i,
- regs + fpregmap->r_f0_offset + (i * 4));
+ regcache->raw_collect (SPARC_F0_REGNUM + i,
+ regs + fpregmap->r_f0_offset + (i * 4));
}
if (sparc32)
{
if (regnum == SPARC32_FSR_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC32_FSR_REGNUM,
- regs + fpregmap->r_fsr_offset);
+ regcache->raw_collect (SPARC32_FSR_REGNUM,
+ regs + fpregmap->r_fsr_offset);
}
else
{
for (i = 0; i < 16; i++)
{
if (regnum == (SPARC64_F32_REGNUM + i) || regnum == -1)
- regcache_raw_collect (regcache, SPARC64_F32_REGNUM + i,
- (regs + fpregmap->r_f0_offset
- + (32 * 4) + (i * 8)));
+ regcache->raw_collect (SPARC64_F32_REGNUM + i,
+ (regs + fpregmap->r_f0_offset
+ + (32 * 4) + (i * 8)));
}
if (regnum == SPARC64_FSR_REGNUM || regnum == -1)
- regcache_raw_collect (regcache, SPARC64_FSR_REGNUM,
- regs + fpregmap->r_fsr_offset);
+ regcache->raw_collect (SPARC64_FSR_REGNUM,
+ regs + fpregmap->r_fsr_offset);
}
}
diff --git a/gdb/spu-linux-nat.c b/gdb/spu-linux-nat.c
index 6a5be8b..96cda72 100644
--- a/gdb/spu-linux-nat.c
+++ b/gdb/spu-linux-nat.c
@@ -577,7 +577,7 @@ spu_linux_nat_target::store_registers (struct regcache *regcache, int regno)
if (regno == -1 || regno == SPU_PC_REGNUM)
{
gdb_byte buf[4];
- regcache_raw_collect (regcache, SPU_PC_REGNUM, buf);
+ regcache->raw_collect (SPU_PC_REGNUM, buf);
store_ppc_memory (addr, buf, 4);
}
@@ -590,7 +590,7 @@ spu_linux_nat_target::store_registers (struct regcache *regcache, int regno)
ULONGEST len;
for (i = 0; i < SPU_NUM_GPRS; i++)
- regcache_raw_collect (regcache, i, buf + i*16);
+ regcache->raw_collect (i, buf + i*16);
xsnprintf (annex, sizeof annex, "%d/regs", fd);
spu_proc_xfer_spu (annex, NULL, buf, 0, sizeof buf, &len);
diff --git a/gdb/spu-multiarch.c b/gdb/spu-multiarch.c
index dc99f60..39a657f 100644
--- a/gdb/spu-multiarch.c
+++ b/gdb/spu-multiarch.c
@@ -265,7 +265,7 @@ spu_multiarch_target::store_registers (struct regcache *regcache, int regno)
if (regno == -1 || regno == SPU_PC_REGNUM)
{
gdb_byte buf[4];
- regcache_raw_collect (regcache, SPU_PC_REGNUM, buf);
+ regcache->raw_collect (SPU_PC_REGNUM, buf);
target_write (ops_beneath, TARGET_OBJECT_MEMORY, NULL,
buf, spufs_addr, sizeof buf);
@@ -279,7 +279,7 @@ spu_multiarch_target::store_registers (struct regcache *regcache, int regno)
int i;
for (i = 0; i < SPU_NUM_GPRS; i++)
- regcache_raw_collect (regcache, i, buf + i*16);
+ regcache->raw_collect (i, buf + i*16);
xsnprintf (annex, sizeof annex, "%d/regs", spufs_fd);
target_write (ops_beneath, TARGET_OBJECT_SPU, annex,
diff --git a/gdb/tilegx-linux-nat.c b/gdb/tilegx-linux-nat.c
index 1ff6485..6fa7fb6 100644
--- a/gdb/tilegx-linux-nat.c
+++ b/gdb/tilegx-linux-nat.c
@@ -103,7 +103,7 @@ fill_gregset (const struct regcache* regcache,
for (i = 0; i < sizeof (regmap) / sizeof (regmap[0]); i++)
if (regmap[i] >= 0)
- regcache_raw_collect (regcache, i, regp + regmap[i]);
+ regcache->raw_collect (i, regp + regmap[i]);
}
/* Transfering floating-point registers between GDB, inferiors and cores. */
diff --git a/gdb/vax-bsd-nat.c b/gdb/vax-bsd-nat.c
index 527d718..10cd12e 100644
--- a/gdb/vax-bsd-nat.c
+++ b/gdb/vax-bsd-nat.c
@@ -62,7 +62,7 @@ vaxbsd_collect_gregset (const struct regcache *regcache,
for (i = 0; i <= VAX_NUM_REGS; i++)
{
if (regnum == -1 || regnum == i)
- regcache_raw_collect (regcache, i, regs + i * 4);
+ regcache->raw_collect (i, regs + i * 4);
}
}
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 2d6ece0..0f24257 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -596,8 +596,7 @@ do_windows_store_inferior_registers (const struct regcache *regcache,
windows_thread_info *th, int r)
{
if (r >= 0)
- regcache_raw_collect (regcache, r,
- ((char *) &th->context) + mappings[r]);
+ regcache->raw_collect (r, ((char *) &th->context) + mappings[r]);
else
{
for (r = 0; r < gdbarch_num_regs (regcache->arch ()); r++)
diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c
index 8737a9a..5ac29ee 100644
--- a/gdb/xtensa-linux-nat.c
+++ b/gdb/xtensa-linux-nat.c
@@ -64,63 +64,54 @@ fill_gregset (const struct regcache *regcache,
struct gdbarch *gdbarch = regcache->arch ();
if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1)
- regcache_raw_collect (regcache, gdbarch_pc_regnum (gdbarch), &regs->pc);
+ regcache->raw_collect (gdbarch_pc_regnum (gdbarch), &regs->pc);
if (regnum == gdbarch_ps_regnum (gdbarch) || regnum == -1)
- regcache_raw_collect (regcache, gdbarch_ps_regnum (gdbarch), &regs->ps);
+ regcache->raw_collect (gdbarch_ps_regnum (gdbarch), &regs->ps);
if (regnum == gdbarch_tdep (gdbarch)->wb_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->wb_regnum,
- &regs->windowbase);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->wb_regnum,
+ &regs->windowbase);
if (regnum == gdbarch_tdep (gdbarch)->ws_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->ws_regnum,
- &regs->windowstart);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->ws_regnum,
+ &regs->windowstart);
if (regnum == gdbarch_tdep (gdbarch)->lbeg_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->lbeg_regnum,
- &regs->lbeg);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->lbeg_regnum,
+ &regs->lbeg);
if (regnum == gdbarch_tdep (gdbarch)->lend_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->lend_regnum,
- &regs->lend);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->lend_regnum,
+ &regs->lend);
if (regnum == gdbarch_tdep (gdbarch)->lcount_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->lcount_regnum,
- &regs->lcount);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->lcount_regnum,
+ &regs->lcount);
if (regnum == gdbarch_tdep (gdbarch)->sar_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->sar_regnum,
- &regs->sar);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->sar_regnum,
+ &regs->sar);
if (regnum == gdbarch_tdep (gdbarch)->threadptr_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->threadptr_regnum,
- &regs->threadptr);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->threadptr_regnum,
+ &regs->threadptr);
if (regnum >=gdbarch_tdep (gdbarch)->ar_base
&& regnum < gdbarch_tdep (gdbarch)->ar_base
+ gdbarch_tdep (gdbarch)->num_aregs)
- regcache_raw_collect (regcache,regnum,
- &regs->ar[regnum - gdbarch_tdep (gdbarch)->ar_base]);
+ regcache->raw_collect (regnum,
+ &regs->ar[regnum - gdbarch_tdep (gdbarch)->ar_base]);
else if (regnum == -1)
{
for (i = 0; i < gdbarch_tdep (gdbarch)->num_aregs; ++i)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->ar_base + i,
- &regs->ar[i]);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->ar_base + i,
+ &regs->ar[i]);
}
if (regnum >= gdbarch_tdep (gdbarch)->a0_base
&& regnum < gdbarch_tdep (gdbarch)->a0_base + C0_NREGS)
- regcache_raw_collect (regcache, regnum,
- &regs->ar[(4 * regs->windowbase + regnum
- - gdbarch_tdep (gdbarch)->a0_base)
+ regcache->raw_collect (regnum,
+ &regs->ar[(4 * regs->windowbase + regnum
+ - gdbarch_tdep (gdbarch)->a0_base)
% gdbarch_tdep (gdbarch)->num_aregs]);
else if (regnum == -1)
{
for (i = 0; i < C0_NREGS; ++i)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->a0_base + i,
- &regs->ar[(4 * regs->windowbase + i)
- % gdbarch_tdep (gdbarch)->num_aregs]);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->a0_base + i,
+ (&regs->ar[(4 * regs->windowbase + i)
+ % gdbarch_tdep (gdbarch)->num_aregs]));
}
}
@@ -282,8 +273,7 @@ store_xtregs (struct regcache *regcache, int regnum)
for (ptr = xtensa_regmap_table; ptr->name; ptr++)
if (regnum == ptr->gdb_regnum || regnum == -1)
- regcache_raw_collect (regcache, ptr->gdb_regnum,
- xtregs + ptr->ptrace_offset);
+ regcache->raw_collect (ptr->gdb_regnum, xtregs + ptr->ptrace_offset);
if (ptrace (PTRACE_SETXTREGS, tid, 0, (long)&xtregs) < 0)
perror_with_name (_("Couldn't write extended registers"));