aboutsummaryrefslogtreecommitdiff
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
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.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/amd64-linux-tdep.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 29201a1..919d525 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
+ * amd64-linux-tdep.c (amd64_linux_core_read_description): Check
+ gdbarch_ptr_bit for x32 core dump.
+
+2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
+
* amd64-linux-tdep.c: Include features/i386/x32-linux.c
and features/i386/x32-avx-linux.c.
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;
}
}