Problem:
Functions/Methods with args with scopes don't get printed correctly.
Best regards,
Matthias Riese
Patch:
diff -Naur gdb-4.18-vanilla/gdb/c-typeprint.c gdb-4.18/gdb/c-typeprint.c
--- gdb-4.18-vanilla/gdb/c-typeprint.c Thu Mar 4 22:31:45 1999
+++ gdb-4.18/gdb/c-typeprint.c Mon Oct 11 13:31:20 1999
@@ -910,15 +910,15 @@
}
else
{
- char *p;
+ char *p = demangled_name;
char *demangled_no_class = demangled_name;
-
- while (p = strchr (demangled_no_class, ':'))
- {
- demangled_no_class = p;
- if (*++demangled_no_class == ':')
- ++demangled_no_class;
- }
+ while(*p && *p != '(')
+ {
+ if(*p++ == ':')
+ {
+ demangled_no_class = p;
+ }
+ }
/* get rid of the static word appended by the demangler */
p = strstr (demangled_no_class, " static");
if (p != NULL)