aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-exp.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-03-08 07:27:57 -0700
committerTom Tromey <tom@tromey.com>2021-03-08 07:28:28 -0700
commit7c15d377deefea39bac6ce710d803cc23cbe19c9 (patch)
tree49eec625122c2468d7b4a9c904b943aeefa5b306 /gdb/ada-exp.h
parent5019124b1ddc3839bd8ccba08819b11c0151e8a9 (diff)
downloadgdb-7c15d377deefea39bac6ce710d803cc23cbe19c9.zip
gdb-7c15d377deefea39bac6ce710d803cc23cbe19c9.tar.gz
gdb-7c15d377deefea39bac6ce710d803cc23cbe19c9.tar.bz2
Implement some Ada unary operations
This implements a few Ada unary operations, using the existing unop_operation template class. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * ada-lang.c (ada_unop_neg, ada_atr_tag, ada_atr_size, ada_abs): No longer static. * ada-exp.h (ada_neg_operation, ada_atr_tag_operation) (ada_atr_size_operation, ada_abs_operation): New typedefs.
Diffstat (limited to 'gdb/ada-exp.h')
-rw-r--r--gdb/ada-exp.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/gdb/ada-exp.h b/gdb/ada-exp.h
index 17a04ea..8f114b3 100644
--- a/gdb/ada-exp.h
+++ b/gdb/ada-exp.h
@@ -22,6 +22,23 @@
#include "expop.h"
+extern struct value *ada_unop_neg (struct type *expect_type,
+ struct expression *exp,
+ enum noside noside, enum exp_opcode op,
+ struct value *arg1);
+extern struct value *ada_atr_tag (struct type *expect_type,
+ struct expression *exp,
+ enum noside noside, enum exp_opcode op,
+ struct value *arg1);
+extern struct value *ada_atr_size (struct type *expect_type,
+ struct expression *exp,
+ enum noside noside, enum exp_opcode op,
+ struct value *arg1);
+extern struct value *ada_abs (struct type *expect_type,
+ struct expression *exp,
+ enum noside noside, enum exp_opcode op,
+ struct value *arg1);
+
namespace expr
{
@@ -87,6 +104,11 @@ public:
{ return TERNOP_IN_RANGE; }
};
+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>;
+
} /* namespace expr */
#endif /* ADA_EXP_H */