diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-10-08 12:47:09 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-10-08 12:47:09 +0000 |
commit | ec7cc0e81672aaea3cc6610ac4989d5728530276 (patch) | |
tree | ca10a00edcdc3b58b23fde817dc391f2b0be2076 /gdb | |
parent | ad010def8947cff19c8fbc2678fbf8b2dc6935e9 (diff) | |
download | gdb-ec7cc0e81672aaea3cc6610ac4989d5728530276.zip gdb-ec7cc0e81672aaea3cc6610ac4989d5728530276.tar.gz gdb-ec7cc0e81672aaea3cc6610ac4989d5728530276.tar.bz2 |
2007-10-08 Markus Deuling <deuling@de.ibm.com>
* alpha-tdep.c (alpha_register_reggroup_p): Replace current_gdbarch by
gdbarch.
* alpha-linux-nat.c (alpha_linux_register_u_offset): Likewise.
(alpha_sigtramp_frame_unwind_cache, alpha_sigtramp_frame_this_id)
(alpha_sigtramp_frame_sniffer, alpha_next_pc): Use get_regcache_arch or
get_frame_arch to get at the current architecture by regcache or by
frame, respectively.
* alpha-nat.c (fetch_osf_core_registers): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/alpha-linux-nat.c | 6 | ||||
-rw-r--r-- | gdb/alpha-nat.c | 5 | ||||
-rw-r--r-- | gdb/alpha-tdep.c | 17 |
4 files changed, 26 insertions, 13 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0350bbe..b50e151 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,16 @@ 2007-10-08 Markus Deuling <deuling@de.ibm.com> + * alpha-tdep.c (alpha_register_reggroup_p): Replace current_gdbarch by + gdbarch. + * alpha-linux-nat.c (alpha_linux_register_u_offset): Likewise. + (alpha_sigtramp_frame_unwind_cache, alpha_sigtramp_frame_this_id) + (alpha_sigtramp_frame_sniffer, alpha_next_pc): Use get_regcache_arch or + get_frame_arch to get at the current architecture by regcache or by + frame, respectively. + * alpha-nat.c (fetch_osf_core_registers): Likewise. + +2007-10-08 Markus Deuling <deuling@de.ibm.com> + * dwarf2-frame.c (read_reg, execute_cfa_program, dwarf2_frame_cache) (dwarf2_frame_default_init_reg, dwarf2_frame_prev_register): Replace current_gdbarch by gdbarch. diff --git a/gdb/alpha-linux-nat.c b/gdb/alpha-linux-nat.c index 9d9dd97..92e0c46 100644 --- a/gdb/alpha-linux-nat.c +++ b/gdb/alpha-linux-nat.c @@ -84,14 +84,14 @@ fill_fpregset (const struct regcache *regcache, static CORE_ADDR alpha_linux_register_u_offset (struct gdbarch *gdbarch, int regno, int store_p) { - if (regno == gdbarch_pc_regnum (current_gdbarch)) + if (regno == gdbarch_pc_regnum (gdbarch)) return PC; if (regno == ALPHA_UNIQUE_REGNUM) return ALPHA_UNIQUE_PTRACE_ADDR; - if (regno < gdbarch_fp0_regnum (current_gdbarch)) + if (regno < gdbarch_fp0_regnum (gdbarch)) return GPR_BASE + regno; else - return FPR_BASE + regno - gdbarch_fp0_regnum (current_gdbarch); + return FPR_BASE + regno - gdbarch_fp0_regnum (gdbarch); } void _initialialize_alpha_linux_nat (void); diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c index 3ec16f2..a229459 100644 --- a/gdb/alpha-nat.c +++ b/gdb/alpha-nat.c @@ -49,6 +49,7 @@ fetch_osf_core_registers (struct regcache *regcache, char *core_reg_sect, unsigned core_reg_size, int which, CORE_ADDR reg_addr) { + struct gdbarch *gdbarch = get_regcache_arch (regcache); int regno; int addr; int bad_reg = -1; @@ -87,7 +88,7 @@ fetch_osf_core_registers (struct regcache *regcache, for (regno = 0; regno < ALPHA_NUM_REGS; regno++) { - if (gdbarch_cannot_fetch_register (current_gdbarch, regno)) + if (gdbarch_cannot_fetch_register (gdbarch, regno)) { regcache_raw_supply (regcache, regno, NULL); continue; @@ -112,7 +113,7 @@ fetch_osf_core_registers (struct regcache *regcache, if (bad_reg >= 0) { error (_("Register %s not found in core file."), - gdbarch_register_name (current_gdbarch, bad_reg)); + gdbarch_register_name (gdbarch, bad_reg)); } } diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index e7d297d..03fa331 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -114,8 +114,8 @@ alpha_register_reggroup_p (struct gdbarch *gdbarch, int regnum, { /* Filter out any registers eliminated, but whose regnum is reserved for backward compatibility, e.g. the vfp. */ - if (gdbarch_register_name (current_gdbarch, regnum) == NULL - || *gdbarch_register_name (current_gdbarch, regnum) == '\0') + if (gdbarch_register_name (gdbarch, regnum) == NULL + || *gdbarch_register_name (gdbarch, regnum) == '\0') return 0; if (group == all_reggroup) @@ -763,7 +763,7 @@ alpha_sigtramp_frame_unwind_cache (struct frame_info *next_frame, info = FRAME_OBSTACK_ZALLOC (struct alpha_sigtramp_unwind_cache); *this_prologue_cache = info; - tdep = gdbarch_tdep (current_gdbarch); + tdep = gdbarch_tdep (get_frame_arch (next_frame)); info->sigcontext_addr = tdep->sigcontext_addr (next_frame); return info; @@ -807,7 +807,7 @@ alpha_sigtramp_frame_this_id (struct frame_info *next_frame, /* If we have dynamic signal trampolines, find their start. If we do not, then we must assume there is a symbol record that can provide the start address. */ - tdep = gdbarch_tdep (current_gdbarch); + tdep = gdbarch_tdep (get_frame_arch (next_frame)); if (tdep->dynamic_sigtramp_offset) { int offset; @@ -880,6 +880,7 @@ static const struct frame_unwind alpha_sigtramp_frame_unwind = { static const struct frame_unwind * alpha_sigtramp_frame_sniffer (struct frame_info *next_frame) { + struct gdbarch *gdbarch = get_frame_arch (next_frame); CORE_ADDR pc = frame_pc_unwind (next_frame); char *name; @@ -889,14 +890,14 @@ alpha_sigtramp_frame_sniffer (struct frame_info *next_frame) /* We shouldn't even bother to try if the OSABI didn't register a sigcontext_addr handler or pc_in_sigtramp hander. */ - if (gdbarch_tdep (current_gdbarch)->sigcontext_addr == NULL) + if (gdbarch_tdep (gdbarch)->sigcontext_addr == NULL) return NULL; - if (gdbarch_tdep (current_gdbarch)->pc_in_sigtramp == NULL) + if (gdbarch_tdep (gdbarch)->pc_in_sigtramp == NULL) return NULL; /* Otherwise we should be in a signal frame. */ find_pc_partial_function (pc, &name, NULL, NULL); - if (gdbarch_tdep (current_gdbarch)->pc_in_sigtramp (pc, name)) + if (gdbarch_tdep (gdbarch)->pc_in_sigtramp (pc, name)) return &alpha_sigtramp_frame_unwind; return NULL; @@ -1441,7 +1442,7 @@ alpha_next_pc (struct frame_info *frame, CORE_ADDR pc) case 0x33: /* FBLE */ case 0x32: /* FBLT */ case 0x35: /* FBNE */ - regno += gdbarch_fp0_regnum (current_gdbarch); + regno += gdbarch_fp0_regnum (get_frame_arch (frame)); } rav = get_frame_register_signed (frame, regno); |