diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-10-19 02:47:02 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-10-19 02:47:02 +0000 |
commit | 917317f4c6550f3f3e0001d0a9e5a6acd6a2d1be (patch) | |
tree | 3ecc5a5d86fef50ae8715adacf956a2011797441 /gdb/eval.c | |
parent | 446a06c9b8819b20be7704f0b540471d76959c66 (diff) | |
download | gdb-917317f4c6550f3f3e0001d0a9e5a6acd6a2d1be.zip gdb-917317f4c6550f3f3e0001d0a9e5a6acd6a2d1be.tar.gz gdb-917317f4c6550f3f3e0001d0a9e5a6acd6a2d1be.tar.bz2 |
import gdb-1999-10-18 snapshot
Diffstat (limited to 'gdb/eval.c')
-rw-r--r-- | gdb/eval.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -892,9 +892,12 @@ evaluate_subexp_standard (expect_type, exp, pos, noside) argvec[1] = arg2; argvec[0] = arg1; } - else + else if (op == OP_VAR_VALUE) { /* Non-member function being called */ + /* fn: This can only be done for C++ functions. A C-style function + in a C++ program, for instance, does not have the fields that + are expected here */ if (overload_resolution && (exp->language_defn->la_language == language_cplus)) { @@ -908,11 +911,11 @@ evaluate_subexp_standard (expect_type, exp, pos, noside) (void) find_overload_match (arg_types, nargs, NULL /* no need for name */ , 0 /* not method */ , 0 /* strict match */ , - NULL, exp->elts[5].symbol /* the function */ , + NULL, exp->elts[save_pos1+2].symbol /* the function */ , NULL, &symp, NULL); /* Now fix the expression being evaluated */ - exp->elts[5].symbol = symp; + exp->elts[save_pos1+2].symbol = symp; argvec[0] = evaluate_subexp_with_coercion (exp, &save_pos1, noside); } else @@ -921,6 +924,11 @@ evaluate_subexp_standard (expect_type, exp, pos, noside) /* nothing to be done; argvec already correctly set up */ } } + else + { + /* It is probably a C-style function */ + /* nothing to be done; argvec already correctly set up */ + } do_call_it: |