PR c++/11990:
* c-lang.c (cplus_language_defn): Use gdb_demangle. * c-typeprint.c (c_type_print_base): Use gdb_demangle. * cp-support.c (mangled_name_to_comp): Use gdb_demangle. (gdb_demangle): New function. * cp-support.h (gdb_demangle): Declare. * dwarf2read.c (dwarf2_physname, fixup_partial_die) (dwarf2_name): Use gdb_demangle. * gdbtypes.c (check_stub_method): Use gdb_demangle. * gnu-v3-abi.c (gnuv3_rtti_type): Strip @plt and version suffixes from name. (gnuv3_print_method_ptr): Use gdb_demangle. * jv-lang.c (java_demangle): Use gdb_demangle. * jv-typeprint.c (java_type_print_base): Use gdb_demangle. * language.c (unk_lang_demangle): Use gdb_demangle. * symtab.c (symbol_find_demangled_name) (demangle_for_lookup): Use gdb_demangle.
This commit is contained in:
parent
591f19e89b
commit
8de20a37d6
12 changed files with 74 additions and 25 deletions
|
@ -283,6 +283,7 @@ gnuv3_rtti_type (struct value *value,
|
|||
const char *class_name;
|
||||
struct type *run_time_type;
|
||||
LONGEST offset_to_top;
|
||||
char *atsign;
|
||||
|
||||
/* We only have RTTI for class objects. */
|
||||
if (TYPE_CODE (values_type) != TYPE_CODE_CLASS)
|
||||
|
@ -327,6 +328,18 @@ gnuv3_rtti_type (struct value *value,
|
|||
}
|
||||
class_name = vtable_symbol_name + 11;
|
||||
|
||||
/* Strip off @plt and version suffixes. */
|
||||
atsign = strchr (class_name, '@');
|
||||
if (atsign != NULL)
|
||||
{
|
||||
char *copy;
|
||||
|
||||
copy = alloca (atsign - class_name + 1);
|
||||
memcpy (copy, class_name, atsign - class_name);
|
||||
copy[atsign - class_name] = '\0';
|
||||
class_name = copy;
|
||||
}
|
||||
|
||||
/* Try to look up the class name as a type name. */
|
||||
/* FIXME: chastain/2003-11-26: block=NULL is bogus. See pr gdb/1465. */
|
||||
run_time_type = cp_lookup_rtti_type (class_name, NULL);
|
||||
|
@ -593,8 +606,8 @@ gnuv3_print_method_ptr (const gdb_byte *contents,
|
|||
possible paths to the method based on the adjustment. */
|
||||
if (physname)
|
||||
{
|
||||
char *demangled_name = cplus_demangle (physname,
|
||||
DMGL_ANSI | DMGL_PARAMS);
|
||||
char *demangled_name = gdb_demangle (physname,
|
||||
DMGL_ANSI | DMGL_PARAMS);
|
||||
|
||||
fprintf_filtered (stream, "&virtual ");
|
||||
if (demangled_name == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue