[PowerPC] Fix indentation in arch/ppc-linux-common.c
[deliverable/binutils-gdb.git] / gdb / f-typeprint.c
index 9d9a1f30b9fa9a19feed68563b8b9d7082695ee6..3f13c111ac560677a647cc1f984d07043ee28b85 100644 (file)
@@ -1,6 +1,6 @@
 /* Support for printing Fortran types for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2017 Free Software Foundation, Inc.
+   Copyright (C) 1986-2018 Free Software Foundation, Inc.
 
    Contributed by Motorola.  Adapted from the C version by Farooq Butt
    (fmbutt@engage.sps.mot.com).
@@ -290,7 +290,12 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show,
 
   if ((show <= 0) && (TYPE_NAME (type) != NULL))
     {
-      fprintfi_filtered (level, stream, "%s", TYPE_NAME (type));
+      const char *prefix = "";
+      if (TYPE_CODE (type) == TYPE_CODE_UNION)
+       prefix = "Type, C_Union :: ";
+      else if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
+       prefix = "Type ";
+      fprintfi_filtered (level, stream, "%s%s", prefix, TYPE_NAME (type));
       return;
     }
 
@@ -370,7 +375,7 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show,
        fprintfi_filtered (level, stream, "Type, C_Union :: ");
       else
        fprintfi_filtered (level, stream, "Type ");
-      fputs_filtered (TYPE_TAG_NAME (type), stream);
+      fputs_filtered (TYPE_NAME (type), stream);
       /* According to the definition,
          we only print structure elements in case show > 0.  */
       if (show > 0)
@@ -387,12 +392,12 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show,
              fputs_filtered ("\n", stream);
            }
          fprintfi_filtered (level, stream, "End Type ");
-         fputs_filtered (TYPE_TAG_NAME (type), stream);
+         fputs_filtered (TYPE_NAME (type), stream);
        }
       break;
 
     case TYPE_CODE_MODULE:
-      fprintfi_filtered (level, stream, "module %s", TYPE_TAG_NAME (type));
+      fprintfi_filtered (level, stream, "module %s", TYPE_NAME (type));
       break;
 
     default_case:
This page took 0.024294 seconds and 4 git commands to generate.