* write.c (relax_segment <rs_space>): Calculate growth using
[deliverable/binutils-gdb.git] / gdb / gdbtypes.c
index d97ba1bec79eae6bfe9961e2eb7e02837d547150..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;
@@ -1165,7 +1166,6 @@ check_typedef (register struct type *type)
 }
 
 /* New code added to support parsing of Cfront stabs strings */
-#include <ctype.h>
 #define INIT_EXTRA { pextras->len=0; pextras->str[0]='\0'; }
 #define ADD_EXTRA(c) { pextras->str[pextras->len++]=c; }
 
@@ -1351,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;
     }
@@ -1411,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);
@@ -1904,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;
@@ -1938,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.024544 seconds and 4 git commands to generate.