jit: c++-ify gdb_block
[deliverable/binutils-gdb.git] / gdb / p-typeprint.c
index f82a2bc981dbe41bbd4c11dfb51c5cb7e81a600b..f501aad549b97b7a206e24cf426e8e14556d47ac 100644 (file)
@@ -1,5 +1,5 @@
 /* Support for printing Pascal types for GDB, the GNU debugger.
-   Copyright (C) 2000-2018 Free Software Foundation, Inc.
+   Copyright (C) 2000-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -32,6 +32,7 @@
 #include "typeprint.h"
 #include "gdb-demangle.h"
 #include <ctype.h>
+#include "cli/cli-style.h"
 
 static void pascal_type_print_varspec_suffix (struct type *, struct ui_file *,
                                              int, int, int,
@@ -98,9 +99,9 @@ pascal_print_typedef (struct type *type, struct symbol *new_symbol,
 {
   type = check_typedef (type);
   fprintf_filtered (stream, "type ");
-  fprintf_filtered (stream, "%s = ", SYMBOL_PRINT_NAME (new_symbol));
+  fprintf_filtered (stream, "%s = ", new_symbol->print_name ());
   type_print (type, "", stream, 0);
-  fprintf_filtered (stream, ";\n");
+  fprintf_filtered (stream, ";");
 }
 
 /* If TYPE is a derived type, then print out derivation information.
@@ -139,7 +140,7 @@ pascal_type_print_derivation_info (struct ui_file *stream, struct type *type)
       fprintf_filtered (stream, "%s%s ",
                        BASETYPE_VIA_PUBLIC (type, i) ? "public" : "private",
                        BASETYPE_VIA_VIRTUAL (type, i) ? " virtual" : "");
-      name = type_name_no_tag (TYPE_BASECLASS (type, i));
+      name = TYPE_NAME (TYPE_BASECLASS (type, i));
       fprintf_filtered (stream, "%s", name ? name : "(null)");
     }
   if (i > 0)
@@ -470,7 +471,7 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show,
   wrap_here ("    ");
   if (type == NULL)
     {
-      fputs_filtered ("<type unknown>", stream);
+      fputs_styled ("<type unknown>", metadata_style.style (), stream);
       return;
     }
 
@@ -827,8 +828,9 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show,
        {
          /* At least for dump_symtab, it is important that this not be
             an error ().  */
-         fprintf_filtered (stream, "<invalid unnamed pascal type code %d>",
-                           TYPE_CODE (type));
+         fprintf_styled (stream, metadata_style.style (),
+                         "<invalid unnamed pascal type code %d>",
+                         TYPE_CODE (type));
        }
       break;
     }
This page took 0.034674 seconds and 4 git commands to generate.