From 2497b4984582be980b40913ef1bf561ccad2f265 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Mon, 29 Jun 2009 13:24:41 +0000 Subject: * value.h (value_subscript, value_subscripted_rvalue, value_bitstring_subscript, value_ptradd): Use LONGEST instead of value as type of the index argument. (value_ptrsub): Remove. * valarith.c (value_subscript, value_subscripted_rvalue, value_bitstring_subscript, value_ptradd): Use LONGEST instead of value as type of the index argument. (value_ptrsub): Remove. * wrapper.h (gdb_value_subscript): Use LONGEST instead of value as type of the index argument. * wrapper.c (gdb_value_subscript): Likewise. Update calls to gdb_value_subscript, value_subscript, value_subscripted_rvalue, value_bitstring_subscript and value_ptradd to use LONGEST instead of value as index argument type. Use value_ptradd instead of value_ptrsub. * ada-lang.c (ada_value_subscript, ada_value_ptr_subscript, ada_tag_name_2): Update. * ada-tasks.c (read_atcb): Update. * eval.c (evaluate_subexp_standard): Update. * valarith.c (value_subscript): Update. * gnu-v2-abi.c (gnuv2_virtual_fn_field): Update. * gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset, gnuv3_method_ptr_to_value): Update. * jv-lang.c (evaluate_subexp_java): Update. * m2-lang.c (evaluate_subexp_modula2): Update. * python/python-value.c (valpy_getitem, valpy_binop): Update. * wrapper.c (gdb_value_subscript): Update. * varobj.c (c_describe_child): Update. --- gdb/m2-lang.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/m2-lang.c') diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c index 9ca3ae1..85fa123 100644 --- a/gdb/m2-lang.c +++ b/gdb/m2-lang.c @@ -253,7 +253,7 @@ evaluate_subexp_modula2 (struct type *expect_type, struct expression *exp, arg1 = value_cast (type, arg1); type = check_typedef (value_type (arg1)); - return value_ind (value_ptradd (arg1, arg2)); + return value_ind (value_ptradd (arg1, value_as_long (arg2))); } else if (TYPE_CODE (type) != TYPE_CODE_ARRAY) @@ -268,7 +268,7 @@ evaluate_subexp_modula2 (struct type *expect_type, struct expression *exp, if (noside == EVAL_AVOID_SIDE_EFFECTS) return value_zero (TYPE_TARGET_TYPE (type), VALUE_LVAL (arg1)); else - return value_subscript (arg1, arg2); + return value_subscript (arg1, value_as_long (arg2)); default: return evaluate_subexp_standard (expect_type, exp, pos, noside); -- cgit v1.1