aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-02-21 23:50:40 +0000
committerMark Kettenis <kettenis@gnu.org>2004-02-21 23:50:40 +0000
commitb053acebb369602cb4e026f46a5929275631fdbe (patch)
tree9ca69c7392220dff1279781667903ce22377c66e /gdb
parentf5859b4d860963ccbeb7517f75ad2e2add4bc55b (diff)
downloadgdb-b053acebb369602cb4e026f46a5929275631fdbe.zip
gdb-b053acebb369602cb4e026f46a5929275631fdbe.tar.gz
gdb-b053acebb369602cb4e026f46a5929275631fdbe.tar.bz2
* amd64-nat.c: Update copyright year.
(amd64_supply_native_gregset, amd64_collect_native_gregset): Use architecture from REGCACHE.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/amd64-nat.c12
2 files changed, 11 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9f92812..13d25a3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2004-02-22 Mark Kettenis <kettenis@gnu.org>
+ * amd64-nat.c: Update copyright year.
+ (amd64_supply_native_gregset, amd64_collect_native_gregset): Use
+ architecture from REGCACHE.
+
* x86-64-linux-nat.c (x86_64_linux_gregset32_reg_offset): Use
symbolic constants from <sys/reg.h> instead of hard-coded numbers.
diff --git a/gdb/amd64-nat.c b/gdb/amd64-nat.c
index fb0efcf..4346d74 100644
--- a/gdb/amd64-nat.c
+++ b/gdb/amd64-nat.c
@@ -1,6 +1,6 @@
/* Native-dependent code for AMD64.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -92,10 +92,11 @@ amd64_supply_native_gregset (struct regcache *regcache,
const void *gregs, int regnum)
{
const char *regs = gregs;
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
int num_regs = amd64_native_gregset64_num_regs;
int i;
- if (gdbarch_ptr_bit (current_gdbarch) == 32)
+ if (gdbarch_ptr_bit (gdbarch) == 32)
num_regs = amd64_native_gregset32_num_regs;
if (num_regs > NUM_REGS)
@@ -108,7 +109,7 @@ amd64_supply_native_gregset (struct regcache *regcache,
int offset = amd64_native_gregset_reg_offset (i);
if (offset != -1)
- regcache_raw_supply (current_regcache, i, regs + offset);
+ regcache_raw_supply (regcache, i, regs + offset);
}
}
}
@@ -122,10 +123,11 @@ amd64_collect_native_gregset (const struct regcache *regcache,
void *gregs, int regnum)
{
char *regs = gregs;
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
int num_regs = amd64_native_gregset64_num_regs;
int i;
- if (gdbarch_ptr_bit (current_gdbarch) == 32)
+ if (gdbarch_ptr_bit (gdbarch) == 32)
num_regs = amd64_native_gregset32_num_regs;
if (num_regs > NUM_REGS)
@@ -138,7 +140,7 @@ amd64_collect_native_gregset (const struct regcache *regcache,
int offset = amd64_native_gregset_reg_offset (i);
if (offset != -1)
- regcache_raw_collect (current_regcache, i, regs + offset);
+ regcache_raw_collect (regcache, i, regs + offset);
}
}
}