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.
/* Native-dependent code for AMD64.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
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)
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);
}
}
}
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)
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);
}
}
}