Use gdb_bfd_sections in get_stap_base_address
[deliverable/binutils-gdb.git] / gdb / f-typeprint.c
index f09a4b1f21bfe2da4df7ce74f30f115b7da1f4c8..577ed3b9d2487ee18e532abb36aac4eb3f26a909 100644 (file)
@@ -196,11 +196,11 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
       else if (type_not_allocated (type))
        print_rank_only = true;
       else if ((TYPE_ASSOCIATED_PROP (type)
-               && PROP_CONST != TYPE_DYN_PROP_KIND (TYPE_ASSOCIATED_PROP (type)))
+               && PROP_CONST != TYPE_ASSOCIATED_PROP (type)->kind ())
               || (TYPE_ALLOCATED_PROP (type)
-                  && PROP_CONST != TYPE_DYN_PROP_KIND (TYPE_ALLOCATED_PROP (type)))
+                  && PROP_CONST != TYPE_ALLOCATED_PROP (type)->kind ())
               || (TYPE_DATA_LOCATION (type)
-                  && PROP_CONST != TYPE_DYN_PROP_KIND (TYPE_DATA_LOCATION (type))))
+                  && PROP_CONST != TYPE_DATA_LOCATION (type)->kind ()))
        {
          /* This case exist when we ptype a typename which has the dynamic
             properties but cannot be resolved as there is no object.  */
@@ -223,7 +223,7 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
          /* Make sure that, if we have an assumed size array, we
               print out a warning and print the upperbound as '*'.  */
 
-         if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
+         if (type->bounds ()->high.kind () == PROP_UNDEFINED)
            fprintf_filtered (stream, "*");
          else
            {
@@ -262,7 +262,7 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
        if (passed_a_ptr)
          fprintf_filtered (stream, ") ");
        fprintf_filtered (stream, "(");
-       if (nfields == 0 && TYPE_PROTOTYPED (type))
+       if (nfields == 0 && type->is_prototyped ())
          f_print_type (builtin_f_type (get_type_arch (type))->builtin_void,
                        "", stream, -1, 0, 0);
        else
@@ -406,16 +406,20 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show,
       break;
 
     case TYPE_CODE_STRING:
-      /* Strings may have dynamic upperbounds (lengths) like arrays.  */
+      /* Strings may have dynamic upperbounds (lengths) like arrays.  We
+        check specifically for the PROP_CONST case to indicate that the
+        dynamic type has been resolved.  If we arrive here having been
+        asked to print the type of a value with a dynamic type then the
+        bounds will not have been resolved.  */
 
-      if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
-       fprintfi_filtered (level, stream, "character*(*)");
-      else
+      if (type->bounds ()->high.kind () == PROP_CONST)
        {
          LONGEST upper_bound = f77_get_upperbound (type);
 
          fprintf_filtered (stream, "character*%s", pulongest (upper_bound));
        }
+      else
+       fprintfi_filtered (level, stream, "character*(*)");
       break;
 
     case TYPE_CODE_STRUCT:
This page took 0.024032 seconds and 4 git commands to generate.