diff options
author | Per Bothner <per@bothner.com> | 1991-10-26 02:05:14 +0000 |
---|---|---|
committer | Per Bothner <per@bothner.com> | 1991-10-26 02:05:14 +0000 |
commit | bcccec8c8d084669c7469b8578448fa18ddbe2f3 (patch) | |
tree | b9d4dc16487be188271c1a72694724d15fe0f25d /gdb/valprint.c | |
parent | 5ab580ccf8a55393e038e4c9e90cd57b43e5f02c (diff) | |
download | gdb-bcccec8c8d084669c7469b8578448fa18ddbe2f3.zip gdb-bcccec8c8d084669c7469b8578448fa18ddbe2f3.tar.gz gdb-bcccec8c8d084669c7469b8578448fa18ddbe2f3.tar.bz2 |
Various fixes to improve g++ debugging. See ChangeLog.
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r-- | gdb/valprint.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c index f893eda..d10b55d 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -409,7 +409,7 @@ is_vtbl_ptr_type(type) { char *typename = TYPE_NAME(type); static const char vtbl_ptr_name[] = - { CPLUS_MARKER,'v','t','b','l','_','p','t','r','_','t','y','p','e' }; + { CPLUS_MARKER,'v','t','b','l','_','p','t','r','_','t','y','p','e', 0 }; return (typename != NULL && !strcmp(typename, vtbl_ptr_name)); } @@ -1718,18 +1718,9 @@ type_print_base (type, stream, show, level) if (TYPE_FLAGS (TYPE_FN_FIELD_TYPE (f, j)) & TYPE_FLAG_STUB) { /* Build something we can demangle. */ - char *strchr (), *gdb_mangle_typename (); - char *inner_name = gdb_mangle_typename (type); - char *mangled_name - = (char *)xmalloc (strlen (TYPE_FN_FIELDLIST_NAME (type, i)) - + strlen (inner_name) - + strlen (TYPE_FN_FIELD_PHYSNAME (f, j)) - + 1); - char *demangled_name, *cplus_demangle (); - strcpy (mangled_name, TYPE_FN_FIELDLIST_NAME (type, i)); - strcat (mangled_name, inner_name); - strcat (mangled_name, TYPE_FN_FIELD_PHYSNAME (f, j)); - demangled_name = cplus_demangle (mangled_name, 1); + char *strchr (), *gdb_mangle_name (), *cplus_demangle (); + char *mangled_name = gdb_mangle_name (type, i, j); + char *demangled_name = cplus_demangle (mangled_name, 1); if (demangled_name == 0) fprintf_filtered (stream, " <badly mangled name %s>", mangled_name); |