ld: fix regressions with rett instructions in sparc tests.
[deliverable/binutils-gdb.git] / gdb / p-typeprint.c
index 30d40d788da416a6af91d5b84e88e2c39ff31e83..d08f6f792f64039d830ab71a440350834c1430c9 100644 (file)
@@ -1,5 +1,5 @@
 /* Support for printing Pascal types for GDB, the GNU debugger.
-   Copyright (C) 2000-2013 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -31,8 +31,6 @@
 #include "p-lang.h"
 #include "typeprint.h"
 #include "gdb-demangle.h"
-#include "gdb_string.h"
-#include <errno.h>
 #include <ctype.h>
 
 static void pascal_type_print_varspec_suffix (struct type *, struct ui_file *,
@@ -57,7 +55,7 @@ pascal_print_type (struct type *type, const char *varstring,
   code = TYPE_CODE (type);
 
   if (show > 0)
-    CHECK_TYPEDEF (type);
+    type = check_typedef (type);
 
   if ((code == TYPE_CODE_FUNC
        || code == TYPE_CODE_METHOD))
@@ -98,7 +96,7 @@ void
 pascal_print_typedef (struct type *type, struct symbol *new_symbol,
                      struct ui_file *stream)
 {
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
   fprintf_filtered (stream, "type ");
   fprintf_filtered (stream, "%s = ", SYMBOL_PRINT_NAME (new_symbol));
   type_print (type, "", stream, 0);
@@ -156,8 +154,8 @@ void
 pascal_type_print_method_args (const char *physname, const char *methodname,
                               struct ui_file *stream)
 {
-  int is_constructor = (strncmp (physname, "__ct__", 6) == 0);
-  int is_destructor = (strncmp (physname, "__dt__", 6) == 0);
+  int is_constructor = (startswith (physname, "__ct__"));
+  int is_destructor = (startswith (physname, "__dt__"));
 
   if (is_constructor || is_destructor)
     {
@@ -241,7 +239,7 @@ pascal_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
       if (passed_a_ptr)
        {
          fprintf_filtered (stream, " ");
-         pascal_type_print_base (TYPE_DOMAIN_TYPE (type),
+         pascal_type_print_base (TYPE_SELF_TYPE (type),
                                  stream, 0, passed_a_ptr, flags);
          fprintf_filtered (stream, "::");
        }
@@ -481,7 +479,7 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show,
       return;
     }
 
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   switch (TYPE_CODE (type))
     {
@@ -569,7 +567,7 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show,
            {
              QUIT;
              /* Don't print out virtual function table.  */
-             if ((strncmp (TYPE_FIELD_NAME (type, i), "_vptr", 5) == 0)
+             if ((startswith (TYPE_FIELD_NAME (type, i), "_vptr"))
                  && is_cplus_marker ((TYPE_FIELD_NAME (type, i))[5]))
                continue;
 
@@ -645,8 +643,8 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show,
                {
                  const char *physname = TYPE_FN_FIELD_PHYSNAME (f, j);
 
-                 int is_constructor = (strncmp (physname, "__ct__", 6) == 0);
-                 int is_destructor = (strncmp (physname, "__dt__", 6) == 0);
+                 int is_constructor = (startswith (physname, "__ct__"));
+                 int is_destructor = (startswith (physname, "__dt__"));
 
                  QUIT;
                  if (TYPE_FN_FIELD_PROTECTED (f, j))
This page took 0.025031 seconds and 4 git commands to generate.