From 2fdf551c88da3164d30fba19ea807196f96ff69c Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Sun, 14 Nov 2004 19:29:46 +0000 Subject: [PATCH] * Makefile.in (mips-linux-tdep.o): Update dependencies. * mips-linux-tdep.c: Include "regcache.h". (fill_fpregset, mips64_fill_fpregset): Use regcache_raw_collect. --- gdb/ChangeLog | 6 ++++++ gdb/Makefile.in | 3 ++- gdb/mips-linux-tdep.c | 13 +++++-------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e20958a884..30fe24a2fb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2004-11-14 Daniel Jacobowitz + + * Makefile.in (mips-linux-tdep.o): Update dependencies. + * mips-linux-tdep.c: Include "regcache.h". + (fill_fpregset, mips64_fill_fpregset): Use regcache_raw_collect. + 2004-11-14 Daniel Jacobowitz * Makefile.in (linux-thread-db.o): Fix typo in last change. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 7e148c5c19..295f9ae322 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -2234,7 +2234,8 @@ mips-irix-tdep.o: mips-irix-tdep.c $(defs_h) $(osabi_h) $(elf_bfd_h) mips-linux-nat.o: mips-linux-nat.c $(defs_h) $(mips_tdep_h) mips-linux-tdep.o: mips-linux-tdep.c $(defs_h) $(gdbcore_h) $(target_h) \ $(solib_svr4_h) $(osabi_h) $(mips_tdep_h) $(gdb_string_h) \ - $(gdb_assert_h) $(frame_h) $(trad_frame_h) $(tramp_frame_h) + $(gdb_assert_h) $(frame_h) $(regcache_h) $(trad_frame_h) \ + $(tramp_frame_h) mips-mdebug-tdep.o: mips-mdebug-tdep.c $(defs_h) $(frame_h) $(mips_tdep_h) \ $(trad_frame_h) $(block_h) $(symtab_h) $(objfiles_h) $(elf_mips_h) \ $(elf_bfd_h) $(gdb_assert_h) $(frame_unwind_h) $(frame_base_h) \ diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c index 49620ab642..afd8f5dc2f 100644 --- a/gdb/mips-linux-tdep.c +++ b/gdb/mips-linux-tdep.c @@ -28,6 +28,7 @@ #include "gdb_string.h" #include "gdb_assert.h" #include "frame.h" +#include "regcache.h" #include "trad-frame.h" #include "tramp-frame.h" @@ -221,15 +222,13 @@ fill_fpregset (elf_fpregset_t *fpregsetp, int regno) if ((regno >= FP0_REGNUM) && (regno < FP0_REGNUM + 32)) { - from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)]; to = (char *) (*fpregsetp + regno - FP0_REGNUM); - memcpy (to, from, register_size (current_gdbarch, regno - FP0_REGNUM)); + regcache_raw_collect (current_regcache, regno, to); } else if (regno == mips_regnum (current_gdbarch)->fp_control_status) { - from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)]; to = (char *) (*fpregsetp + 32); - memcpy (to, from, register_size (current_gdbarch, regno)); + regcache_raw_collect (current_regcache, regno, to); } else if (regno == -1) { @@ -500,15 +499,13 @@ mips64_fill_fpregset (mips64_elf_fpregset_t *fpregsetp, int regno) if ((regno >= FP0_REGNUM) && (regno < FP0_REGNUM + 32)) { - from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)]; to = (char *) (*fpregsetp + regno - FP0_REGNUM); - memcpy (to, from, register_size (current_gdbarch, regno - FP0_REGNUM)); + regcache_raw_collect (current_regcache, regno, to); } else if (regno == mips_regnum (current_gdbarch)->fp_control_status) { - from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)]; to = (char *) (*fpregsetp + 32); - memcpy (to, from, register_size (current_gdbarch, regno)); + regcache_raw_collect (current_regcache, regno, to); } else if (regno == -1) {