aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorKung Hsu <kung@cygnus>1993-11-18 18:54:11 +0000
committerKung Hsu <kung@cygnus>1993-11-18 18:54:11 +0000
commit6ebc9cddfca2253ed4285bb7c416cc213f22cb50 (patch)
tree15e9726b029ee9732fe9cfd1a0f42cf2bdbba078 /gdb/valops.c
parentf8944f841446adad9cd3c419d60b5eb4808a6a45 (diff)
downloadgdb-6ebc9cddfca2253ed4285bb7c416cc213f22cb50.zip
gdb-6ebc9cddfca2253ed4285bb7c416cc213f22cb50.tar.gz
gdb-6ebc9cddfca2253ed4285bb7c416cc213f22cb50.tar.bz2
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).
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index 52f3bc4..cd42bdd 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;