diff options
author | Joel Brobecker <brobecker@gnat.com> | 2009-03-13 02:15:01 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2009-03-13 02:15:01 +0000 |
commit | 9c2be529f5eba8ee2b799003b6c2dc15971954d1 (patch) | |
tree | 1e0e066af1eb510bab9635d31c7519c36a855cf4 | |
parent | 2360f94a4291075f239aeeb1f6bc2d2484fe0e28 (diff) | |
download | gdb-9c2be529f5eba8ee2b799003b6c2dc15971954d1.zip gdb-9c2be529f5eba8ee2b799003b6c2dc15971954d1.tar.gz gdb-9c2be529f5eba8ee2b799003b6c2dc15971954d1.tar.bz2 |
* ada-lang.c (ada_evaluate_subexp) <BINOP_DIV>: make sure to
promote the operands when noside is EVAL_AVOID_SIDE_EFFECTS.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/ada-lang.c | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 93b6b55..4307293 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2009-03-12 Joel Brobecker <brobecker@adacore.com> + * ada-lang.c (ada_evaluate_subexp) <BINOP_DIV>: make sure to + promote the operands when noside is EVAL_AVOID_SIDE_EFFECTS. + +2009-03-12 Joel Brobecker <brobecker@adacore.com> + * ada-tasks.c (ada_task_is_alive): Move up and make static. * ada-lang.h (ada_task_is_alive): Remove declaration. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index aa5dece..f1a4268 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -8458,7 +8458,10 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp, goto nosideret; else if (noside == EVAL_AVOID_SIDE_EFFECTS && (op == BINOP_DIV || op == BINOP_REM || op == BINOP_MOD)) - return value_zero (value_type (arg1), not_lval); + { + binop_promote (exp->language_defn, exp->gdbarch, &arg1, &arg2); + return value_zero (value_type (arg1), not_lval); + } else { type = builtin_type (exp->gdbarch)->builtin_double; |