Catch and ignore empty, ineffectual alignment frags when deciding if a
[deliverable/binutils-gdb.git] / gdb / gdbtypes.c
index 73966f06d91ddbf3337cb046ae7e1f6325fcd1bb..ee191cdd0bb239e47ff7e548028d8ddd711efd1f 100644 (file)
@@ -35,6 +35,7 @@
 #include "complaints.h"
 #include "gdbcmd.h"
 #include "wrapper.h"
+#include "cp-abi.h"
 
 /* These variables point to the objects
    representing the predefined C data types.  */
@@ -1027,7 +1028,7 @@ get_destructor_fn_field (struct type *t, int *method_indexp, int *field_indexp)
 
       for (j = 0; j < TYPE_FN_FIELDLIST_LENGTH (t, i); j++)
        {
-         if (DESTRUCTOR_PREFIX_P (TYPE_FN_FIELD_PHYSNAME (f, j)))
+         if (is_destructor_name (TYPE_FN_FIELD_PHYSNAME (f, j)) != 0)
            {
              *method_indexp = i;
              *field_indexp = j;
@@ -1350,8 +1351,7 @@ cfront_mangle_name (struct type *type, int i, int j)
          }
       ADD_EXTRA ('\0')
        printf ("add_mangled_type: %s\n", extras.str);  /* FIXME */
-      arm_mangled_name = malloc (strlen (mangled_name) + extras.len);
-      sprintf (arm_mangled_name, "%s%s", mangled_name, extras.str);
+      xasprintf (&arm_mangled_name, "%s%s", mangled_name, extras.str);
       xfree (mangled_name);
       mangled_name = arm_mangled_name;
     }
@@ -1410,6 +1410,8 @@ check_stub_method (struct type *type, int method_id, int signature_id)
   /* Make sure we got back a function string that we can use.  */
   if (demangled_name)
     p = strchr (demangled_name, '(');
+  else
+    p = NULL;
 
   if (demangled_name == NULL || p == NULL)
     error ("Internal: Cannot demangle mangled name `%s'.", mangled_name);
@@ -1903,12 +1905,12 @@ virtual_base_index (struct type *base, struct type *dclass)
     return -1;
 
   i = 0;
-  vbase = TYPE_VIRTUAL_BASE_LIST (dclass)[0];
+  vbase = virtual_base_list (dclass)[0];
   while (vbase)
     {
       if (vbase == base)
        break;
-      vbase = TYPE_VIRTUAL_BASE_LIST (dclass)[++i];
+      vbase = virtual_base_list (dclass)[++i];
     }
 
   return vbase ? i : -1;
@@ -1937,14 +1939,14 @@ virtual_base_index_skip_primaries (struct type *base, struct type *dclass)
 
   j = -1;
   i = 0;
-  vbase = TYPE_VIRTUAL_BASE_LIST (dclass)[0];
+  vbase = virtual_base_list (dclass)[0];
   while (vbase)
     {
       if (!primary || (virtual_base_index_skip_primaries (vbase, primary) < 0))
        j++;
       if (vbase == base)
        break;
-      vbase = TYPE_VIRTUAL_BASE_LIST (dclass)[++i];
+      vbase = virtual_base_list (dclass)[++i];
     }
 
   return vbase ? j : -1;
This page took 0.024181 seconds and 4 git commands to generate.