diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-05-06 14:29:15 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-05-06 14:29:15 +0000 |
commit | 28f5035f336a0d28983f5c58b3c7abb3d2e47b5d (patch) | |
tree | 984894d5000d06d02c9b39c5a9e84a404f806ab0 /gdb/mips-linux-nat.c | |
parent | 26144df5d2c0b2fa0244f3fb95f8ed2686ac0815 (diff) | |
download | gdb-28f5035f336a0d28983f5c58b3c7abb3d2e47b5d.zip gdb-28f5035f336a0d28983f5c58b3c7abb3d2e47b5d.tar.gz gdb-28f5035f336a0d28983f5c58b3c7abb3d2e47b5d.tar.bz2 |
* mips-linux-tdep.c (supply_32bit_reg): Add REGCACHE parameter. Use it
instead of current_regcache.
(mips_supply_gregset): Likewise. Pass REGCACHE to supply_32bit_reg.
Make GREGSETP const, remove superfluous casts.
(mips_fill_gregset): Add REGCACHE parameter; replace current_regcache.
(mips_supply_fpregset): Likewise. Make FPREGSETP const, remove
superfluous casts.
(mips_fill_fpregset): Add REGCACHE parameter; replace current_regcache.
(supply_64bit_reg): Likewise
(mips64_supply_gregset): Likewise. Pass REGCACHE to supply_64bit_reg.
Make GREGSETP const, adapt casts accordingly.
(mips64_fill_gregset): Add REGCACHE parameter; replace current_regcache.
(mips64_supply_fpregset): Likewise. Make FPREGSET const, adapt
casts accordingly.
(mips64_fill_fpregset): Add REGCACHE parameter; replace current_regcache.
(fetch_core_registers): Pass current_regcache to mips{64}_(supply|fill)_
helper routines.
* mips-linux-tdep.h (mips_supply_gregset, mips_fill_gregset,
mips_supply_fpregset, mips_fill_fpregset, mips64_supply_gregset,
mips64_fill_gregset, mips64_supply_fpregset, mips64_fill_fpregset):
Adapt prototypes.
* mips-linux-nat.c: Include "regcache.h".
(supply_gregset, fill_gregset, supply_fpregset, fill_fpregset): Pass
current_regcache to mips{64}_(supply|fill)_ helper routines.
(mips64_linux_regsets_fetch_registers): Likewise.
(mips64_linux_regsets_store_registers): Likewise.
* mipsnbsd-tdep.c (mipsnbsd_supply_reg, mipsnbsd_supply_fpreg): Add
REGCACHE argument; replace current_regcache. Make REGS const.
(mipsnbds_fill_reg, mipsnbsd_fill_fpreg): Add REGCACHE argument;
replace current_regcache.
* mipsnbsd-tdep.h (ipsnbsd_supply_reg, mipsnbsd_supply_fpreg,
mipsnbds_fill_reg, mipsnbsd_fill_fpreg): Adapt prototypes.
* mipsnbsd-nat.c (mipsnbsd_fetch_inferior_registers,
mipsnbsd_store_inferior_registers): Pass current_regcache to
mipsnbsd_(supply|fill)_... helper routines.
* Makefile.in (mips-linux-nat.o): Update dependencies.
Diffstat (limited to 'gdb/mips-linux-nat.c')
-rw-r--r-- | gdb/mips-linux-nat.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c index 9470078..6265724 100644 --- a/gdb/mips-linux-nat.c +++ b/gdb/mips-linux-nat.c @@ -24,6 +24,7 @@ #include "inferior.h" #include "mips-tdep.h" #include "target.h" +#include "regcache.h" #include "linux-nat.h" #include "mips-linux-tdep.h" @@ -179,36 +180,36 @@ void supply_gregset (gdb_gregset_t *gregsetp) { if (mips_isa_regsize (current_gdbarch) == 4) - mips_supply_gregset ((void *) gregsetp); + mips_supply_gregset (current_regcache, (void *) gregsetp); else - mips64_supply_gregset ((void *) gregsetp); + mips64_supply_gregset (current_regcache, (void *) gregsetp); } void fill_gregset (gdb_gregset_t *gregsetp, int regno) { if (mips_isa_regsize (current_gdbarch) == 4) - mips_fill_gregset ((void *) gregsetp, regno); + mips_fill_gregset (current_regcache, (void *) gregsetp, regno); else - mips64_fill_gregset ((void *) gregsetp, regno); + mips64_fill_gregset (current_regcache, (void *) gregsetp, regno); } void supply_fpregset (gdb_fpregset_t *fpregsetp) { if (mips_isa_regsize (current_gdbarch) == 4) - mips_supply_fpregset ((void *) fpregsetp); + mips_supply_fpregset (current_regcache, (void *) fpregsetp); else - mips64_supply_fpregset ((void *) fpregsetp); + mips64_supply_fpregset (current_regcache, (void *) fpregsetp); } void fill_fpregset (gdb_fpregset_t *fpregsetp, int regno) { if (mips_isa_regsize (current_gdbarch) == 4) - mips_fill_fpregset ((void *) fpregsetp, regno); + mips_fill_fpregset (current_regcache, (void *) fpregsetp, regno); else - mips64_fill_fpregset ((void *) fpregsetp, regno); + mips64_fill_fpregset (current_regcache, (void *) fpregsetp, regno); } @@ -249,7 +250,8 @@ mips64_linux_regsets_fetch_registers (int regno) perror_with_name (_("Couldn't get registers")); } - mips64_supply_gregset (®s); + mips64_supply_gregset (current_regcache, + (const mips64_elf_gregset_t *) ®s); } if (regno == -1 || is_fp) @@ -267,7 +269,8 @@ mips64_linux_regsets_fetch_registers (int regno) perror_with_name (_("Couldn't get FP registers")); } - mips64_supply_fpregset (&fp_regs); + mips64_supply_fpregset (current_regcache, + (const mips64_elf_fpregset_t *) &fp_regs); } } @@ -301,7 +304,7 @@ mips64_linux_regsets_store_registers (int regno) if (ptrace (PTRACE_GETREGS, tid, 0L, (PTRACE_TYPE_ARG3) ®s) == -1) perror_with_name (_("Couldn't get registers")); - mips64_fill_gregset (®s, regno); + mips64_fill_gregset (current_regcache, ®s, regno); if (ptrace (PTRACE_SETREGS, tid, 0L, (PTRACE_TYPE_ARG3) ®s) == -1) perror_with_name (_("Couldn't set registers")); @@ -315,7 +318,7 @@ mips64_linux_regsets_store_registers (int regno) (PTRACE_TYPE_ARG3) &fp_regs) == -1) perror_with_name (_("Couldn't get FP registers")); - mips64_fill_fpregset (&fp_regs, regno); + mips64_fill_fpregset (current_regcache, &fp_regs, regno); if (ptrace (PTRACE_SETFPREGS, tid, 0L, (PTRACE_TYPE_ARG3) &fp_regs) == -1) |