aboutsummaryrefslogtreecommitdiff
path: root/gdb/cp-valprint.c
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1996-12-14 09:17:22 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1996-12-14 09:17:22 +0000
commita46d92a73667cff1203670ca5584757887f9c553 (patch)
tree92db92a8af8816651b00174b62398539acfdf013 /gdb/cp-valprint.c
parent93f8f531b068d20ee96799df210b786ef0b0c657 (diff)
downloadgdb-a46d92a73667cff1203670ca5584757887f9c553.zip
gdb-a46d92a73667cff1203670ca5584757887f9c553.tar.gz
gdb-a46d92a73667cff1203670ca5584757887f9c553.tar.bz2
* c-exp.y (qualified_name): Replace explicit check for valid
destructor name with call to destructor_name_p. * c-lang.h, c-typeprint.c (cp_type_print_method_args): Removed, no longer needed. * c-typeprint.c (c_type_print_varspec_prefix, c_type_print_base): Replace remaining fprintf_unfiltered calls with their filtered variant. (c_type_print_base): Do not print return type for destructors from template classes. Replace cp_type_print_method_args with cplus_demangle call to get consistent type output for stubbed and unstubbed methods. * cp-valprint.c (cp_print_class_method): Replace cp_type_print_method_args with cplus_demangle call to get consistent type output for stubbed and unstubbed methods. * gdbtypes.c, gdbtypes.h (get_destructor_fn_field): New function to find the destructor field indices for a type. * gdbtypes.h (struct type): Clarify comments for vptr_basetype and arg_types fields. (struct fn_field): Remove args field, no longer used. * symtab.c (decode_line_1), valops.c (value_struct_elt, check_field_in): Use get_destructor_fn_field to find the destructor field indices instead of assuming that the compiler passes the member function fields in a specific order. * symtab.c (find_methods): Pass NULL instead of SYMBOL_BLOCK_VALUE to lookup_symbol. (list_symbol): Replace cp_type_print_method_args with cplus_demangle call in zapped out code and explain why this code is zapped out.
Diffstat (limited to 'gdb/cp-valprint.c')
-rw-r--r--gdb/cp-valprint.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index dc689c9..5cac8d5 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -87,6 +87,8 @@ cp_print_class_method (valaddr, type, stream)
QUIT;
if (TYPE_FN_FIELD_VOFFSET (f, j) == offset)
{
+ if (TYPE_FN_FIELD_STUB (f, j))
+ check_stub_method (domain, i, j);
kind = "virtual ";
goto common;
}
@@ -121,21 +123,19 @@ cp_print_class_method (valaddr, type, stream)
common:
if (i < len)
{
+ char *demangled_name;
+
fprintf_filtered (stream, "&");
- c_type_print_varspec_prefix (TYPE_FN_FIELD_TYPE (f, j), stream, 0, 0);
- fprintf_unfiltered (stream, kind);
- if (TYPE_FN_FIELD_PHYSNAME (f, j)[0] == '_'
- && is_cplus_marker (TYPE_FN_FIELD_PHYSNAME (f, j)[1]))
- {
- cp_type_print_method_args (TYPE_FN_FIELD_ARGS (f, j) + 1, "~",
- TYPE_FN_FIELDLIST_NAME (domain, i),
- 0, stream);
- }
+ fprintf_filtered (stream, kind);
+ demangled_name = cplus_demangle (TYPE_FN_FIELD_PHYSNAME (f, j),
+ DMGL_ANSI | DMGL_PARAMS);
+ if (demangled_name == NULL)
+ fprintf_filtered (stream, "<badly mangled name %s>",
+ TYPE_FN_FIELD_PHYSNAME (f, j));
else
{
- cp_type_print_method_args (TYPE_FN_FIELD_ARGS (f, j), "",
- TYPE_FN_FIELDLIST_NAME (domain, i),
- 0, stream);
+ fputs_filtered (demangled_name, stream);
+ free (demangled_name);
}
}
else