Add an optional "alias" attribute to syscall entries.
[deliverable/binutils-gdb.git] / gdb / cp-valprint.c
index 609dabb6606b5659bb7fac8a8ce1e8d5452bfbb3..3cece925938a1638f9458606b9c21085ada60e56 100644 (file)
@@ -1,6 +1,6 @@
 /* Support for printing C++ values for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2017 Free Software Foundation, Inc.
+   Copyright (C) 1986-2018 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -95,7 +95,7 @@ extern const char vtbl_ptr_name[] = "__vtbl_ptr_type";
 int
 cp_is_vtbl_ptr_type (struct type *type)
 {
-  const char *type_name = type_name_no_tag (type);
+  const char *type_name = TYPE_NAME (type);
 
   return (type_name != NULL && !strcmp (type_name, vtbl_ptr_name));
 }
@@ -243,7 +243,7 @@ cp_print_value_fields (struct type *type, struct type *real_type,
                  fprintf_filtered (stream, "\n");
                  print_spaces_filtered (2 + 2 * recurse, stream);
                  fputs_filtered ("members of ", stream);
-                 fputs_filtered (type_name_no_tag (type), stream);
+                 fputs_filtered (TYPE_NAME (type), stream);
                  fputs_filtered (": ", stream);
                }
            }
@@ -378,7 +378,7 @@ cp_print_value_fields (struct type *type, struct type *real_type,
 
          if (last_set_recurse != recurse)
            {
-             size_t obstack_final_size =
+             obstack_final_size =
                obstack_object_size (&dont_print_stat_array_obstack);
              
              if (obstack_final_size > stat_array_obstack_initial_size)
@@ -633,7 +633,8 @@ cp_print_static_field (struct type *type,
       return;
     }
 
-  if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
+  struct type *real_type = check_typedef (type);
+  if (TYPE_CODE (real_type) == TYPE_CODE_STRUCT)
     {
       CORE_ADDR *first_dont_print;
       CORE_ADDR addr;
@@ -658,7 +659,6 @@ cp_print_static_field (struct type *type,
       addr = value_address (val);
       obstack_grow (&dont_print_statmem_obstack, (char *) &addr,
                    sizeof (CORE_ADDR));
-      type = check_typedef (type);
       cp_print_value_fields (type, value_enclosing_type (val),
                             value_embedded_offset (val), addr,
                             stream, recurse, val,
@@ -666,7 +666,7 @@ cp_print_static_field (struct type *type,
       return;
     }
 
-  if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
+  if (TYPE_CODE (real_type) == TYPE_CODE_ARRAY)
     {
       struct type **first_dont_print;
       int i;
@@ -787,7 +787,7 @@ cp_print_class_member (const gdb_byte *valaddr, struct type *type,
       const char *name;
 
       fputs_filtered (prefix, stream);
-      name = type_name_no_tag (self_type);
+      name = TYPE_NAME (self_type);
       if (name)
        fputs_filtered (name, stream);
       else
This page took 0.024203 seconds and 4 git commands to generate.