diff options
author | Michael Tiemann <tiemann@cygnus> | 1992-01-27 08:51:16 +0000 |
---|---|---|
committer | Michael Tiemann <tiemann@cygnus> | 1992-01-27 08:51:16 +0000 |
commit | 7c4f3f4a2fa7be5fa31ab09ab53528f7e247e55d (patch) | |
tree | 14bd1f3f0358e725005c610b829290e3d9064bf2 | |
parent | 24b2fbdc543a7c51f9552a8607c88e50a61670a2 (diff) | |
download | gdb-7c4f3f4a2fa7be5fa31ab09ab53528f7e247e55d.zip gdb-7c4f3f4a2fa7be5fa31ab09ab53528f7e247e55d.tar.gz gdb-7c4f3f4a2fa7be5fa31ab09ab53528f7e247e55d.tar.bz2 |
Delete a superfluous space.
-rw-r--r-- | gdb/symtab.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index c05a9e1..b5e83a7 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -233,6 +233,7 @@ gdb_mangle_name (type, i, j) struct fn_field *f = TYPE_FN_FIELDLIST1 (type, i); struct fn_field *method = &f[j]; char *field_name = TYPE_FN_FIELDLIST_NAME (type, i); + int is_constructor = strcmp(field_name, TYPE_NAME (type)) == 0; /* Need a new type prefix. */ char *strchr (); @@ -243,7 +244,7 @@ gdb_mangle_name (type, i, j) int len = strlen (newname); sprintf (buf, "__%s%s%d", const_prefix, volatile_prefix, len); - mangled_name_len = (strlen (field_name) + mangled_name_len = ((is_constructor ? 0 : strlen (field_name)) + strlen (buf) + len + strlen (TYPE_FN_FIELD_PHYSNAME (f, j)) + 1); @@ -265,7 +266,10 @@ gdb_mangle_name (type, i, j) else { mangled_name = (char *)xmalloc (mangled_name_len); - strcpy (mangled_name, TYPE_FN_FIELDLIST_NAME (type, i)); + if (is_constructor) + mangled_name[0] = '\0'; + else + strcpy (mangled_name, field_name); } strcat (mangled_name, buf); strcat (mangled_name, newname); @@ -577,6 +581,9 @@ check_stub_method (type, i, j) struct type **argtypes; struct type *mtype; + if (demangled_name == NULL) + error ("Internal: Cannot demangle mangled name `%s'.", mangled_name); + /* Now, read in the parameters that define this type. */ argtypetext = strchr (demangled_name, '(') + 1; p = argtypetext; @@ -1031,7 +1038,7 @@ lookup_symbol (name, block, namespace, is_a_field_of_this, symtab) /* Now search all per-file blocks for static mangled symbols. Do the symtabs first, then check the psymtabs. */ - if (namespace == VAR_NAMESPACE) + if (namespace == VAR_NAMESPACE) { for (s = symtab_list; s; s = s->next) { @@ -2686,7 +2693,7 @@ init_type (code, length, uns, name) /* C++ fancies. */ if (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION) - TYPE_CPLUS_SPECIFIC(type) = &cplus_struct_default; + INIT_CPLUS_SPECIFIC(type); return type; } |