diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-10-10 17:04:38 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-10-10 17:04:38 +0000 |
commit | 2eb4d78bfd092cb2cf360e679bf8dcd7d212764a (patch) | |
tree | 288fb4bc4ece2130f6baddc2e400c95a174b8c2b /gdb/mips-linux-nat.c | |
parent | 72a155b44d8601da263e2d4be0fe107a4d1e7f23 (diff) | |
download | gdb-2eb4d78bfd092cb2cf360e679bf8dcd7d212764a.zip gdb-2eb4d78bfd092cb2cf360e679bf8dcd7d212764a.tar.gz gdb-2eb4d78bfd092cb2cf360e679bf8dcd7d212764a.tar.bz2 |
2007-10-10 Markus Deuling <deuling@de.ibm.com>
* remote-mips.c (mips_wait, mips_fetch_registers)
(mips_store_registers): Use get_regcache_arch to get at the
current architecture by regcache.
* mipsnbsd-tdep.c (mipsnbsd_supply_reg, mipsnbsd_fill_reg)
(mipsnbsd_supply_fpreg, mipsnbsd_fill_fpreg): Use get_regcache_arch to
get at the current architecture by regcache.
(mipsnbsd_sigtramp_offset): Use get_frame_arch to get at the current
architecture by frame_info.
* mipsnbsd-nat.c (mipsnbsd_fetch_inferior_registers)
(mipsnbsd_store_inferior_registers): Use get_regcache_arch to get at
the current architecture by regcache.
* mips-linux-tdep.c (mips_linux_get_longjmp_target)
(mips64_linux_get_longjmp_target, mips_linux_o32_sigframe_init)
(mips_linux_n32n64_sigframe_init): Use get_frame_arch to get at the
current architecture by frame_info.
(supply_32bit_reg, mips_supply_gregset, mips_fill_gregset)
(mips_supply_fpregset, mips_fill_fpregset, supply_64bit_reg)
(mips64_supply_gregset, mips64_fill_gregset, mips64_supply_fpregset)
(mips64_fill_fpregset, mips_linux_write_pc): Use get_regcache_arch to
get at the current architecture by regcache.
* mips-linux-nat.c (mips_linux_register_addr)
(mips64_linux_register_addr): Replace current_gdbarch by gdbarch.
(supply_gregset, fill_gregset, supply_fpregset, fill_fpregset)
(mips64_linux_regsets_fetch_registers)
(mips64_linux_regsets_store_registers): Use get_regcache_arch to get at
the current architecture by regcache.
* mips64obsd-tdep.c (mips64obsd_sigframe_init): Use get_frame_arch to
get at the current architecture by frame_info.
Diffstat (limited to 'gdb/mips-linux-nat.c')
-rw-r--r-- | gdb/mips-linux-nat.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c index 980b41f..7d87c87 100644 --- a/gdb/mips-linux-nat.c +++ b/gdb/mips-linux-nat.c @@ -60,7 +60,7 @@ mips_linux_register_addr (struct gdbarch *gdbarch, int regno, int store) { CORE_ADDR regaddr; - if (regno < 0 || regno >= gdbarch_num_regs (current_gdbarch)) + if (regno < 0 || regno >= gdbarch_num_regs (gdbarch)) error (_("Bogon register number %d."), regno); if (regno > MIPS_ZERO_REGNUM && regno < MIPS_ZERO_REGNUM + 32) @@ -95,14 +95,14 @@ mips64_linux_register_addr (struct gdbarch *gdbarch, int regno, int store) { CORE_ADDR regaddr; - if (regno < 0 || regno >= gdbarch_num_regs (current_gdbarch)) + if (regno < 0 || regno >= gdbarch_num_regs (gdbarch)) error (_("Bogon register number %d."), regno); if (regno > MIPS_ZERO_REGNUM && regno < MIPS_ZERO_REGNUM + 32) regaddr = regno; else if ((regno >= mips_regnum (gdbarch)->fp0) && (regno < mips_regnum (gdbarch)->fp0 + 32)) - regaddr = MIPS64_FPR_BASE + (regno - gdbarch_fp0_regnum (current_gdbarch)); + regaddr = MIPS64_FPR_BASE + (regno - gdbarch_fp0_regnum (gdbarch)); else if (regno == mips_regnum (gdbarch)->pc) regaddr = MIPS64_PC; else if (regno == mips_regnum (gdbarch)->cause) @@ -147,7 +147,7 @@ ps_get_thread_area (const struct ps_prochandle *ph, void supply_gregset (struct regcache *regcache, const gdb_gregset_t *gregsetp) { - if (mips_isa_regsize (current_gdbarch) == 4) + if (mips_isa_regsize (get_regcache_arch (regcache)) == 4) mips_supply_gregset (regcache, (const mips_elf_gregset_t *) gregsetp); else mips64_supply_gregset (regcache, (const mips64_elf_gregset_t *) gregsetp); @@ -157,7 +157,7 @@ void fill_gregset (const struct regcache *regcache, gdb_gregset_t *gregsetp, int regno) { - if (mips_isa_regsize (current_gdbarch) == 4) + if (mips_isa_regsize (get_regcache_arch (regcache)) == 4) mips_fill_gregset (regcache, (mips_elf_gregset_t *) gregsetp, regno); else mips64_fill_gregset (regcache, (mips64_elf_gregset_t *) gregsetp, regno); @@ -166,7 +166,7 @@ fill_gregset (const struct regcache *regcache, void supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp) { - if (mips_isa_regsize (current_gdbarch) == 4) + if (mips_isa_regsize (get_regcache_arch (regcache)) == 4) mips_supply_fpregset (regcache, (const mips_elf_fpregset_t *) fpregsetp); else mips64_supply_fpregset (regcache, (const mips64_elf_fpregset_t *) fpregsetp); @@ -176,7 +176,7 @@ void fill_fpregset (const struct regcache *regcache, gdb_fpregset_t *fpregsetp, int regno) { - if (mips_isa_regsize (current_gdbarch) == 4) + if (mips_isa_regsize (get_regcache_arch (regcache)) == 4) mips_fill_fpregset (regcache, (mips_elf_fpregset_t *) fpregsetp, regno); else mips64_fill_fpregset (regcache, (mips64_elf_fpregset_t *) fpregsetp, regno); @@ -189,15 +189,16 @@ fill_fpregset (const struct regcache *regcache, static void mips64_linux_regsets_fetch_registers (struct regcache *regcache, int regno) { + struct gdbarch *gdbarch = get_regcache_arch (regcache); int is_fp; int tid; - if (regno >= mips_regnum (current_gdbarch)->fp0 - && regno <= mips_regnum (current_gdbarch)->fp0 + 32) + if (regno >= mips_regnum (gdbarch)->fp0 + && regno <= mips_regnum (gdbarch)->fp0 + 32) is_fp = 1; - else if (regno == mips_regnum (current_gdbarch)->fp_control_status) + else if (regno == mips_regnum (gdbarch)->fp_control_status) is_fp = 1; - else if (regno == mips_regnum (current_gdbarch)->fp_implementation_revision) + else if (regno == mips_regnum (gdbarch)->fp_implementation_revision) is_fp = 1; else is_fp = 0; @@ -250,15 +251,16 @@ mips64_linux_regsets_fetch_registers (struct regcache *regcache, int regno) static void mips64_linux_regsets_store_registers (const struct regcache *regcache, int regno) { + struct gdbarch *gdbarch = get_regcache_arch (regcache); int is_fp; int tid; - if (regno >= mips_regnum (current_gdbarch)->fp0 - && regno <= mips_regnum (current_gdbarch)->fp0 + 32) + if (regno >= mips_regnum (gdbarch)->fp0 + && regno <= mips_regnum (gdbarch)->fp0 + 32) is_fp = 1; - else if (regno == mips_regnum (current_gdbarch)->fp_control_status) + else if (regno == mips_regnum (gdbarch)->fp_control_status) is_fp = 1; - else if (regno == mips_regnum (current_gdbarch)->fp_implementation_revision) + else if (regno == mips_regnum (gdbarch)->fp_implementation_revision) is_fp = 1; else is_fp = 0; |