aboutsummaryrefslogtreecommitdiff
path: root/gdb/amd64-linux-tdep.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-05-11 22:33:28 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-05-11 22:33:28 +0000
commit0288cee270af0c32fd172b7bd488d42d312d523a (patch)
tree3563bd2e1c196271a26c76f41f5cf7fd7267d757 /gdb/amd64-linux-tdep.c
parentf6537a2c1352642769b099fee1bbc30dfdcfd963 (diff)
downloadgdb-0288cee270af0c32fd172b7bd488d42d312d523a.zip
gdb-0288cee270af0c32fd172b7bd488d42d312d523a.tar.gz
gdb-0288cee270af0c32fd172b7bd488d42d312d523a.tar.bz2
Check gdbarch_ptr_bit for x32 core dump
* amd64-linux-tdep.c (amd64_linux_core_read_description): Check gdbarch_ptr_bit for x32 core dump.
Diffstat (limited to 'gdb/amd64-linux-tdep.c')
-rw-r--r--gdb/amd64-linux-tdep.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
index 0436610..cfe6e4b 100644
--- a/gdb/amd64-linux-tdep.c
+++ b/gdb/amd64-linux-tdep.c
@@ -1275,9 +1275,15 @@ amd64_linux_core_read_description (struct gdbarch *gdbarch,
switch ((xcr0 & I386_XSTATE_AVX_MASK))
{
case I386_XSTATE_AVX_MASK:
- return tdesc_amd64_avx_linux;
+ if (gdbarch_ptr_bit (gdbarch) == 32)
+ return tdesc_x32_avx_linux;
+ else
+ return tdesc_amd64_avx_linux;
default:
- return tdesc_amd64_linux;
+ if (gdbarch_ptr_bit (gdbarch) == 32)
+ return tdesc_x32_linux;
+ else
+ return tdesc_amd64_linux;
}
}