diff options
-rw-r--r-- | gdb/ChangeLog | 33 | ||||
-rw-r--r-- | gdb/aix-thread.c | 45 | ||||
-rw-r--r-- | gdb/alpha-tdep.c | 11 | ||||
-rw-r--r-- | gdb/arm-linux-nat.c | 34 | ||||
-rw-r--r-- | gdb/armnbsd-nat.c | 57 | ||||
-rw-r--r-- | gdb/go32-nat.c | 3 | ||||
-rw-r--r-- | gdb/hppa-linux-nat.c | 4 | ||||
-rw-r--r-- | gdb/i386-linux-nat.c | 7 | ||||
-rw-r--r-- | gdb/i386-nto-tdep.c | 2 | ||||
-rw-r--r-- | gdb/infptrace.c | 2 | ||||
-rw-r--r-- | gdb/m68k-tdep.c | 18 | ||||
-rw-r--r-- | gdb/m68klinux-nat.c | 10 | ||||
-rw-r--r-- | gdb/mips-linux-tdep.c | 8 | ||||
-rw-r--r-- | gdb/mipsnbsd-tdep.c | 6 | ||||
-rw-r--r-- | gdb/nto-procfs.c | 2 | ||||
-rw-r--r-- | gdb/ppc-linux-nat.c | 32 | ||||
-rw-r--r-- | gdb/ppcnbsd-tdep.c | 25 | ||||
-rw-r--r-- | gdb/regcache.c | 6 | ||||
-rw-r--r-- | gdb/regcache.h | 1 | ||||
-rw-r--r-- | gdb/remote.c | 4 | ||||
-rw-r--r-- | gdb/rs6000-nat.c | 2 | ||||
-rw-r--r-- | gdb/shnbsd-tdep.c | 13 | ||||
-rw-r--r-- | gdb/sol-thread.c | 2 | ||||
-rw-r--r-- | gdb/win32-nat.c | 3 | ||||
-rw-r--r-- | gdb/windows-nat.c | 3 |
25 files changed, 204 insertions, 129 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1cf613f..cbe7bdc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,36 @@ +2004-07-23 Andrew Cagney <cagney@gnu.org> + + Use regcache_raw_collect instead of regcache_collect. + * regcache.h (regcache_collect): Delete declaration. + * regcache.c (regcache_colect): Delete function. + * win32-nat.c (do_child_store_inferior_registers): Update. + * sol-thread.c (sol_thread_store_registers): Update. + * shnbsd-tdep.c (shnbsd_fill_reg): Update. + * rs6000-nat.c (store_register): Update. + * remote.c (store_register_using_P, remote_store_registers): Update. + * ppcnbsd-tdep.c (ppcnbsd_fill_reg): Update. + * ppc-linux-nat.c (store_altivec_register, store_spe_register) + (fill_vrregset, store_spe_registers, fill_gregset) + (fill_gregset): Update. + * nto-procfs.c (procfs_store_registers): Update. + * mipsnbsd-tdep.c (mipsnbsd_fill_reg): Update. + * mips-linux-tdep.c (fill_gregset, mips64_fill_gregset): Update. + * m68klinux-nat.c (store_register, fill_gregset): Update. + * m68k-tdep.c (fill_gregset): Update. + * infptrace.c (store_register): Update. + * i386-nto-tdep.c (i386nto_regset_fill): Update. + * i386-linux-nat.c (store_register, fill_gregset): Update. + * hppa-linux-nat.c (fill_gregset): Update. + * go32-nat.c (store_register): Update. + * armnbsd-nat.c (store_register, store_regs, store_fp_register) + (store_fp_regs): Update. + * arm-linux-nat.c (store_nwfpe_single, store_nwfpe_double) + (store_nwfpe_extended, store_fpregister, store_fpregs) + (store_register, store_regs, fill_gregset, fill_fpregset): Update. + * alpha-tdep.c (alpha_fill_int_regs, alpha_fill_fp_regs): Update. + * aix-thread.c (fill_gprs64, fill_fprs, fill_sprs64, fill_sprs32) + (store_regs_user_thread, store_regs_kernel_thread): Update. + 2004-07-24 Mark Kettenis <kettenis@gnu.org> * dwarf2-frame.c (struct dwarf2_cie): Delete `addr_size' member. diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c index 76df67a..1b625bd 100644 --- a/gdb/aix-thread.c +++ b/gdb/aix-thread.c @@ -1266,7 +1266,8 @@ fill_gprs64 (uint64_t *vals) for (regno = 0; regno < ppc_num_gprs; regno++) if (register_cached (tdep->ppc_gp0_regnum + regno)) - regcache_collect (tdep->ppc_gp0_regnum + regno, vals + regno); + regcache_raw_collect (current_regcache, tdep->ppc_gp0_regnum + regno, + vals + regno); } static void @@ -1277,7 +1278,8 @@ fill_gprs32 (uint32_t *vals) for (regno = 0; regno < ppc_num_gprs; regno++) if (register_cached (tdep->ppc_gp0_regnum + regno)) - regcache_collect (tdep->ppc_gp0_regnum + regno, vals + regno); + regcache_raw_collect (current_regcache, tdep->ppc_gp0_regnum + regno, + vals + regno); } /* Store the floating point registers into a double array. */ @@ -1295,7 +1297,7 @@ fill_fprs (double *vals) regno < tdep->ppc_fp0_regnum + ppc_num_fprs; regno++) if (register_cached (regno)) - regcache_collect (regno, vals + regno); + regcache_raw_collect (current_regcache, regno, vals + regno); } /* Store the special registers into the specified 64-bit and 32-bit @@ -1316,20 +1318,20 @@ fill_sprs64 (uint64_t *iar, uint64_t *msr, uint32_t *cr, gdb_assert (sizeof (*iar) == DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM)); if (register_cached (PC_REGNUM)) - regcache_collect (PC_REGNUM, iar); + regcache_raw_collect (current_regcache, PC_REGNUM, iar); if (register_cached (tdep->ppc_ps_regnum)) - regcache_collect (tdep->ppc_ps_regnum, msr); + regcache_raw_collect (current_regcache, tdep->ppc_ps_regnum, msr); if (register_cached (tdep->ppc_cr_regnum)) - regcache_collect (tdep->ppc_cr_regnum, cr); + regcache_raw_collect (current_regcache, tdep->ppc_cr_regnum, cr); if (register_cached (tdep->ppc_lr_regnum)) - regcache_collect (tdep->ppc_lr_regnum, lr); + regcache_raw_collect (current_regcache, tdep->ppc_lr_regnum, lr); if (register_cached (tdep->ppc_ctr_regnum)) - regcache_collect (tdep->ppc_ctr_regnum, ctr); + regcache_raw_collect (current_regcache, tdep->ppc_ctr_regnum, ctr); if (register_cached (tdep->ppc_xer_regnum)) - regcache_collect (tdep->ppc_xer_regnum, xer); + regcache_raw_collect (current_regcache, tdep->ppc_xer_regnum, xer); if (tdep->ppc_fpscr_regnum >= 0 && register_cached (tdep->ppc_fpscr_regnum)) - regcache_collect (tdep->ppc_fpscr_regnum, fpscr); + regcache_raw_collect (current_regcache, tdep->ppc_fpscr_regnum, fpscr); } static void @@ -1352,20 +1354,20 @@ fill_sprs32 (unsigned long *iar, unsigned long *msr, unsigned long *cr, gdb_assert (sizeof (*iar) == DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM)); if (register_cached (PC_REGNUM)) - regcache_collect (PC_REGNUM, iar); + regcache_raw_collect (current_regcache, PC_REGNUM, iar); if (register_cached (tdep->ppc_ps_regnum)) - regcache_collect (tdep->ppc_ps_regnum, msr); + regcache_raw_collect (current_regcache, tdep->ppc_ps_regnum, msr); if (register_cached (tdep->ppc_cr_regnum)) - regcache_collect (tdep->ppc_cr_regnum, cr); + regcache_raw_collect (current_regcache, tdep->ppc_cr_regnum, cr); if (register_cached (tdep->ppc_lr_regnum)) - regcache_collect (tdep->ppc_lr_regnum, lr); + regcache_raw_collect (current_regcache, tdep->ppc_lr_regnum, lr); if (register_cached (tdep->ppc_ctr_regnum)) - regcache_collect (tdep->ppc_ctr_regnum, ctr); + regcache_raw_collect (current_regcache, tdep->ppc_ctr_regnum, ctr); if (register_cached (tdep->ppc_xer_regnum)) - regcache_collect (tdep->ppc_xer_regnum, xer); + regcache_raw_collect (current_regcache, tdep->ppc_xer_regnum, xer); if (tdep->ppc_fpscr_regnum >= 0 && register_cached (tdep->ppc_fpscr_regnum)) - regcache_collect (tdep->ppc_fpscr_regnum, fpscr); + regcache_raw_collect (current_regcache, tdep->ppc_fpscr_regnum, fpscr); } /* Store all registers into pthread PDTID, which doesn't have a kernel @@ -1402,12 +1404,14 @@ store_regs_user_thread (pthdb_pthread_t pdtid) { if (arch64) { - regcache_collect (tdep->ppc_gp0_regnum + i, (void *) &int64); + regcache_raw_collect (current_regcache, tdep->ppc_gp0_regnum + i, + (void *) &int64); ctx.gpr[i] = int64; } else { - regcache_collect (tdep->ppc_gp0_regnum + i, (void *) &int32); + regcache_raw_collect (current_regcache, tdep->ppc_gp0_regnum + i, + (void *) &int32); ctx.gpr[i] = int32; } } @@ -1539,7 +1543,8 @@ store_regs_kernel_thread (int regno, pthdb_tid_t tid) if (tdep->ppc_mq_regnum >= 0) if (register_cached (tdep->ppc_mq_regnum)) - regcache_collect (tdep->ppc_mq_regnum, &sprs32.pt_mq); + regcache_raw_collect (current_regcache, tdep->ppc_mq_regnum, + &sprs32.pt_mq); ptrace32 (PTT_WRITE_SPRS, tid, (int *) &sprs32, 0, NULL); } diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 933989f..b5edce1 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -1322,13 +1322,13 @@ alpha_fill_int_regs (int regno, void *r0_r30, void *pc, void *unique) for (i = 0; i < 31; ++i) if (regno == i || regno == -1) - regcache_collect (i, (char *)r0_r30 + i*8); + regcache_raw_collect (current_regcache, i, (char *)r0_r30 + i*8); if (regno == ALPHA_PC_REGNUM || regno == -1) - regcache_collect (ALPHA_PC_REGNUM, pc); + regcache_raw_collect (current_regcache, ALPHA_PC_REGNUM, pc); if (unique && (regno == ALPHA_UNIQUE_REGNUM || regno == -1)) - regcache_collect (ALPHA_UNIQUE_REGNUM, unique); + regcache_raw_collect (current_regcache, ALPHA_UNIQUE_REGNUM, unique); } void @@ -1352,10 +1352,11 @@ alpha_fill_fp_regs (int regno, void *f0_f30, void *fpcr) for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; ++i) if (regno == i || regno == -1) - regcache_collect (i, (char *)f0_f30 + (i - ALPHA_FP0_REGNUM) * 8); + regcache_raw_collect (current_regcache, i, + (char *)f0_f30 + (i - ALPHA_FP0_REGNUM) * 8); if (regno == ALPHA_FPCR_REGNUM || regno == -1) - regcache_collect (ALPHA_FPCR_REGNUM, fpcr); + regcache_raw_collect (current_regcache, ALPHA_FPCR_REGNUM, fpcr); } diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c index db80cb2..fa0fda0 100644 --- a/gdb/arm-linux-nat.c +++ b/gdb/arm-linux-nat.c @@ -165,7 +165,8 @@ store_nwfpe_single (unsigned int fn, FPA11 *fpa11) { unsigned int mem[3]; - regcache_collect (ARM_F0_REGNUM + fn, (char *) &mem[0]); + regcache_raw_collect (current_regcache, ARM_F0_REGNUM + fn, + (char *) &mem[0]); fpa11->fpreg[fn].fSingle = mem[0]; fpa11->fType[fn] = typeSingle; } @@ -175,7 +176,8 @@ store_nwfpe_double (unsigned int fn, FPA11 *fpa11) { unsigned int mem[3]; - regcache_collect (ARM_F0_REGNUM + fn, (char *) &mem[0]); + regcache_raw_collect (current_regcache, ARM_F0_REGNUM + fn, + (char *) &mem[0]); fpa11->fpreg[fn].fDouble[1] = mem[0]; fpa11->fpreg[fn].fDouble[0] = mem[1]; fpa11->fType[fn] = typeDouble; @@ -186,7 +188,8 @@ store_nwfpe_extended (unsigned int fn, FPA11 *fpa11) { unsigned int mem[3]; - regcache_collect (ARM_F0_REGNUM + fn, (char *) &mem[0]); + regcache_raw_collect (current_regcache, ARM_F0_REGNUM + fn, + (char *) &mem[0]); fpa11->fpreg[fn].fExtended[0] = mem[0]; /* sign & exponent */ fpa11->fpreg[fn].fExtended[2] = mem[1]; /* ls bits */ fpa11->fpreg[fn].fExtended[1] = mem[2]; /* ms bits */ @@ -336,7 +339,7 @@ store_fpregister (int regno) /* Store fpsr. */ if (ARM_FPS_REGNUM == regno && register_cached (ARM_FPS_REGNUM)) - regcache_collect (ARM_FPS_REGNUM, (char *) &fp.fpsr); + regcache_raw_collect (current_regcache, ARM_FPS_REGNUM, (char *) &fp.fpsr); /* Store the floating point register. */ if (regno >= ARM_F0_REGNUM && regno <= ARM_F7_REGNUM) @@ -374,7 +377,7 @@ store_fpregs (void) /* Store fpsr. */ if (register_cached (ARM_FPS_REGNUM)) - regcache_collect (ARM_FPS_REGNUM, (char *) &fp.fpsr); + regcache_raw_collect (current_regcache, ARM_FPS_REGNUM, (char *) &fp.fpsr); /* Store the floating point registers. */ for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++) @@ -488,7 +491,7 @@ store_register (int regno) } if (regno >= ARM_A1_REGNUM && regno <= ARM_PC_REGNUM) - regcache_collect (regno, (char *) ®s[regno]); + regcache_raw_collect (current_regcache, regno, (char *) ®s[regno]); ret = ptrace (PTRACE_SETREGS, tid, 0, ®s); if (ret < 0) @@ -518,7 +521,7 @@ store_regs (void) for (regno = ARM_A1_REGNUM; regno <= ARM_PC_REGNUM; regno++) { if (register_cached (regno)) - regcache_collect (regno, (char *) ®s[regno]); + regcache_raw_collect (current_regcache, regno, (char *) ®s[regno]); } ret = ptrace (PTRACE_SETREGS, tid, 0, ®s); @@ -585,19 +588,21 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno) { int regnum; for (regnum = ARM_A1_REGNUM; regnum <= ARM_PC_REGNUM; regnum++) - regcache_collect (regnum, (char *) &(*gregsetp)[regnum]); + regcache_raw_collect (current_regcache, regnum, + (char *) &(*gregsetp)[regnum]); } else if (regno >= ARM_A1_REGNUM && regno <= ARM_PC_REGNUM) - regcache_collect (regno, (char *) &(*gregsetp)[regno]); + regcache_raw_collect (current_regcache, regno, + (char *) &(*gregsetp)[regno]); if (ARM_PS_REGNUM == regno || -1 == regno) { if (arm_apcs_32) - regcache_collect (ARM_PS_REGNUM, - (char *) &(*gregsetp)[ARM_CPSR_REGNUM]); + regcache_raw_collect (current_regcache, ARM_PS_REGNUM, + (char *) &(*gregsetp)[ARM_CPSR_REGNUM]); else - regcache_collect (ARM_PC_REGNUM, - (char *) &(*gregsetp)[ARM_PC_REGNUM]); + regcache_raw_collect (current_regcache, ARM_PC_REGNUM, + (char *) &(*gregsetp)[ARM_PC_REGNUM]); } } @@ -647,7 +652,8 @@ fill_fpregset (gdb_fpregset_t *fpregsetp, int regno) /* Store fpsr. */ if (ARM_FPS_REGNUM == regno || -1 == regno) - regcache_collect (ARM_FPS_REGNUM, (char *) &fp->fpsr); + regcache_raw_collect (current_regcache, ARM_FPS_REGNUM, + (char *) &fp->fpsr); } /* Fill GDB's register array with the floating-point register values diff --git a/gdb/armnbsd-nat.c b/gdb/armnbsd-nat.c index d21fdbf..13ba0cb 100644 --- a/gdb/armnbsd-nat.c +++ b/gdb/armnbsd-nat.c @@ -229,21 +229,25 @@ store_register (int regno) switch (regno) { case ARM_SP_REGNUM: - regcache_collect (ARM_SP_REGNUM, (char *) &inferior_registers.r_sp); + regcache_raw_collect (current_regcache, ARM_SP_REGNUM, + (char *) &inferior_registers.r_sp); break; case ARM_LR_REGNUM: - regcache_collect (ARM_LR_REGNUM, (char *) &inferior_registers.r_lr); + regcache_raw_collect (current_regcache, ARM_LR_REGNUM, + (char *) &inferior_registers.r_lr); break; case ARM_PC_REGNUM: if (arm_apcs_32) - regcache_collect (ARM_PC_REGNUM, (char *) &inferior_registers.r_pc); + regcache_raw_collect (current_regcache, ARM_PC_REGNUM, + (char *) &inferior_registers.r_pc); else { unsigned pc_val; - regcache_collect (ARM_PC_REGNUM, (char *) &pc_val); + regcache_raw_collect (current_regcache, ARM_PC_REGNUM, + (char *) &pc_val); pc_val = ADDR_BITS_REMOVE (pc_val); inferior_registers.r_pc @@ -254,12 +258,14 @@ store_register (int regno) case ARM_PS_REGNUM: if (arm_apcs_32) - regcache_collect (ARM_PS_REGNUM, (char *) &inferior_registers.r_cpsr); + regcache_raw_collect (current_regcache, ARM_PS_REGNUM, + (char *) &inferior_registers.r_cpsr); else { unsigned psr_val; - regcache_collect (ARM_PS_REGNUM, (char *) &psr_val); + regcache_raw_collect (current_regcache, ARM_PS_REGNUM, + (char *) &psr_val); psr_val ^= ADDR_BITS_REMOVE (psr_val); inferior_registers.r_pc = ADDR_BITS_REMOVE (inferior_registers.r_pc); @@ -268,7 +274,8 @@ store_register (int regno) break; default: - regcache_collect (regno, (char *) &inferior_registers.r[regno]); + regcache_raw_collect (current_regcache, regno, + (char *) &inferior_registers.r[regno]); break; } @@ -288,23 +295,30 @@ store_regs (void) for (regno = ARM_A1_REGNUM; regno < ARM_SP_REGNUM; regno++) - regcache_collect (regno, (char *) &inferior_registers.r[regno]); + regcache_raw_collect (current_regcache, regno, + (char *) &inferior_registers.r[regno]); - regcache_collect (ARM_SP_REGNUM, (char *) &inferior_registers.r_sp); - regcache_collect (ARM_LR_REGNUM, (char *) &inferior_registers.r_lr); + regcache_raw_collect (current_regcache, ARM_SP_REGNUM, + (char *) &inferior_registers.r_sp); + regcache_raw_collect (current_regcache, ARM_LR_REGNUM, + (char *) &inferior_registers.r_lr); if (arm_apcs_32) { - regcache_collect (ARM_PC_REGNUM, (char *) &inferior_registers.r_pc); - regcache_collect (ARM_PS_REGNUM, (char *) &inferior_registers.r_cpsr); + regcache_raw_collect (current_regcache, ARM_PC_REGNUM, + (char *) &inferior_registers.r_pc); + regcache_raw_collect (current_regcache, ARM_PS_REGNUM, + (char *) &inferior_registers.r_cpsr); } else { unsigned pc_val; unsigned psr_val; - regcache_collect (ARM_PC_REGNUM, (char *) &pc_val); - regcache_collect (ARM_PS_REGNUM, (char *) &psr_val); + regcache_raw_collect (current_regcache, ARM_PC_REGNUM, + (char *) &pc_val); + regcache_raw_collect (current_regcache, ARM_PS_REGNUM, + (char *) &psr_val); pc_val = ADDR_BITS_REMOVE (pc_val); psr_val ^= ADDR_BITS_REMOVE (psr_val); @@ -337,13 +351,13 @@ store_fp_register (int regno) switch (regno) { case ARM_FPS_REGNUM: - regcache_collect (ARM_FPS_REGNUM, - (char *) &inferior_fp_registers.fpr_fpsr); + regcache_raw_collect (current_regcache, ARM_FPS_REGNUM, + (char *) &inferior_fp_registers.fpr_fpsr); break; default: - regcache_collect - (regno, (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]); + regcache_raw_collect (current_regcache, regno, + (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]); break; } @@ -363,10 +377,11 @@ store_fp_regs (void) for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++) - regcache_collect - (regno, (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]); + regcache_raw_collect (current_regcache, regno, + (char *) &inferior_fp_registers.fpr[regno - ARM_F0_REGNUM]); - regcache_collect (ARM_FPS_REGNUM, (char *) &inferior_fp_registers.fpr_fpsr); + regcache_raw_collect (current_regcache, ARM_FPS_REGNUM, + (char *) &inferior_fp_registers.fpr_fpsr); ret = ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) &inferior_fp_registers, 0); diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c index 96472b3..ec3b5aa 100644 --- a/gdb/go32-nat.c +++ b/gdb/go32-nat.c @@ -492,7 +492,8 @@ static void store_register (int regno) { if (regno < FP0_REGNUM) - regcache_collect (regno, (char *) &a_tss + regno_mapping[regno].tss_ofs); + regcache_raw_collect (current_regcache, regno, + (char *) &a_tss + regno_mapping[regno].tss_ofs); else if (i386_fp_regnum_p (regno) || i386_fpc_regnum_p (regno)) i387_fill_fsave ((char *) &npx, regno); else diff --git a/gdb/hppa-linux-nat.c b/gdb/hppa-linux-nat.c index 13c35ba..b6a4f20 100644 --- a/gdb/hppa-linux-nat.c +++ b/gdb/hppa-linux-nat.c @@ -330,7 +330,7 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno) if (regno == -1 || regno == mregno) { - regcache_collect(mregno, &(*gregsetp)[i]); + regcache_raw_collect(current_regcache, mregno, &(*gregsetp)[i]); } } } @@ -371,6 +371,6 @@ fill_fpregset (gdb_fpregset_t *fpregsetp, int regno) char *to = (char *) &((*fpregsetp)[(i - HPPA_FP0_REGNUM) / 2]); if ((i - HPPA_FP0_REGNUM) & 1) to += 4; - regcache_collect (i, to); + regcache_raw_collect (current_regcache, i, to); } } diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c index 631e4e7..38bfef6 100644 --- a/gdb/i386-linux-nat.c +++ b/gdb/i386-linux-nat.c @@ -215,7 +215,7 @@ store_register (int regno) tid = PIDGET (inferior_ptid); /* Not a threaded program. */ errno = 0; - regcache_collect (regno, &val); + regcache_raw_collect (current_regcache, regno, &val); ptrace (PTRACE_POKEUSER, tid, register_addr (regno, 0), val); if (errno != 0) error ("Couldn't write register %s (#%d): %s.", REGISTER_NAME (regno), @@ -255,11 +255,12 @@ fill_gregset (elf_gregset_t *gregsetp, int regno) for (i = 0; i < I386_NUM_GREGS; i++) if (regno == -1 || regno == i) - regcache_collect (i, regp + regmap[i]); + regcache_raw_collect (current_regcache, i, regp + regmap[i]); if ((regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM) && I386_LINUX_ORIG_EAX_REGNUM < NUM_REGS) - regcache_collect (I386_LINUX_ORIG_EAX_REGNUM, regp + ORIG_EAX); + regcache_raw_collect (current_regcache, I386_LINUX_ORIG_EAX_REGNUM, + regp + ORIG_EAX); } #ifdef HAVE_PTRACE_GETREGS diff --git a/gdb/i386-nto-tdep.c b/gdb/i386-nto-tdep.c index e441fcf..5b95cd6 100644 --- a/gdb/i386-nto-tdep.c +++ b/gdb/i386-nto-tdep.c @@ -176,7 +176,7 @@ i386nto_regset_fill (int regset, char *data) { int offset = nto_reg_offset (regno); if (offset != -1) - regcache_collect (regno, data + offset); + regcache_raw_collect (current_regcache, regno, data + offset); } } else if (regset == NTO_REG_FLOAT) diff --git a/gdb/infptrace.c b/gdb/infptrace.c index 0cf3378..561d2bc 100644 --- a/gdb/infptrace.c +++ b/gdb/infptrace.c @@ -450,7 +450,7 @@ store_register (int regno) regaddr = register_addr (regno, offset); /* Put the contents of regno into a local buffer */ - regcache_collect (regno, buf); + regcache_raw_collect (current_regcache, regno, buf); /* Store the local buffer into the inferior a chunk at the time. */ for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE)) diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index e00f6dc..8760797 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -978,12 +978,12 @@ fill_gregset (gregset_t *gregsetp, int regno) for (regi = 0; regi < R_PC; regi++) { if (regno == -1 || regno == regi) - regcache_collect (regi, regp + regi); + regcache_raw_collect (current_regcache, regi, regp + regi); } if (regno == -1 || regno == PS_REGNUM) - regcache_collect (PS_REGNUM, regp + R_PS); + regcache_raw_collect (current_regcache, PS_REGNUM, regp + R_PS); if (regno == -1 || regno == PC_REGNUM) - regcache_collect (PC_REGNUM, regp + R_PC); + regcache_raw_collect (current_regcache, PC_REGNUM, regp + R_PC); } #if defined (FP0_REGNUM) @@ -1024,14 +1024,18 @@ fill_fpregset (fpregset_t *fpregsetp, int regno) for (regi = FP0_REGNUM; regi < M68K_FPC_REGNUM; regi++) { if (regno == -1 || regno == regi) - regcache_collect (regi, &fpregsetp->f_fpregs[regi - FP0_REGNUM][0]); + regcache_raw_collect (current_regcache, regi, + &fpregsetp->f_fpregs[regi - FP0_REGNUM][0]); } if (regno == -1 || regno == M68K_FPC_REGNUM) - regcache_collect (M68K_FPC_REGNUM, &fpregsetp->f_pcr); + regcache_raw_collect (current_regcache, M68K_FPC_REGNUM, + &fpregsetp->f_pcr); if (regno == -1 || regno == M68K_FPS_REGNUM) - regcache_collect (M68K_FPS_REGNUM, &fpregsetp->f_psr); + regcache_raw_collect (current_regcache, M68K_FPS_REGNUM, + &fpregsetp->f_psr); if (regno == -1 || regno == M68K_FPI_REGNUM) - regcache_collect (M68K_FPI_REGNUM, &fpregsetp->f_fpiaddr); + regcache_raw_collect (current_regcache, M68K_FPI_REGNUM, + &fpregsetp->f_fpiaddr); } #endif /* defined (FP0_REGNUM) */ diff --git a/gdb/m68klinux-nat.c b/gdb/m68klinux-nat.c index 4310be2..70a40b7 100644 --- a/gdb/m68klinux-nat.c +++ b/gdb/m68klinux-nat.c @@ -218,7 +218,7 @@ store_register (int regno) regaddr = register_addr (regno, offset); /* Put the contents of regno into a local buffer */ - regcache_collect (regno, buf); + regcache_raw_collect (current_regcache, regno, buf); /* Store the local buffer into the inferior a chunk at the time. */ for (i = 0; i < register_size (current_gdbarch, regno); @@ -298,7 +298,7 @@ fill_gregset (elf_gregset_t *gregsetp, int regno) for (i = 0; i < NUM_GREGS; i++) if (regno == -1 || regno == i) - regcache_collect (i, regp + regmap[i]); + regcache_raw_collect (current_regcache, i, regp + regmap[i]); } #ifdef HAVE_PTRACE_GETREGS @@ -388,12 +388,14 @@ fill_fpregset (elf_fpregset_t *fpregsetp, int regno) /* Fill in the floating-point registers. */ for (i = FP0_REGNUM; i < FP0_REGNUM + 8; i++) if (regno == -1 || regno == i) - regcache_collect (i, FPREG_ADDR (fpregsetp, i - FP0_REGNUM)); + regcache_raw_collect (current_regcache, i, + FPREG_ADDR (fpregsetp, i - FP0_REGNUM)); /* Fill in the floating-point control registers. */ for (i = M68K_FPC_REGNUM; i <= M68K_FPI_REGNUM; i++) if (regno == -1 || regno == i) - regcache_collect (i, (char *) &fpregsetp->fpcntl[i - M68K_FPC_REGNUM]); + regcache_raw_collect (current_regcache, i, + (char *) &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 7d2e063..77db3de 100644 --- a/gdb/mips-linux-tdep.c +++ b/gdb/mips-linux-tdep.c @@ -161,7 +161,7 @@ fill_gregset (elf_gregset_t *gregsetp, int regno) if (regno < 32) { dst = regp + regno + EF_REG0; - regcache_collect (regno, dst); + regcache_raw_collect (current_regcache, regno, dst); return; } @@ -183,7 +183,7 @@ fill_gregset (elf_gregset_t *gregsetp, int regno) if (regaddr != -1) { dst = regp + regaddr; - regcache_collect (regno, dst); + regcache_raw_collect (current_regcache, regno, dst); } } @@ -440,7 +440,7 @@ mips64_fill_gregset (mips64_elf_gregset_t *gregsetp, int regno) if (regno < 32) { dst = regp + regno + MIPS64_EF_REG0; - regcache_collect (regno, dst); + regcache_raw_collect (current_regcache, regno, dst); return; } @@ -462,7 +462,7 @@ mips64_fill_gregset (mips64_elf_gregset_t *gregsetp, int regno) if (regaddr != -1) { dst = regp + regaddr; - regcache_collect (regno, dst); + regcache_raw_collect (current_regcache, regno, dst); } } diff --git a/gdb/mipsnbsd-tdep.c b/gdb/mipsnbsd-tdep.c index d18e0a5..a8b3be8 100644 --- a/gdb/mipsnbsd-tdep.c +++ b/gdb/mipsnbsd-tdep.c @@ -60,7 +60,8 @@ mipsnbsd_fill_reg (char *regs, int regno) for (i = 0; i <= PC_REGNUM; i++) if ((regno == i || regno == -1) && ! CANNOT_STORE_REGISTER (i)) - regcache_collect (i, regs + (i * mips_isa_regsize (current_gdbarch))); + regcache_raw_collect (current_regcache, i, + regs + (i * mips_isa_regsize (current_gdbarch))); } void @@ -91,7 +92,8 @@ mipsnbsd_fill_fpreg (char *fpregs, int regno) for (i = FP0_REGNUM; i <= mips_regnum (current_gdbarch)->fp_control_status; i++) if ((regno == i || regno == -1) && ! CANNOT_STORE_REGISTER (i)) - regcache_collect (i, fpregs + ((i - FP0_REGNUM) * mips_isa_regsize (current_gdbarch))); + regcache_raw_collect (current_regcache, i, + fpregs + ((i - FP0_REGNUM) * mips_isa_regsize (current_gdbarch))); } static void diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c index 9c4b3f9..9101566 100644 --- a/gdb/nto-procfs.c +++ b/gdb/nto-procfs.c @@ -1189,7 +1189,7 @@ procfs_store_registers (int regno) if (len < 1) return; - regcache_collect (regno, (char *) ® + off); + regcache_raw_collect (current_regcache, regno, (char *) ® + off); err = devctl (ctl_fd, dev_set, ®, regsize, 0); if (err != EOK) diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index 5f94732..61b0440 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -618,8 +618,8 @@ store_altivec_register (int tid, int regno) if (regno == (tdep->ppc_vrsave_regnum - 1)) offset = vrregsize - DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vrsave_regnum); - regcache_collect (regno, - regs + (regno - tdep->ppc_vr0_regnum) * vrregsize + offset); + regcache_raw_collect (current_regcache, regno, + regs + (regno - tdep->ppc_vr0_regnum) * vrregsize + offset); ret = ptrace (PTRACE_SETVRREGS, tid, 0, ®s); if (ret < 0) @@ -732,7 +732,7 @@ store_spe_register (int tid, int regno) && tdep->ppc_ev0_regnum <= regno && regno <= tdep->ppc_ev31_regnum) { char buf[MAX_REGISTER_SIZE]; - regcache_collect (regno, buf); + regcache_raw_collect (current_regcache, regno, buf); write_spliced_spe_reg (tid, regno, &evrregs, buf); } else if (tdep->ppc_acc_regnum >= 0 @@ -740,14 +740,14 @@ store_spe_register (int tid, int regno) { gdb_assert (sizeof (evrregs.acc) == register_size (current_gdbarch, regno)); - regcache_collect (regno, &evrregs.acc); + regcache_raw_collect (current_regcache, regno, &evrregs.acc); } else if (tdep->ppc_spefscr_regnum >= 0 && regno == tdep->ppc_spefscr_regnum) { gdb_assert (sizeof (evrregs.spefscr) == register_size (current_gdbarch, regno)); - regcache_collect (regno, &evrregs.spefscr); + regcache_raw_collect (current_regcache, regno, &evrregs.spefscr); } else gdb_assert (0); @@ -843,10 +843,11 @@ fill_vrregset (gdb_vrregset_t *vrregsetp) /* The last 2 registers of this set are only 32 bit long, not 128, but only VSCR is fetched as a 16 bytes quantity. */ if (i == (num_of_vrregs - 2)) - regcache_collect (tdep->ppc_vr0_regnum + i, - *vrregsetp + i * vrregsize + offset); + regcache_raw_collect (current_regcache, tdep->ppc_vr0_regnum + i, + *vrregsetp + i * vrregsize + offset); else - regcache_collect (tdep->ppc_vr0_regnum + i, *vrregsetp + i * vrregsize); + regcache_raw_collect (current_regcache, tdep->ppc_vr0_regnum + i, + *vrregsetp + i * vrregsize); } } @@ -889,16 +890,16 @@ store_spe_registers (int tid) { char buf[MAX_REGISTER_SIZE]; - regcache_collect (tdep->ppc_ev0_regnum + i, buf); + regcache_raw_collect (current_regcache, tdep->ppc_ev0_regnum + i, buf); write_spliced_spe_reg (tid, tdep->ppc_ev0_regnum + i, &evrregs, buf); } gdb_assert (sizeof (evrregs.acc) == register_size (current_gdbarch, tdep->ppc_acc_regnum)); - regcache_collect (tdep->ppc_acc_regnum, &evrregs.acc); + regcache_raw_collect (current_regcache, tdep->ppc_acc_regnum, &evrregs.acc); gdb_assert (sizeof (evrregs.spefscr) == register_size (current_gdbarch, tdep->ppc_spefscr_regnum)); - regcache_collect (tdep->ppc_acc_regnum, &evrregs.spefscr); + regcache_raw_collect (current_regcache, tdep->ppc_acc_regnum, &evrregs.spefscr); set_spe_registers (tid, &evrregs); } @@ -999,9 +1000,11 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno) if ((regno == -1) || regno == tdep->ppc_lr_regnum) right_fill_reg (tdep->ppc_lr_regnum, regp + PT_LNK); if ((regno == -1) || regno == tdep->ppc_cr_regnum) - regcache_collect (tdep->ppc_cr_regnum, regp + PT_CCR); + regcache_raw_collect (current_regcache, tdep->ppc_cr_regnum, + regp + PT_CCR); if ((regno == -1) || regno == tdep->ppc_xer_regnum) - regcache_collect (tdep->ppc_xer_regnum, regp + PT_XER); + regcache_raw_collect (current_regcache, tdep->ppc_xer_regnum, + regp + PT_XER); if ((regno == -1) || regno == tdep->ppc_ctr_regnum) right_fill_reg (tdep->ppc_ctr_regnum, regp + PT_CTR); #ifdef PT_MQ @@ -1036,7 +1039,8 @@ fill_fpregset (gdb_fpregset_t *fpregsetp, int regno) for (regi = 0; regi < ppc_num_fprs; regi++) { if ((regno == -1) || (regno == tdep->ppc_fp0_regnum + regi)) - regcache_collect (tdep->ppc_fp0_regnum + regi, fpp + 8 * regi); + regcache_raw_collect (current_regcache, tdep->ppc_fp0_regnum + regi, + fpp + 8 * regi); } if (regno == -1 || regno == tdep->ppc_fpscr_regnum) right_fill_reg (tdep->ppc_fpscr_regnum, (fpp + 8 * 32)); diff --git a/gdb/ppcnbsd-tdep.c b/gdb/ppcnbsd-tdep.c index 16fa675..44b3077 100644 --- a/gdb/ppcnbsd-tdep.c +++ b/gdb/ppcnbsd-tdep.c @@ -92,24 +92,28 @@ ppcnbsd_fill_reg (char *regs, int regno) for (i = 0; i < ppc_num_gprs; i++) { if (regno == tdep->ppc_gp0_regnum + i || regno == -1) - regcache_collect (tdep->ppc_gp0_regnum + i, - regs + REG_FIXREG_OFFSET (i)); + regcache_raw_collect (current_regcache, tdep->ppc_gp0_regnum + i, + regs + REG_FIXREG_OFFSET (i)); } if (regno == tdep->ppc_lr_regnum || regno == -1) - regcache_collect (tdep->ppc_lr_regnum, regs + REG_LR_OFFSET); + regcache_raw_collect (current_regcache, tdep->ppc_lr_regnum, + regs + REG_LR_OFFSET); if (regno == tdep->ppc_cr_regnum || regno == -1) - regcache_collect (tdep->ppc_cr_regnum, regs + REG_CR_OFFSET); + regcache_raw_collect (current_regcache, tdep->ppc_cr_regnum, + regs + REG_CR_OFFSET); if (regno == tdep->ppc_xer_regnum || regno == -1) - regcache_collect (tdep->ppc_xer_regnum, regs + REG_XER_OFFSET); + regcache_raw_collect (current_regcache, tdep->ppc_xer_regnum, + regs + REG_XER_OFFSET); if (regno == tdep->ppc_ctr_regnum || regno == -1) - regcache_collect (tdep->ppc_ctr_regnum, regs + REG_CTR_OFFSET); + regcache_raw_collect (current_regcache, tdep->ppc_ctr_regnum, + regs + REG_CTR_OFFSET); if (regno == PC_REGNUM || regno == -1) - regcache_collect (PC_REGNUM, regs + REG_PC_OFFSET); + regcache_raw_collect (current_regcache, PC_REGNUM, regs + REG_PC_OFFSET); } void @@ -163,12 +167,13 @@ ppcnbsd_fill_fpreg (char *fpregs, int regno) for (i = 0; i < ppc_num_fprs; i++) { if (regno == tdep->ppc_fp0_regnum + i || regno == -1) - regcache_collect (tdep->ppc_fp0_regnum + i, - fpregs + FPREG_FPR_OFFSET (i)); + regcache_raw_collect (current_regcache, tdep->ppc_fp0_regnum + i, + fpregs + FPREG_FPR_OFFSET (i)); } if (regno == tdep->ppc_fpscr_regnum || regno == -1) - regcache_collect (tdep->ppc_fpscr_regnum, fpregs + FPREG_FPSCR_OFFSET); + regcache_raw_collect (current_regcache, tdep->ppc_fpscr_regnum, + fpregs + FPREG_FPSCR_OFFSET); } static void diff --git a/gdb/regcache.c b/gdb/regcache.c index b7f76d3..619c5a3 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -1218,12 +1218,6 @@ write_register_pid (int regnum, CORE_ADDR val, ptid_t ptid) inferior_ptid = save_ptid; } -void -regcache_collect (int regnum, void *buf) -{ - regcache_raw_collect (current_regcache, regnum, buf); -} - /* Supply register REGNUM, whose contents are stored in BUF, to REGCACHE. */ void diff --git a/gdb/regcache.h b/gdb/regcache.h index 98c9c90..77b9457 100644 --- a/gdb/regcache.h +++ b/gdb/regcache.h @@ -96,7 +96,6 @@ void regcache_cooked_write_part (struct regcache *regcache, int regnum, target. These functions are called by the target in response to a target_fetch_registers() or target_store_registers(). */ -extern void regcache_collect (int regnum, void *buf); extern void regcache_raw_supply (struct regcache *regcache, int regnum, const void *buf); extern void regcache_raw_collect (const struct regcache *regcache, diff --git a/gdb/remote.c b/gdb/remote.c index 0286399..80798ee 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -3297,7 +3297,7 @@ store_register_using_P (int regnum) sprintf (buf, "P%s=", phex_nz (reg->pnum, 0)); p = buf + strlen (buf); - regcache_collect (reg->regnum, regp); + regcache_raw_collect (current_regcache, reg->regnum, regp); bin2hex (regp, p, DEPRECATED_REGISTER_RAW_SIZE (reg->regnum)); remote_send (buf, rs->remote_packet_size); @@ -3358,7 +3358,7 @@ remote_store_registers (int regnum) { struct packet_reg *r = &rs->regs[i]; if (r->in_g_packet) - regcache_collect (r->regnum, regs + r->offset); + regcache_raw_collect (current_regcache, r->regnum, regs + r->offset); } } diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index c6f4329..1c25a59 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -283,7 +283,7 @@ store_register (int regno) int nr, isfloat; /* Fetch the register's value from the register cache. */ - regcache_collect (regno, addr); + regcache_raw_collect (current_regcache, regno, addr); /* -1 can be a successful return value, so infer errors from errno. */ errno = 0; diff --git a/gdb/shnbsd-tdep.c b/gdb/shnbsd-tdep.c index deb725f..9c94910 100644 --- a/gdb/shnbsd-tdep.c +++ b/gdb/shnbsd-tdep.c @@ -90,25 +90,26 @@ shnbsd_fill_reg (char *regs, int regno) int i; if (regno == PC_REGNUM || regno == -1) - regcache_collect (PC_REGNUM, regs + (0 * 4)); + regcache_raw_collect (current_regcache, PC_REGNUM, regs + (0 * 4)); if (regno == SR_REGNUM || regno == -1) - regcache_collect (SR_REGNUM, regs + (1 * 4)); + regcache_raw_collect (current_regcache, SR_REGNUM, regs + (1 * 4)); if (regno == PR_REGNUM || regno == -1) - regcache_collect (PR_REGNUM, regs + (2 * 4)); + regcache_raw_collect (current_regcache, PR_REGNUM, regs + (2 * 4)); if (regno == MACH_REGNUM || regno == -1) - regcache_collect (MACH_REGNUM, regs + (3 * 4)); + regcache_raw_collect (current_regcache, MACH_REGNUM, regs + (3 * 4)); if (regno == MACL_REGNUM || regno == -1) - regcache_collect (MACL_REGNUM, regs + (4 * 4)); + regcache_raw_collect (current_regcache, MACL_REGNUM, regs + (4 * 4)); if ((regno >= R0_REGNUM && regno <= (R0_REGNUM + 15)) || regno == -1) { for (i = R0_REGNUM; i <= (R0_REGNUM + 15); i++) if (regno == i || regno == -1) - regcache_collect (i, regs + regmap[i - R0_REGNUM]); + regcache_raw_collect (current_regcache, i, + regs + regmap[i - R0_REGNUM]); } } diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c index fe97f6c..393f976 100644 --- a/gdb/sol-thread.c +++ b/gdb/sol-thread.c @@ -585,7 +585,7 @@ sol_thread_store_registers (int regnum) char old_value[MAX_REGISTER_SIZE]; /* Save new register value. */ - regcache_collect (regnum, old_value); + regcache_raw_collect (current_regcache, regnum, old_value); val = p_td_thr_getgregs (&thandle, gregset); if (val != TD_OK) diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c index 0a7e51b..376a760 100644 --- a/gdb/win32-nat.c +++ b/gdb/win32-nat.c @@ -392,7 +392,8 @@ do_child_store_inferior_registers (int r) if (!current_thread) /* Windows sometimes uses a non-existent thread id in its events */; else if (r >= 0) - regcache_collect (r, ((char *) ¤t_thread->context) + mappings[r]); + regcache_raw_collect (current_regcache, r, + ((char *) ¤t_thread->context) + mappings[r]); else { for (r = 0; r < NUM_REGS; r++) diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 0a7e51b..376a760 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -392,7 +392,8 @@ do_child_store_inferior_registers (int r) if (!current_thread) /* Windows sometimes uses a non-existent thread id in its events */; else if (r >= 0) - regcache_collect (r, ((char *) ¤t_thread->context) + mappings[r]); + regcache_raw_collect (current_regcache, r, + ((char *) ¤t_thread->context) + mappings[r]); else { for (r = 0; r < NUM_REGS; r++) |