From 6ebc9cddfca2253ed4285bb7c416cc213f22cb50 Mon Sep 17 00:00:00 2001 From: Kung Hsu Date: Thu, 18 Nov 1993 18:54:11 +0000 Subject: [PATCH] Modified Files: ChangeLog valops.c * valops.c(search_struct_method): to use unified search so type conversion operator works in calling method. (this file should be checked in with last commit, I missed it). --- gdb/ChangeLog | 1 + gdb/valops.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e3424726893..45c8b8402a6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -10,6 +10,7 @@ Wed Nov 17 18:23:09 1993 Kung Hsu (kung@cirdan.cygnus.com) * eval.c(evaluate_subexp): to use unified search so type conversion operator works in calling method. * valarith.c(value_x_binop, value_x_unop): same as above. + * valops.c(search_struct_method): same as above. Wed Nov 17 18:47:34 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) diff --git a/gdb/valops.c b/gdb/valops.c index 52f3bc450e9..cd42bddb3b5 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -1408,11 +1408,21 @@ search_struct_method (name, arg1p, args, offset, static_memfuncp, type) int i; value v; static int name_matched = 0; + char dem_opname[64]; check_stub_type (type); for (i = TYPE_NFN_FIELDS (type) - 1; i >= 0; i--) { char *t_field_name = TYPE_FN_FIELDLIST_NAME (type, i); + if (strncmp(t_field_name, "__", 2)==0 || + strncmp(t_field_name, "op", 2)==0 || + strncmp(t_field_name, "type", 4)==0 ) + { + if (cplus_demangle_opname(t_field_name, dem_opname, DMGL_ANSI)) + t_field_name = dem_opname; + else if (cplus_demangle_opname(t_field_name, dem_opname, 0)) + t_field_name = dem_opname; + } if (t_field_name && STREQ (t_field_name, name)) { int j = TYPE_FN_FIELDLIST_LENGTH (type, i) - 1; -- 2.30.2