aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/amd64-linux-tdep.c3
-rw-r--r--gdb/amd64-nat.c8
-rw-r--r--gdb/amd64-tdep.c7
4 files changed, 19 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b50e151..6442657 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,14 @@
2007-10-08 Markus Deuling <deuling@de.ibm.com>
+ * amd64-tdep.c (amd64_frame_prev_register, amd64_sigtramp_frame_cache):
+ Use get_regcache_arch or get_frame_arch to get at the current
+ architecture by regcache or by frame, respectively.
+ * amd64-linux-tdep.c (amd64_linux_sigcontext_addr): Likewise.
+ * amd64-nat.c (amd64_supply_native_gregset)
+ (amd64_collect_native_gregset): Replace current_gdbarch by gdbarch.
+
+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.
diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
index e26bdd5..aeb6600 100644
--- a/gdb/amd64-linux-tdep.c
+++ b/gdb/amd64-linux-tdep.c
@@ -154,7 +154,8 @@ amd64_linux_sigcontext_addr (struct frame_info *next_frame)
CORE_ADDR sp;
gdb_byte buf[8];
- frame_unwind_register (next_frame, gdbarch_sp_regnum (current_gdbarch), buf);
+ frame_unwind_register (next_frame,
+ gdbarch_sp_regnum (get_frame_arch (next_frame)), buf);
sp = extract_unsigned_integer (buf, 8);
/* The sigcontext structure is part of the user context. A pointer
diff --git a/gdb/amd64-nat.c b/gdb/amd64-nat.c
index c641e89..9c6965a 100644
--- a/gdb/amd64-nat.c
+++ b/gdb/amd64-nat.c
@@ -98,8 +98,8 @@ amd64_supply_native_gregset (struct regcache *regcache,
if (gdbarch_ptr_bit (gdbarch) == 32)
num_regs = amd64_native_gregset32_num_regs;
- if (num_regs > gdbarch_num_regs (current_gdbarch))
- num_regs = gdbarch_num_regs (current_gdbarch);
+ if (num_regs > gdbarch_num_regs (gdbarch))
+ num_regs = gdbarch_num_regs (gdbarch);
for (i = 0; i < num_regs; i++)
{
@@ -145,8 +145,8 @@ amd64_collect_native_gregset (const struct regcache *regcache,
}
}
- if (num_regs > gdbarch_num_regs (current_gdbarch))
- num_regs = gdbarch_num_regs (current_gdbarch);
+ if (num_regs > gdbarch_num_regs (gdbarch))
+ num_regs = gdbarch_num_regs (gdbarch);
for (i = 0; i < num_regs; i++)
{
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index 953394a..3ca8dde 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -863,12 +863,13 @@ amd64_frame_prev_register (struct frame_info *next_frame, void **this_cache,
enum lval_type *lvalp, CORE_ADDR *addrp,
int *realnump, gdb_byte *valuep)
{
+ struct gdbarch *gdbarch = get_frame_arch (next_frame);
struct amd64_frame_cache *cache =
amd64_frame_cache (next_frame, this_cache);
gdb_assert (regnum >= 0);
- if (regnum == gdbarch_sp_regnum (current_gdbarch) && cache->saved_sp)
+ if (regnum == gdbarch_sp_regnum (gdbarch) && cache->saved_sp)
{
*optimizedp = 0;
*lvalp = not_lval;
@@ -892,7 +893,7 @@ amd64_frame_prev_register (struct frame_info *next_frame, void **this_cache,
{
/* Read the value in from memory. */
read_memory (*addrp, valuep,
- register_size (current_gdbarch, regnum));
+ register_size (gdbarch, regnum));
}
return;
}
@@ -929,7 +930,7 @@ static struct amd64_frame_cache *
amd64_sigtramp_frame_cache (struct frame_info *next_frame, void **this_cache)
{
struct amd64_frame_cache *cache;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (next_frame));
CORE_ADDR addr;
gdb_byte buf[8];
int i;