replace_typedefs: handle templates in namespaces
[deliverable/binutils-gdb.git] / gdb / p-valprint.c
index 8172e049233ca5731fdaa8ef58517479753a5587..cf902ac7fbe1758ae2442887ae69e11f7625ca75 100644 (file)
@@ -423,9 +423,9 @@ pascal_value_print (struct value *val, struct ui_file *stream,
       /* Hack:  remove (char *) for char strings.  Their
          type is indicated by the quoted string anyway.  */
       if (type->code () == TYPE_CODE_PTR
-         && TYPE_NAME (type) == NULL
-         && TYPE_NAME (TYPE_TARGET_TYPE (type)) != NULL
-         && strcmp (TYPE_NAME (TYPE_TARGET_TYPE (type)), "char") == 0)
+         && type->name () == NULL
+         && TYPE_TARGET_TYPE (type)->name () != NULL
+         && strcmp (TYPE_TARGET_TYPE (type)->name (), "char") == 0)
        {
          /* Print nothing.  */
        }
@@ -469,7 +469,7 @@ const char pascal_vtbl_ptr_name[] =
 int
 pascal_object_is_vtbl_ptr_type (struct type *type)
 {
-  const char *type_name = TYPE_NAME (type);
+  const char *type_name = type->name ();
 
   return (type_name != NULL
          && strcmp (type_name, pascal_vtbl_ptr_name) == 0);
@@ -524,7 +524,7 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream,
   struct type *type = check_typedef (value_type (val));
 
   fprintf_filtered (stream, "{");
-  len = TYPE_NFIELDS (type);
+  len = type->num_fields ();
   n_baseclasses = TYPE_N_BASECLASSES (type);
 
   /* Print out baseclasses such that we don't print
@@ -553,7 +553,7 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream,
        {
          /* If requested, skip printing of static fields.  */
          if (!options->pascal_static_field_print
-             && field_is_static (&TYPE_FIELD (type, i)))
+             && field_is_static (&type->field (i)))
            continue;
          if (fields_seen)
            fprintf_filtered (stream, ", ");
@@ -564,7 +564,7 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream,
                  fprintf_filtered (stream, "\n");
                  print_spaces_filtered (2 + 2 * recurse, stream);
                  fputs_filtered ("members of ", stream);
-                 fputs_filtered (TYPE_NAME (type), stream);
+                 fputs_filtered (type->name (), stream);
                  fputs_filtered (": ", stream);
                }
            }
@@ -582,7 +582,7 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream,
 
          annotate_field_begin (TYPE_FIELD_TYPE (type, i));
 
-         if (field_is_static (&TYPE_FIELD (type, i)))
+         if (field_is_static (&type->field (i)))
            {
              fputs_filtered ("static ", stream);
              fprintf_symbol_filtered (stream,
@@ -597,7 +597,7 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream,
          fputs_filtered (" = ", stream);
          annotate_field_value ();
 
-         if (!field_is_static (&TYPE_FIELD (type, i))
+         if (!field_is_static (&type->field (i))
              && TYPE_FIELD_PACKED (type, i))
            {
              struct value *v;
@@ -636,7 +636,7 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream,
                  fputs_styled ("<optimized out or zero length>",
                                metadata_style.style (), stream);
                }
-             else if (field_is_static (&TYPE_FIELD (type, i)))
+             else if (field_is_static (&type->field (i)))
                {
                  /* struct value *v = value_static_field (type, i);
                     v4.17 specific.  */
@@ -710,7 +710,7 @@ pascal_object_print_value (struct value *val, struct ui_file *stream,
     {
       LONGEST boffset = 0;
       struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
-      const char *basename = TYPE_NAME (baseclass);
+      const char *basename = baseclass->name ();
       int skip = 0;
 
       if (BASETYPE_VIA_VIRTUAL (type, i))
This page took 0.0265 seconds and 4 git commands to generate.