* sentinel-frame.c (sentinel_frame_prev_register): Do not call
[deliverable/binutils-gdb.git] / gdb / ada-typeprint.c
index 8532d6ab268e3131b586fe38e9796f3561ee355d..4b1f9ffc90d90b84bcb571f41ecff7f0cd15de43 100644 (file)
@@ -366,6 +366,9 @@ print_array_type (struct type *type, struct ui_file *stream, int show,
   int bitsize;
   int n_indices;
 
+  if (ada_is_packed_array_type (type))
+    type = ada_coerce_to_simple_array_type (type);
+
   bitsize = 0;
   fprintf_filtered (stream, "array (");
 
@@ -374,8 +377,6 @@ print_array_type (struct type *type, struct ui_file *stream, int show,
     fprintf_filtered (stream, "...");
   else
     {
-      if (ada_is_packed_array_type (type))
-       type = ada_coerce_to_simple_array_type (type);
       if (type == NULL)
         {
           fprintf_filtered (stream, _("<undecipherable array type>"));
@@ -753,7 +754,7 @@ ada_print_type (struct type *type0, char *varstring, struct ui_file *stream,
                int show, int level)
 {
   struct type *type = ada_check_typedef (ada_get_base_type (type0));
-  char *type_name = decoded_type_name (type);
+  char *type_name = decoded_type_name (type0);
   int is_var_decl = (varstring != NULL && varstring[0] != '\0');
 
   if (type == NULL)
@@ -782,7 +783,17 @@ ada_print_type (struct type *type0, char *varstring, struct ui_file *stream,
   if (ada_is_aligner_type (type))
     ada_print_type (ada_aligned_type (type), "", stream, show, level);
   else if (ada_is_packed_array_type (type))
-    print_array_type (type, stream, show, level);
+    {
+      if (TYPE_CODE (type) == TYPE_CODE_PTR)
+        {
+          fprintf_filtered (stream, "access ");
+          print_array_type (TYPE_TARGET_TYPE (type), stream, show, level);
+        }
+      else
+        {
+          print_array_type (type, stream, show, level);
+        }
+    }
   else
     switch (TYPE_CODE (type))
       {
This page took 0.023599 seconds and 4 git commands to generate.