diff options
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r-- | gdb/ada-lang.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 36a2f24..5793cd2 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -10004,6 +10004,10 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp, return (value_from_longest (value_type (arg1), value_as_long (arg1) + value_as_long (arg2))); + if (TYPE_CODE (value_type (arg2)) == TYPE_CODE_PTR) + return (value_from_longest + (value_type (arg2), + value_as_long (arg1) + value_as_long (arg2))); if ((ada_is_fixed_point_type (value_type (arg1)) || ada_is_fixed_point_type (value_type (arg2))) && value_type (arg1) != value_type (arg2)) @@ -10026,6 +10030,10 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp, return (value_from_longest (value_type (arg1), value_as_long (arg1) - value_as_long (arg2))); + if (TYPE_CODE (value_type (arg2)) == TYPE_CODE_PTR) + return (value_from_longest + (value_type (arg2), + value_as_long (arg1) - value_as_long (arg2))); if ((ada_is_fixed_point_type (value_type (arg1)) || ada_is_fixed_point_type (value_type (arg2))) && value_type (arg1) != value_type (arg2)) |