From: Tom Tromey Date: Mon, 8 Mar 2021 14:27:57 +0000 (-0700) Subject: Introduce ada_pos_operation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7631cf6cc8812fef7d27aff800e12f8e31393f29;p=binutils-gdb.git Introduce ada_pos_operation This adds class ada_pos_operation, a new typedef that implements OP_ATR_POS. gdb/ChangeLog 2021-03-08 Tom Tromey * ada-lang.c (ada_pos_atr): No longer static. * ada-exp.h (ada_pos_operation): New typedef. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9a13a03eb87..adb5140d369 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2021-03-08 Tom Tromey + + * ada-lang.c (ada_pos_atr): No longer static. + * ada-exp.h (ada_pos_operation): New typedef. + 2021-03-08 Tom Tromey * ada-lang.c (ada_pos_atr): Rename from value_pos_atr. Change diff --git a/gdb/ada-exp.h b/gdb/ada-exp.h index f3808935f99..07744c1c8ea 100644 --- a/gdb/ada-exp.h +++ b/gdb/ada-exp.h @@ -65,6 +65,10 @@ extern struct value *ada_binop_minmax (struct type *expect_type, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2); +extern struct value *ada_pos_atr (struct type *expect_type, + struct expression *exp, + enum noside noside, enum exp_opcode op, + struct value *arg); namespace expr { @@ -135,6 +139,7 @@ using ada_neg_operation = unop_operation; using ada_atr_tag_operation = unop_operation; using ada_atr_size_operation = unop_operation; using ada_abs_operation = unop_operation; +using ada_pos_operation = unop_operation; /* The in-range operation, given a type. */ class ada_unop_range_operation diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index cbb1deebcc1..52766ae916c 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -8863,7 +8863,7 @@ pos_atr (struct value *arg) return *result; } -static struct value * +struct value * ada_pos_atr (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op,