gdb/rs6000: Use default gdbarch methods where possible
[deliverable/binutils-gdb.git] / gdb / cp-valprint.c
index 70b96970bed64ab43847c0940ce500db2d0acfb7..e883179dfade791664a7dc8ccc38d768051a900f 100644 (file)
@@ -35,7 +35,7 @@
 #include "language.h"
 #include "extension.h"
 #include "typeprint.h"
-#include "byte-vector.h"
+#include "common/byte-vector.h"
 
 /* Controls printing of vtbl's.  */
 static void
@@ -235,7 +235,11 @@ cp_print_value_fields (struct type *type, struct type *real_type,
            continue;
 
          if (fields_seen)
-           fprintf_filtered (stream, ", ");
+           {
+             fputs_filtered (",", stream);
+             if (!options->prettyformat)
+               fputs_filtered (" ", stream);
+           }
          else if (n_baseclasses > 0)
            {
              if (options->prettyformat)
@@ -244,7 +248,7 @@ cp_print_value_fields (struct type *type, struct type *real_type,
                  print_spaces_filtered (2 + 2 * recurse, stream);
                  fputs_filtered ("members of ", stream);
                  fputs_filtered (TYPE_NAME (type), stream);
-                 fputs_filtered (": ", stream);
+                 fputs_filtered (":", stream);
                }
            }
          fields_seen = 1;
@@ -316,18 +320,17 @@ cp_print_value_fields (struct type *type, struct type *real_type,
                {
                  struct value *v = NULL;
 
-                 TRY
+                 try
                    {
                      v = value_static_field (type, i);
                    }
 
-                 CATCH (ex, RETURN_MASK_ERROR)
+                 catch (const gdb_exception_error &ex)
                    {
                      fprintf_filtered (stream,
                                        _("<error reading variable: %s>"),
-                                       ex.message);
+                                       ex.what ());
                    }
-                 END_CATCH
 
                  cp_print_static_field (TYPE_FIELD_TYPE (type, i),
                                         v, stream, recurse + 1,
@@ -505,18 +508,17 @@ cp_print_value (struct type *type, struct type *real_type,
       thisoffset = offset;
       thistype = real_type;
 
-      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.024639 seconds and 4 git commands to generate.