Check gdbarch_ptr_bit for x32 core dump
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 11 May 2012 22:33:28 +0000 (22:33 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 11 May 2012 22:33:28 +0000 (22:33 +0000)
* amd64-linux-tdep.c (amd64_linux_core_read_description): Check
gdbarch_ptr_bit for x32 core dump.

gdb/ChangeLog
gdb/amd64-linux-tdep.c

index 29201a139c634be077960f56b82cc5fa9fcb3e95..919d52535ba2c232fc121375fc1b0afc4638f6ef 100644 (file)
@@ -1,3 +1,8 @@
+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
index 0436610eba7188eb9aaa926c8a1c9c8727be5f64..cfe6e4b61d7d38b6f49f18e71ac9bd843258bed1 100644 (file)
@@ -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;
     }
 }