diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-05-06 14:29:58 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-05-06 14:29:58 +0000 |
commit | 4e3269e3f1da68dc6a5e3d36630cf8a833e935d6 (patch) | |
tree | 595198fd7c5d6c60b127681b5c388d62a1f71bfb /gdb | |
parent | 28f5035f336a0d28983f5c58b3c7abb3d2e47b5d (diff) | |
download | gdb-4e3269e3f1da68dc6a5e3d36630cf8a833e935d6.zip gdb-4e3269e3f1da68dc6a5e3d36630cf8a833e935d6.tar.gz gdb-4e3269e3f1da68dc6a5e3d36630cf8a833e935d6.tar.bz2 |
* shnbsd-tdep.c (shnbsd_supply_reg): Add REGCACHE parameter, use it
instead of current_regcache. Make REGS const.
(shnbsd_fill_reg): Add REGCACHE parameter; replace current_regcache.
* shnbsd-tdep.h (shnbsd_supply_reg, shnbsd_fill_reg): Update
prototypes.
* shnbsd-nat.c: Include "regcache.h".
(shnbsd_fetch_inferior_registers): Pass current_regcache to
shnbsd_supply_reg.
(shnbsd_store_inferior_registers): Pass current_regcache to
shnbsd_fill_reg.
* Makefile.in (shbsd-nat.o): Update dependencies.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 14 | ||||
-rw-r--r-- | gdb/Makefile.in | 2 | ||||
-rw-r--r-- | gdb/shnbsd-nat.c | 6 | ||||
-rw-r--r-- | gdb/shnbsd-tdep.c | 8 | ||||
-rw-r--r-- | gdb/shnbsd-tdep.h | 4 |
5 files changed, 25 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 149a38c..c49861c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,19 @@ 2007-05-06 Ulrich Weigand <uweigand@de.ibm.com> + * shnbsd-tdep.c (shnbsd_supply_reg): Add REGCACHE parameter, use it + instead of current_regcache. Make REGS const. + (shnbsd_fill_reg): Add REGCACHE parameter; replace current_regcache. + * shnbsd-tdep.h (shnbsd_supply_reg, shnbsd_fill_reg): Update + prototypes. + * shnbsd-nat.c: Include "regcache.h". + (shnbsd_fetch_inferior_registers): Pass current_regcache to + shnbsd_supply_reg. + (shnbsd_store_inferior_registers): Pass current_regcache to + shnbsd_fill_reg. + * Makefile.in (shbsd-nat.o): Update dependencies. + +2007-05-06 Ulrich Weigand <uweigand@de.ibm.com> + * 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. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 40823b6..a24eea4 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -2553,7 +2553,7 @@ sh64-tdep.o: sh64-tdep.c $(defs_h) $(frame_h) $(frame_base_h) \ $(gdb_string_h) $(gdb_assert_h) $(arch_utils_h) $(regcache_h) \ $(osabi_h) $(elf_bfd_h) $(elf_sh_h) $(gdb_sim_sh_h) shnbsd-nat.o: shnbsd-nat.c $(defs_h) $(inferior_h) $(sh_tdep_h) \ - $(shnbsd_tdep_h) $(inf_ptrace_h) + $(shnbsd_tdep_h) $(inf_ptrace_h) $(regcache_h) shnbsd-tdep.o: shnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) $(regset_h) \ $(value_h) $(osabi_h) $(gdb_assert_h) $(gdb_string_h) $(sh_tdep_h) \ $(shnbsd_tdep_h) $(solib_svr4_h) diff --git a/gdb/shnbsd-nat.c b/gdb/shnbsd-nat.c index 8139ed9..128dc0f 100644 --- a/gdb/shnbsd-nat.c +++ b/gdb/shnbsd-nat.c @@ -31,6 +31,8 @@ #include "sh-tdep.h" #include "shnbsd-tdep.h" #include "inf-ptrace.h" +#include "regcache.h" + /* Determine if PT_GETREGS fetches this register. */ #define GETREGS_SUPPLIES(regno) \ @@ -50,7 +52,7 @@ shnbsd_fetch_inferior_registers (int regno) (PTRACE_TYPE_ARG3) &inferior_registers, 0) == -1) perror_with_name (_("Couldn't get registers")); - shnbsd_supply_reg ((char *) &inferior_registers, regno); + shnbsd_supply_reg (current_regcache, (char *) &inferior_registers, regno); if (regno != -1) return; @@ -68,7 +70,7 @@ shnbsd_store_inferior_registers (int regno) (PTRACE_TYPE_ARG3) &inferior_registers, 0) == -1) perror_with_name (_("Couldn't get registers")); - shnbsd_fill_reg ((char *) &inferior_registers, regno); + shnbsd_fill_reg (current_regcache, (char *) &inferior_registers, regno); if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), (PTRACE_TYPE_ARG3) &inferior_registers, 0) == -1) diff --git a/gdb/shnbsd-tdep.c b/gdb/shnbsd-tdep.c index da2431d..5108fc4 100644 --- a/gdb/shnbsd-tdep.c +++ b/gdb/shnbsd-tdep.c @@ -156,16 +156,16 @@ shnbsd_regset_from_core_section (struct gdbarch *gdbarch, } void -shnbsd_supply_reg (char *regs, int regnum) +shnbsd_supply_reg (struct regcache *regcache, const char *regs, int regnum) { - shnbsd_supply_gregset (&shnbsd_gregset, current_regcache, regnum, + shnbsd_supply_gregset (&shnbsd_gregset, regcache, regnum, regs, SHNBSD_SIZEOF_GREGS); } void -shnbsd_fill_reg (char *regs, int regnum) +shnbsd_fill_reg (const struct regcache *regcache, char *regs, int regnum) { - shnbsd_collect_gregset (&shnbsd_gregset, current_regcache, regnum, + shnbsd_collect_gregset (&shnbsd_gregset, regcache, regnum, regs, SHNBSD_SIZEOF_GREGS); } diff --git a/gdb/shnbsd-tdep.h b/gdb/shnbsd-tdep.h index e57fd58..2b366c0 100644 --- a/gdb/shnbsd-tdep.h +++ b/gdb/shnbsd-tdep.h @@ -22,7 +22,7 @@ #ifndef SH_NBSD_TDEP_H #define SH_NBSD_TDEP_H -void shnbsd_supply_reg (char *, int); -void shnbsd_fill_reg (char *, int); +void shnbsd_supply_reg (struct regcache *, const char *, int); +void shnbsd_fill_reg (const struct regcache *, char *, int); #endif /* SH_NBSD_TDEP_H */ |