diff options
author | Siva Chandra <sivachandra@chromium.org> | 2014-07-09 10:25:48 -0700 |
---|---|---|
committer | Siva Chandra <sivachandra@chromium.org> | 2014-08-15 18:28:59 -0700 |
commit | e66d44466912ecf581f6b67ff299d064c7bf4f1a (patch) | |
tree | 447ff1714ecb2c4bce548c8565e0102feb489cc8 /gdb/eval.c | |
parent | 940df408121be31beed22ef7a5ad133cb1592726 (diff) | |
download | binutils-gdb-e66d44466912ecf581f6b67ff299d064c7bf4f1a.tar.gz |
Add new argument NOSIDE to find_overload_match.
This is a fix for PR c++/17132.
If this new argument is set to EVAL_AVOID_SIDE_EFFECTS, then the object's
memory will not be read while picking the best overload match.
gdb/
* eval.c: Update all calls to find_overload_match.
* valarith.c: Likewise.
(value_user_defined_cpp_op, value_user_defined_op): New
argument NOSIDE. Update all callers.
* valops.c (find_overload_match): New argument NOSIDE.
* value.h (find_overload_match): Update signature.
gdb/testsuite
* gdb.cp/pr17132.cc: New file.
* gdb.cp/pr17132.exp: New file.
Diffstat (limited to 'gdb/eval.c')
-rw-r--r-- | gdb/eval.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/eval.c b/gdb/eval.c index de8e8ecb29b..c3792090fce 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -1563,7 +1563,7 @@ evaluate_subexp_standard (struct type *expect_type, NON_METHOD, /* not method */ NULL, NULL, /* pass NULL symbol since symbol is unknown */ - NULL, &symp, NULL, 0); + NULL, &symp, NULL, 0, noside); /* Now fix the expression being evaluated. */ exp->elts[save_pos1 + 2].symbol = symp; @@ -1599,7 +1599,7 @@ evaluate_subexp_standard (struct type *expect_type, METHOD, /* method */ &arg2, /* the object */ NULL, &valp, NULL, - &static_memfuncp, 0); + &static_memfuncp, 0, noside); if (op == OP_SCOPE && !static_memfuncp) { @@ -1670,7 +1670,7 @@ evaluate_subexp_standard (struct type *expect_type, NULL, /* no need for name */ NON_METHOD, /* not method */ NULL, function, /* the function */ - NULL, &symp, NULL, no_adl); + NULL, &symp, NULL, no_adl, noside); if (op == OP_VAR_VALUE) { |