diff options
author | Tom Tromey <tromey@redhat.com> | 2010-01-20 18:06:16 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-01-20 18:06:16 +0000 |
commit | b966cb8abe34be31fae6aed3e6e9c9cc4c8696b2 (patch) | |
tree | 135afbf396f2c436a793397cf797a05ecb695ed8 /gdb/valarith.c | |
parent | 5ac169d4b6e2d88c670298a3246fc2a5d8a94aa4 (diff) | |
download | gdb-b966cb8abe34be31fae6aed3e6e9c9cc4c8696b2.zip gdb-b966cb8abe34be31fae6aed3e6e9c9cc4c8696b2.tar.gz gdb-b966cb8abe34be31fae6aed3e6e9c9cc4c8696b2.tar.bz2 |
gdb
PR backtrace/10770:
* valarith.c (value_binop): Handle BINOP_GTR, BINOP_LEQ, and
BINOP_GEQ. Handle BINOP_NOTEQUAL in the signed case.
* dwarf2expr.c (new_dwarf_expr_context): Allocate
dwarf_stack_values, not CORE_ADDRs.
(execute_stack_op): Change DW_OP_div and comparison operators to
use signed operands.
gdb/testsuite
PR backtrace/10770:
* gdb.dwarf2/pr10770.exp: New file.
* gdb.dwarf2/pr10770.c: New file.
* gdb.dwarf2/Makefile.in (EXECUTABLES): Add pr10770.
Diffstat (limited to 'gdb/valarith.c')
-rw-r--r-- | gdb/valarith.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gdb/valarith.c b/gdb/valarith.c index 2b66f85..ed76b09 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -1128,6 +1128,18 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) v = v1 < v2; break; + case BINOP_GTR: + v = v1 > v2; + break; + + case BINOP_LEQ: + v = v1 <= v2; + break; + + case BINOP_GEQ: + v = v1 >= v2; + break; + default: error (_("Invalid binary operation on numbers.")); } @@ -1237,10 +1249,26 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) v = v1 == v2; break; + case BINOP_NOTEQUAL: + v = v1 != v2; + break; + case BINOP_LESS: v = v1 < v2; break; + case BINOP_GTR: + v = v1 > v2; + break; + + case BINOP_LEQ: + v = v1 <= v2; + break; + + case BINOP_GEQ: + v = v1 >= v2; + break; + default: error (_("Invalid binary operation on numbers.")); } |