aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-09-10 09:47:39 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-09-10 09:47:39 +0000
commit030b4912c632cdd459ca59e1b196c4293a691292 (patch)
tree15d3aba32186a5466e0c3db02a639a461060740e /gdb/ada-lang.c
parent1830312f608790b8d80582b82bc8ae43a744b152 (diff)
downloadgdb-030b4912c632cdd459ca59e1b196c4293a691292.zip
gdb-030b4912c632cdd459ca59e1b196c4293a691292.tar.gz
gdb-030b4912c632cdd459ca59e1b196c4293a691292.tar.bz2
* ada-lang.c (ada_array_length): Use builtin_type_int32 instead
of builtin_type_int. (ada_evaluate_subexp) [UNOP_IN_RANGE]: Use operand range type instead of builtin_type_int.
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r--gdb/ada-lang.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 643cbec..8845433 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -2621,7 +2621,7 @@ ada_array_length (struct value *arr, int n)
}
else
return
- value_from_longest (builtin_type_int,
+ value_from_longest (builtin_type_int32,
value_as_long (desc_one_bound (desc_bounds (arr),
n, 1))
- value_as_long (desc_one_bound (desc_bounds (arr),
@@ -8842,9 +8842,8 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp,
return value_from_longest (builtin_type_int, (LONGEST) 1);
case TYPE_CODE_RANGE:
- arg2 = value_from_longest (builtin_type_int, TYPE_LOW_BOUND (type));
- arg3 = value_from_longest (builtin_type_int,
- TYPE_HIGH_BOUND (type));
+ arg2 = value_from_longest (type, TYPE_LOW_BOUND (type));
+ arg3 = value_from_longest (type, TYPE_HIGH_BOUND (type));
return
value_from_longest (builtin_type_int,
(value_less (arg1, arg3)