aboutsummaryrefslogtreecommitdiff
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
commit2ae02b477b5068d2598f45fc416fc525fd4f9a4b (patch)
treec85aa8dedaf9e5f9d30923d746be70bb0522202e /gdb/amd64-tdep.c
parentec7cc0e81672aaea3cc6610ac4989d5728530276 (diff)
downloadgdb-2ae02b477b5068d2598f45fc416fc525fd4f9a4b.zip
gdb-2ae02b477b5068d2598f45fc416fc525fd4f9a4b.tar.gz
gdb-2ae02b477b5068d2598f45fc416fc525fd4f9a4b.tar.bz2
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 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;