summaryrefslogtreecommitdiff
path: root/gdb/amd64-tdep.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-10-08 12:48:05 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-10-08 12:48:05 +0000
commitd36f4f44fbecd09568e9fc029cf179f2eb364111 (patch)
tree7a9c2f563efd59e38b4a416f1dfcc556afb94d6a /gdb/amd64-tdep.c
parentb7b8cf5049780bbcb08f5fc04e9279d48dc7d6b6 (diff)
downloadgdb-d36f4f44fbecd09568e9fc029cf179f2eb364111.tar.gz
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.
Diffstat (limited to 'gdb/amd64-tdep.c')
-rw-r--r--gdb/amd64-tdep.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index 953394a22d1..3ca8dde7afe 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;