Introduce ada_pos_operation
authorTom Tromey <tom@tromey.com>
Mon, 8 Mar 2021 14:27:57 +0000 (07:27 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 8 Mar 2021 14:28:35 +0000 (07:28 -0700)
This adds class ada_pos_operation, a new typedef that implements
OP_ATR_POS.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

* ada-lang.c (ada_pos_atr): No longer static.
* ada-exp.h (ada_pos_operation): New typedef.

gdb/ChangeLog
gdb/ada-exp.h
gdb/ada-lang.c

index 9a13a03eb8707664869e5e96a8749102880e1eaf..adb5140d369fc8c21248341547583bfaf0fa94f5 100644 (file)
@@ -1,3 +1,8 @@
+2021-03-08  Tom Tromey  <tom@tromey.com>
+
+       * ada-lang.c (ada_pos_atr): No longer static.
+       * ada-exp.h (ada_pos_operation): New typedef.
+
 2021-03-08  Tom Tromey  <tom@tromey.com>
 
        * ada-lang.c (ada_pos_atr): Rename from value_pos_atr.  Change
index f3808935f994745c31a095642ac02dc51fd45a76..07744c1c8eaae39f3e0bff97b662bfa957939bec 100644 (file)
@@ -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<UNOP_NEG, ada_unop_neg>;
 using ada_atr_tag_operation = unop_operation<OP_ATR_TAG, ada_atr_tag>;
 using ada_atr_size_operation = unop_operation<OP_ATR_SIZE, ada_atr_size>;
 using ada_abs_operation = unop_operation<UNOP_ABS, ada_abs>;
+using ada_pos_operation = unop_operation<OP_ATR_POS, ada_pos_atr>;
 
 /* The in-range operation, given a type.  */
 class ada_unop_range_operation
index cbb1deebcc19af6f905747082b6f2dd09f7dd994..52766ae916c5d500d172c301c3eb06147d083118 100644 (file)
@@ -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,