aboutsummaryrefslogtreecommitdiff
path: root/gdb/amd64-tdep.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-06-16 13:28:06 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-06-16 13:28:06 +0000
commit233dfcf06d379c41f7c0e8cc024ad16eeb7f3636 (patch)
tree3f7ead042295f601c7f5ae6fcb06e1a0a67a0ae3 /gdb/amd64-tdep.c
parent6da38f42ff97c1a08db009db80ae53f7e3353f29 (diff)
downloadgdb-233dfcf06d379c41f7c0e8cc024ad16eeb7f3636.zip
gdb-233dfcf06d379c41f7c0e8cc024ad16eeb7f3636.tar.gz
gdb-233dfcf06d379c41f7c0e8cc024ad16eeb7f3636.tar.bz2
Check bits_per_word instead of gdbarch_ptr_bit
* amd64-linux-nat.c (ps_get_thread_area): Check bits_per_word instead of gdbarch_ptr_bit. * amd64-nat.c (amd64_native_gregset_reg_offset): Likewise. (amd64_supply_native_gregset): Likewise. (amd64_collect_native_gregset): Likewise. * amd64-tdep.c (amd64_supply_fxsave): Likewise. (amd64_supply_xsave): Likewise. (amd64_collect_fxsave): Likewise. (amd64_collect_xsave): Likewise.
Diffstat (limited to 'gdb/amd64-tdep.c')
-rw-r--r--gdb/amd64-tdep.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index 2db5cf0..27f115b 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -2802,7 +2802,8 @@ amd64_supply_fxsave (struct regcache *regcache, int regnum,
i387_supply_fxsave (regcache, regnum, fxsave);
- if (fxsave && gdbarch_ptr_bit (gdbarch) == 64)
+ if (fxsave
+ && gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 64)
{
const gdb_byte *regs = fxsave;
@@ -2824,7 +2825,8 @@ amd64_supply_xsave (struct regcache *regcache, int regnum,
i387_supply_xsave (regcache, regnum, xsave);
- if (xsave && gdbarch_ptr_bit (gdbarch) == 64)
+ if (xsave
+ && gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 64)
{
const gdb_byte *regs = xsave;
@@ -2852,7 +2854,7 @@ amd64_collect_fxsave (const struct regcache *regcache, int regnum,
i387_collect_fxsave (regcache, regnum, fxsave);
- if (gdbarch_ptr_bit (gdbarch) == 64)
+ if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 64)
{
if (regnum == -1 || regnum == I387_FISEG_REGNUM (tdep))
regcache_raw_collect (regcache, I387_FISEG_REGNUM (tdep), regs + 12);
@@ -2873,7 +2875,7 @@ amd64_collect_xsave (const struct regcache *regcache, int regnum,
i387_collect_xsave (regcache, regnum, xsave, gcore);
- if (gdbarch_ptr_bit (gdbarch) == 64)
+ if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 64)
{
if (regnum == -1 || regnum == I387_FISEG_REGNUM (tdep))
regcache_raw_collect (regcache, I387_FISEG_REGNUM (tdep),