gdb/rs6000: Use default gdbarch methods where possible
[deliverable/binutils-gdb.git] / gdb / cp-valprint.c
index f6e7e538679471284f577bc47a9c7493618fbe9e..e883179dfade791664a7dc8ccc38d768051a900f 100644 (file)
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-
-/* Local non-gdb includes.  */
+#include "gdb_obstack.h"
+#include "symtab.h"
+#include "gdbtypes.h"
+#include "expression.h"
+#include "value.h"
+#include "command.h"
+#include "gdbcmd.h"
+#include "demangle.h"
 #include "annotate.h"
 #include "c-lang.h"
-#include "command.h"
-#include "common/byte-vector.h"
+#include "target.h"
 #include "cp-abi.h"
+#include "valprint.h"
 #include "cp-support.h"
-#include "demangle.h"
-#include "expression.h"
-#include "extension.h"
-#include "gdb_obstack.h"
-#include "gdbcmd.h"
-#include "gdbtypes.h"
 #include "language.h"
-#include "symtab.h"
-#include "target.h"
+#include "extension.h"
 #include "typeprint.h"
-#include "valprint.h"
-#include "value.h"
+#include "common/byte-vector.h"
 
 /* Controls printing of vtbl's.  */
 static void
@@ -322,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,
@@ -511,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.025849 seconds and 4 git commands to generate.