* configure.ac: Use AC_CHECK_DECLS instead of gcc_AC_CHECK_DECLS
[deliverable/binutils-gdb.git] / gdb / ada-typeprint.c
index fb9c690f8202355ed67197eae91279b7d43817b9..39a47f97aad4ae3c521d08097db3989a4bfccaac 100644 (file)
@@ -124,6 +124,7 @@ void
 ada_typedef_print (struct type *type, struct symbol *new,
                   struct ui_file *stream)
 {
+   /* XXX: type_sprint */
   fprintf_filtered (stream, "type %.*s is ",
                    ada_name_prefix_len (SYMBOL_PRINT_NAME (new)),
                    SYMBOL_PRINT_NAME (new));
@@ -149,7 +150,7 @@ print_range (struct type *type, struct ui_file *stream)
     case TYPE_CODE_ENUM:
       break;
     default:
-      target_type = builtin_type_ada_int;
+      target_type = builtin_type_int;
       break;
     }
 
@@ -632,12 +633,12 @@ print_record_type (struct type *type0, struct ui_file *stream, int show,
 
   parent_type = ada_parent_type (type);
   if (ada_type_name (parent_type) != NULL)
-    fprintf_filtered (stream, "new %s with ",
+    fprintf_filtered (stream, "new %s with record",
                      decoded_type_name (parent_type));
   else if (parent_type == NULL && ada_is_tagged_type (type, 0))
-    fprintf_filtered (stream, "tagged ");
-
-  fprintf_filtered (stream, "record");
+    fprintf_filtered (stream, "tagged record");
+  else
+    fprintf_filtered (stream, "record");
 
   if (show < 0)
     fprintf_filtered (stream, " ... end record");
@@ -654,7 +655,7 @@ print_record_type (struct type *type0, struct ui_file *stream, int show,
       if (flds > 0)
        fprintf_filtered (stream, "\n%*send record", level, "");
       else if (flds < 0)
-       fprintf_filtered (stream, " <incomplete type> end record");
+       fprintf_filtered (stream, _(" <incomplete type> end record"));
       else
        fprintf_filtered (stream, " null; end record");
     }
@@ -668,17 +669,15 @@ static void
 print_unchecked_union_type (struct type *type, struct ui_file *stream,
                            int show, int level)
 {
-  fprintf_filtered (stream, "record (?) is");
-
   if (show < 0)
-    fprintf_filtered (stream, " ... end record");
+    fprintf_filtered (stream, "record (?) is ... end record");
   else if (TYPE_NFIELDS (type) == 0)
-    fprintf_filtered (stream, " null; end record");
+    fprintf_filtered (stream, "record (?) is null; end record");
   else
     {
       int i;
 
-      fprintf_filtered (stream, "\n%*scase ? is", level + 4, "");
+      fprintf_filtered (stream, "record (?) is\n%*scase ? is", level + 4, "");
 
       for (i = 0; i < TYPE_NFIELDS (type); i += 1)
        {
@@ -754,7 +753,7 @@ void
 ada_print_type (struct type *type0, char *varstring, struct ui_file *stream,
                int show, int level)
 {
-  struct type *type = ada_completed_type (ada_get_base_type (type0));
+  struct type *type = ada_check_typedef (ada_get_base_type (type0));
   char *type_name = decoded_type_name (type);
   int is_var_decl = (varstring != NULL && varstring[0] != '\0');
 
@@ -768,7 +767,7 @@ ada_print_type (struct type *type0, char *varstring, struct ui_file *stream,
     }
 
   if (show > 0)
-    CHECK_TYPEDEF (type);
+    type = ada_check_typedef (type);
 
   if (is_var_decl && TYPE_CODE (type) != TYPE_CODE_FUNC)
     fprintf_filtered (stream, "%.*s: ",
This page took 0.024445 seconds and 4 git commands to generate.