aboutsummaryrefslogtreecommitdiff
path: root/gdb/ax-gdb.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2010-02-11 23:03:22 +0000
committerPedro Alves <palves@redhat.com>2010-02-11 23:03:22 +0000
commit5d5b640e00fd8d48d15cd3b8118ca281055ada9b (patch)
tree0145348b0ba0829d3ad1142bbec0f4aa0913c288 /gdb/ax-gdb.c
parent809e8c5f53223eb0a76215d98f9a16c18ede1aff (diff)
downloadfsf-binutils-gdb-5d5b640e00fd8d48d15cd3b8118ca281055ada9b.zip
fsf-binutils-gdb-5d5b640e00fd8d48d15cd3b8118ca281055ada9b.tar.gz
fsf-binutils-gdb-5d5b640e00fd8d48d15cd3b8118ca281055ada9b.tar.bz2
* ax-gdb.c (gen_exp_binop_rest) [BINOP_SUBSCRIPT]: Error out if
the offset value isn't of integral type.
Diffstat (limited to 'gdb/ax-gdb.c')
-rw-r--r--gdb/ax-gdb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index 75aa7ca6..3e151de 100644
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -1910,6 +1910,9 @@ cannot subscript requested type: cannot call user defined functions"));
}
}
+ if (!is_integral_type (value2->type))
+ error (_("Argument to arithmetic operation not a number or boolean."));
+
gen_ptradd (ax, value, value1, value2);
gen_deref (ax, value);
break;