Add extern_protected_data and set it for x86
[deliverable/binutils-gdb.git] / gdb / cp-valprint.c
index 0ddc96e78bd149b3432f010959621c5c2f8f327f..feb3a66721877064b9212fc2e8a5f14727735943 100644 (file)
@@ -313,18 +313,21 @@ cp_print_value_fields (struct type *type, struct type *real_type,
                }
              else if (field_is_static (&TYPE_FIELD (type, i)))
                {
-                 volatile struct gdb_exception ex;
                  struct value *v = NULL;
 
-                 TRY_CATCH (ex, RETURN_MASK_ERROR)
+                 TRY
                    {
                      v = value_static_field (type, i);
                    }
 
-                 if (ex.reason < 0)
-                   fprintf_filtered (stream,
-                                     _("<error reading variable: %s>"),
-                                     ex.message);
+                 CATCH (ex, RETURN_MASK_ERROR)
+                   {
+                     fprintf_filtered (stream,
+                                       _("<error reading variable: %s>"),
+                                       ex.message);
+                   }
+                 END_CATCH
+
                  cp_print_static_field (TYPE_FIELD_TYPE (type, i),
                                         v, stream, recurse + 1,
                                         options);
@@ -481,12 +484,11 @@ cp_print_value (struct type *type, struct type *real_type,
   for (i = 0; i < n_baseclasses; i++)
     {
       int boffset = 0;
-      int skip;
+      int skip = 0;
       struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
       const char *basename = TYPE_NAME (baseclass);
       const gdb_byte *base_valaddr = NULL;
       const struct value *base_val = NULL;
-      volatile struct gdb_exception ex;
 
       if (BASETYPE_VIA_VIRTUAL (type, i))
        {
@@ -506,18 +508,21 @@ cp_print_value (struct type *type, struct type *real_type,
       thisoffset = offset;
       thistype = real_type;
 
-      TRY_CATCH (ex, RETURN_MASK_ERROR)
+      TRY
        {
          boffset = baseclass_offset (type, i, valaddr, offset, address, val);
        }
-      if (ex.reason < 0 && ex.error == NOT_AVAILABLE_ERROR)
-       skip = -1;
-      else if (ex.reason < 0)
-       skip = 1;
-      else
-       {
-         skip = 0;
+      CATCH (ex, RETURN_MASK_ERROR)
+       {
+         if (ex.error == NOT_AVAILABLE_ERROR)
+           skip = -1;
+         else
+           skip = 1;
+       }
+      END_CATCH
 
+      if (skip == 0)
+       {
          if (BASETYPE_VIA_VIRTUAL (type, i))
            {
              /* The virtual base class pointer might have been
This page took 0.031193 seconds and 4 git commands to generate.