Add a TRY_CATCH to get_prev_frame_always to better manage errors during unwind.
[deliverable/binutils-gdb.git] / gdb / amd64-linux-nat.c
index b72bb8467bcc6a97d3293257b83b0e631ac1b447..06199af4f551783cb8e71afe0f21dd7a2327d277 100644 (file)
@@ -100,9 +100,11 @@ static int amd64_linux_gregset32_reg_offset[] =
   -1, -1, -1, -1, -1, -1, -1, -1,
   -1, -1, -1, -1, -1, -1, -1, -1, -1,
   -1, -1, -1, -1, -1, -1, -1, -1,
-  -1, -1, -1, -1,              /* MPX registers BND0 ... BND3.  */
-  -1, -1,                      /* MPX registers BNDCFGU, BNDSTATUS.  */
-  ORIG_RAX * 8,                        /* "orig_eax" */
+  -1, -1, -1, -1,                /* MPX registers BND0 ... BND3.  */
+  -1, -1,                        /* MPX registers BNDCFGU, BNDSTATUS.  */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* k0 ... k7 (AVX512)  */
+  -1, -1, -1, -1, -1, -1, -1, -1, /* zmm0 ... zmm7 (AVX512)  */
+  ORIG_RAX * 8                   /* "orig_eax"  */
 };
 \f
 
@@ -1101,6 +1103,17 @@ amd64_linux_read_description (struct target_ops *ops)
     {
       switch (xcr0 & I386_XSTATE_ALL_MASK)
        {
+      case I386_XSTATE_MPX_AVX512_MASK:
+      case I386_XSTATE_AVX512_MASK:
+       if (is_64bit)
+         {
+           if (is_x32)
+             return tdesc_x32_avx512_linux;
+           else
+             return tdesc_amd64_avx512_linux;
+         }
+       else
+         return tdesc_i386_avx512_linux;
        case I386_XSTATE_MPX_MASK:
          if (is_64bit)
            {
@@ -1184,12 +1197,22 @@ amd64_linux_disable_btrace (struct target_ops *self,
 /* Teardown branch tracing.  */
 
 static void
-amd64_linux_teardown_btrace (struct btrace_target_info *tinfo)
+amd64_linux_teardown_btrace (struct target_ops *self,
+                            struct btrace_target_info *tinfo)
 {
   /* Ignore errors.  */
   linux_disable_btrace (tinfo);
 }
 
+static enum btrace_error
+amd64_linux_read_btrace (struct target_ops *self,
+                        VEC (btrace_block_s) **data,
+                        struct btrace_target_info *btinfo,
+                        enum btrace_read_type type)
+{
+  return linux_read_btrace (data, btinfo, type);
+}
+
 /* Provide a prototype to silence -Wmissing-prototypes.  */
 void _initialize_amd64_linux_nat (void);
 
@@ -1233,7 +1256,7 @@ _initialize_amd64_linux_nat (void)
   t->to_enable_btrace = amd64_linux_enable_btrace;
   t->to_disable_btrace = amd64_linux_disable_btrace;
   t->to_teardown_btrace = amd64_linux_teardown_btrace;
-  t->to_read_btrace = linux_read_btrace;
+  t->to_read_btrace = amd64_linux_read_btrace;
 
   /* Register the target.  */
   linux_nat_add_target (t);
This page took 0.023996 seconds and 4 git commands to generate.