+Mon Jan 20 08:54:00 1992 Michael Tiemann (tiemann at cygnus.com)
+
+ * cplus-dem.c (cplus_demangle): Correctly demangle destructors.
+
Sat Jan 18 17:17:45 1992 Stu Grossman (grossman at cygnus.com)
* Makefile.in (HFILES): Add partial-stab.h.
if (nfn_fields)
{
- TYPE_FN_FIELDLISTS (type) = (struct fn_fieldlist *)
+ TYPE_FN_FIELDLISTS (type) = (struct fn_fieldlist *)
obstack_alloc (symbol_obstack,
sizeof (struct fn_fieldlist) * nfn_fields);
TYPE_NFN_FIELDS (type) = nfn_fields;
/* destructor */
if (type[0] == '_' && type[1] == CPLUS_MARKER && type[2] == '_')
{
- int n = (strlen (type) - 3)*2 + 3 + 2 + 1;
- char *tem = (char *) xmalloc (n);
- strcpy (tem, type + 3);
+ int n;
+ char *tem;
+
+ type += 3; /* Get past _$_ at front. */
+ while (isdigit (*type))
+ /* If there are digits at the front, it's because
+ of new 2.0 name mangling. Just skip them. */
+ type++;
+
+ n = strlen (type)*2 + 3 + 2 + 1;
+ tem = (char *) xmalloc (n);
+ strcpy (tem, type);
strcat (tem, "::~");
- strcat (tem, type + 3);
+ strcat (tem, type);
if (print_arg_types)
strcat (tem, "()");
return tem;