From 22601c155deb926f6bd8ffa2faa04f80b52fc676 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Thu, 2 Jul 2009 12:20:18 +0000 Subject: * ada-lang.c (assign_component): Use platform-specific integer type instead of builtin_type_int32 type. (ada_evaluate_subexp) [OP_ATR_SIZE]: Likewise. * ax-gdb.c (gen_expr) [UNOP_NEG]: Use platform-specific integer type instead of builtin_type_int8 type. * valarith.c (value_x_unop): Likewise. * python/python-value.c (valpy_absolute): Avoid reference to builtin_type_int8 type. * eval.c (evaluate_subexp_standard): Use platform-specific integer type instead of builtin_type_int8 as EVAL_SKIP return value type. * ada-lang.c (ada_evaluate_subexp): Likewise. * jv-lang.c (evaluate_subexp_java): Likewise. * m2-lang.c (evaluate_subexp_modula2): Likewise. * scm-lang.c (evaluate_exp): Likewise. * value.h (value_bitstring): Add INDEX_TYPE argument. * valops.c (value_bitstring): Add INDEX_TYPE argument, use it instead of builtin_type_int32 as base range type. * eval.c (evaluate_subexp_standard): Update value_bitstring call. --- gdb/ada-lang.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gdb/ada-lang.c') diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 520b401..7bda72c 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -7990,7 +7990,8 @@ assign_component (struct value *container, struct value *lhs, LONGEST index, struct value *elt; if (TYPE_CODE (value_type (lhs)) == TYPE_CODE_ARRAY) { - struct value *index_val = value_from_longest (builtin_type_int32, index); + struct type *index_type = builtin_type (exp->gdbarch)->builtin_int; + struct value *index_val = value_from_longest (index_type, index); elt = unwrap_value (ada_value_subscript (lhs, 1, &index_val)); } else @@ -9235,9 +9236,9 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp, if (noside == EVAL_SKIP) goto nosideret; else if (noside == EVAL_AVOID_SIDE_EFFECTS) - return value_zero (builtin_type_int32, not_lval); + return value_zero (builtin_type (exp->gdbarch)->builtin_int, not_lval); else - return value_from_longest (builtin_type_int32, + return value_from_longest (builtin_type (exp->gdbarch)->builtin_int, TARGET_CHAR_BIT * TYPE_LENGTH (type)); case OP_ATR_VAL: @@ -9422,7 +9423,7 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp, } nosideret: - return value_from_longest (builtin_type_int8, (LONGEST) 1); + return value_from_longest (builtin_type (exp->gdbarch)->builtin_int, 1); } -- cgit v1.1