aboutsummaryrefslogtreecommitdiff
path: root/gdb
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:35 -0700
commit065ec8268d5b1eb1895da4328d3bc9a5a5d043d1 (patch)
treef35f293fc115f0079d571fc1dad0bf7790d9dac6 /gdb
parent9e99f48f27790c43d5fd663c9eb4c3a19ae49efa (diff)
downloadgdb-065ec8268d5b1eb1895da4328d3bc9a5a5d043d1.zip
gdb-065ec8268d5b1eb1895da4328d3bc9a5a5d043d1.tar.gz
gdb-065ec8268d5b1eb1895da4328d3bc9a5a5d043d1.tar.bz2
Introduce ada_binop_exp_operation
This adds class ada_binop_exp_operation, which implements BINOP_EXP for Ada. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * ada-lang.c (ada_binop_exp): No longer static. * ada-exp.h (ada_binop_exp_operation): New typedef.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/ada-exp.h7
-rw-r--r--gdb/ada-lang.c2
3 files changed, 12 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c49a9db..95659b4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2021-03-08 Tom Tromey <tom@tromey.com>
+ * ada-lang.c (ada_binop_exp): No longer static.
+ * ada-exp.h (ada_binop_exp_operation): New typedef.
+
+2021-03-08 Tom Tromey <tom@tromey.com>
+
* ada-lang.c (ada_val_atr): No longer static.
(ada_atr_val_operation::evaluate): New method.
* ada-exp.h (class ada_atr_val_operation): New.
diff --git a/gdb/ada-exp.h b/gdb/ada-exp.h
index c86b054..8e90846 100644
--- a/gdb/ada-exp.h
+++ b/gdb/ada-exp.h
@@ -71,7 +71,10 @@ extern struct value *ada_pos_atr (struct type *expect_type,
struct value *arg);
extern struct value *ada_val_atr (enum noside noside, struct type *type,
struct value *arg);
-
+extern struct value *ada_binop_exp (struct type *expect_type,
+ struct expression *exp,
+ enum noside noside, enum exp_opcode op,
+ struct value *arg1, struct value *arg2);
namespace expr
{
@@ -189,6 +192,8 @@ using ada_binop_mod_operation = binop_operation<BINOP_MOD, ada_mult_binop>;
using ada_binop_min_operation = binop_operation<OP_ATR_MIN, ada_binop_minmax>;
using ada_binop_max_operation = binop_operation<OP_ATR_MAX, ada_binop_minmax>;
+using ada_binop_exp_operation = binop_operation<BINOP_EXP, ada_binop_exp>;
+
/* Implement the equal and not-equal operations for Ada. */
class ada_binop_equal_operation
: public tuple_holding_operation<enum exp_opcode, operation_up, operation_up>
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index c689c7f..8a4de77 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -10416,7 +10416,7 @@ ada_binop_minmax (struct type *expect_type,
/* A helper function for BINOP_EXP. */
-static struct value *
+struct value *
ada_binop_exp (struct type *expect_type,
struct expression *exp,
enum noside noside, enum exp_opcode op,