From 34a79281e4bd5d1a7f1d22a5a5be1ac2db56a3fc Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 30 May 2018 14:54:46 -0400 Subject: Remove regcache_raw_collect Remove regcache_raw_collect, update callers to use regcache::raw_collect. gdb/ChangeLog: * regcache.h (regcache_raw_collect): Remove, update callers to use regcache::raw_collect. * regcache.c (regcache_raw_collect): Remove. --- gdb/arm-nbsd-nat.c | 61 ++++++++++++++++++++++-------------------------------- 1 file changed, 25 insertions(+), 36 deletions(-) (limited to 'gdb/arm-nbsd-nat.c') 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); -- cgit v1.1