* gdbtypes.h (struct main_type): Change type of name,tag_name,
[deliverable/binutils-gdb.git] / gdb / gnu-v2-abi.c
index de6f80aa484833de3ad5a68bc7cf6a8976331f89..e635e8f1a8a7a3affd4a6bc2c6578835a8471d78 100644 (file)
@@ -194,6 +194,7 @@ gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc)
   CORE_ADDR vtbl;
   struct minimal_symbol *minsym;
   char *demangled_name, *p;
+  const char *linkage_name;
   struct type *btype;
   struct type *known_type_vptr_basetype;
   int known_type_vptr_fieldno;
@@ -246,12 +247,12 @@ gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc)
   /* Try to find a symbol that is the vtable.  */
   minsym=lookup_minimal_symbol_by_pc(vtbl);
   if (minsym==NULL
-      || (demangled_name=SYMBOL_LINKAGE_NAME (minsym))==NULL
-      || !is_vtable_name (demangled_name))
+      || (linkage_name=SYMBOL_LINKAGE_NAME (minsym))==NULL
+      || !is_vtable_name (linkage_name))
     return NULL;
 
   /* If we just skip the prefix, we get screwed by namespaces.  */
-  demangled_name=cplus_demangle(demangled_name,DMGL_PARAMS|DMGL_ANSI);
+  demangled_name=cplus_demangle(linkage_name,DMGL_PARAMS|DMGL_ANSI);
   p = strchr (demangled_name, ' ');
   if (p)
     *p = '\0';
@@ -297,8 +298,8 @@ static int
 vb_match (struct type *type, int index, struct type *basetype)
 {
   struct type *fieldtype;
-  char *name = TYPE_FIELD_NAME (type, index);
-  char *field_class_name = NULL;
+  const char *name = TYPE_FIELD_NAME (type, index);
+  const char *field_class_name = NULL;
 
   if (*name != '_')
     return 0;
This page took 0.0259 seconds and 4 git commands to generate.