Automatic date update in version.in
[deliverable/binutils-gdb.git] / gdb / p-valprint.c
index 713a2889493e963fa41c5f723158145bc47a04d5..10612f3babe8ad82121136229f39d7790fcbb408 100644 (file)
@@ -38,7 +38,8 @@
 #include "cp-abi.h"
 #include "cp-support.h"
 #include "objfiles.h"
-#include "common/byte-vector.h"
+#include "gdbsupport/byte-vector.h"
+#include "cli/cli-style.h"
 \f
 
 /* Decorations for Pascal.  */
@@ -248,7 +249,6 @@ pascal_val_print (struct type *type,
              struct value *vt_val;
              struct symbol *wsym = NULL;
              struct type *wtype;
-             struct block *block = NULL;
 
              if (want_space)
                fputs_filtered (" ", stream);
@@ -257,7 +257,7 @@ pascal_val_print (struct type *type,
                {
                  const char *search_name
                    = MSYMBOL_SEARCH_NAME (msymbol.minsym);
-                 wsym = lookup_symbol_search_name (search_name, block,
+                 wsym = lookup_symbol_search_name (search_name, NULL,
                                                    VAR_DOMAIN).symbol;
                }
 
@@ -348,8 +348,7 @@ pascal_val_print (struct type *type,
       elttype = check_typedef (elttype);
       if (TYPE_STUB (elttype))
        {
-         fprintf_filtered (stream, "<incomplete type>");
-         gdb_flush (stream);
+         fprintf_styled (stream, metadata_style.style (), "<incomplete type>");
          break;
        }
       else
@@ -372,7 +371,7 @@ pascal_val_print (struct type *type,
        maybe_bad_bstring:
          if (bound_info < 0)
            {
-             fputs_filtered ("<error value>", stream);
+             fputs_styled ("<error value>", metadata_style.style (), stream);
              goto done;
            }
 
@@ -418,7 +417,6 @@ pascal_val_print (struct type *type,
       error (_("Invalid pascal type code %d in symbol table."),
             TYPE_CODE (type));
     }
-  gdb_flush (stream);
 }
 \f
 void
@@ -560,7 +558,7 @@ pascal_object_print_value_fields (struct type *type, const gdb_byte *valaddr,
                               options, dont_print_vb);
 
   if (!len && n_baseclasses == 1)
-    fprintf_filtered (stream, "<No data fields>");
+    fprintf_styled (stream, metadata_style.style (), "<No data fields>");
   else
     {
       struct obstack tmp_obstack = dont_print_statmem_obstack;
@@ -625,7 +623,8 @@ pascal_object_print_value_fields (struct type *type, const gdb_byte *valaddr,
                 order problems.  */
              if (TYPE_FIELD_IGNORE (type, i))
                {
-                 fputs_filtered ("<optimized out or zero length>", stream);
+                 fputs_styled ("<optimized out or zero length>",
+                               metadata_style.style (), stream);
                }
              else if (value_bits_synthetic_pointer (val,
                                                     TYPE_FIELD_BITPOS (type,
@@ -633,7 +632,8 @@ pascal_object_print_value_fields (struct type *type, const gdb_byte *valaddr,
                                                     TYPE_FIELD_BITSIZE (type,
                                                                         i)))
                {
-                 fputs_filtered (_("<synthetic pointer>"), stream);
+                 fputs_styled (_("<synthetic pointer>"),
+                               metadata_style.style (), stream);
                }
              else
                {
@@ -650,7 +650,8 @@ pascal_object_print_value_fields (struct type *type, const gdb_byte *valaddr,
            {
              if (TYPE_FIELD_IGNORE (type, i))
                {
-                 fputs_filtered ("<optimized out or zero length>", stream);
+                 fputs_styled ("<optimized out or zero length>",
+                               metadata_style.style (), stream);
                }
              else if (field_is_static (&TYPE_FIELD (type, i)))
                {
@@ -754,18 +755,17 @@ pascal_object_print_value (struct type *type, const gdb_byte *valaddr,
 
       thisoffset = offset;
 
-      TRY
+      try
        {
          boffset = baseclass_offset (type, i, valaddr, offset, address, val);
        }
-      CATCH (ex, RETURN_MASK_ERROR)
+      catch (const gdb_exception_error &ex)
        {
          if (ex.error == NOT_AVAILABLE_ERROR)
            skip = -1;
          else
            skip = 1;
        }
-      END_CATCH
 
       if (skip == 0)
        {
This page took 0.030021 seconds and 4 git commands to generate.