Fix crash in dwarf2read.c with template parameters
[deliverable/binutils-gdb.git] / gdb / ada-valprint.c
index a4869198a44fcb0115f7c8365e130f44af3f6e18..5d7823d7204186afd43f87b9ec58fa381184d724 100644 (file)
@@ -1,6 +1,6 @@
 /* Support for printing Ada values for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2018 Free Software Foundation, Inc.
+   Copyright (C) 1986-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -465,7 +465,6 @@ ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream)
     default:
       error (_("Invalid type code in symbol table."));
     }
-  gdb_flush (stream);
 }
 
 /* Print the character string STRING, printing at most LENGTH characters.
@@ -1204,18 +1203,17 @@ ada_val_print (struct type *type,
               struct value *val,
               const struct value_print_options *options)
 {
-  TRY
+  try
     {
       ada_val_print_1 (type, embedded_offset, address,
                       stream, recurse, val, options,
                       current_language);
     }
-  CATCH (except, RETURN_MASK_ERROR)
+  catch (const gdb_exception_error &except)
     {
       fprintf_filtered (stream, _("<error reading variable: %s>"),
-                       except.message);
+                       except.what ());
     }
-  END_CATCH
 }
 
 void
@@ -1224,7 +1222,7 @@ ada_value_print (struct value *val0, struct ui_file *stream,
 {
   struct value *val = ada_to_fixed_value (val0);
   CORE_ADDR address = value_address (val);
-  struct type *type = ada_check_typedef (value_enclosing_type (val));
+  struct type *type = ada_check_typedef (value_type (val));
   struct value_print_options opts;
 
   /* If it is a pointer, indicate what it points to.  */
This page took 0.024937 seconds and 4 git commands to generate.