* ax-gdb.c (gen_exp_binop_rest) [BINOP_SUBSCRIPT]: Error out if

the offset value isn't of integral type.
This commit is contained in:
Pedro Alves 2010-02-11 23:03:22 +00:00
parent 809e8c5f53
commit 5d5b640e00
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2010-02-11 Pedro Alves <pedro@codesourcery.com>
* ax-gdb.c (gen_exp_binop_rest) [BINOP_SUBSCRIPT]: Error out if
the offset value isn't of integral type.
2010-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* breakpoint.c (delete_breakpoint) <bpt->related_breakpoint != NULL>:

View file

@ -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;