From 065ec8268d5b1eb1895da4328d3bc9a5a5d043d1 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 8 Mar 2021 07:27:57 -0700 Subject: [PATCH] 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 * ada-lang.c (ada_binop_exp): No longer static. * ada-exp.h (ada_binop_exp_operation): New typedef. --- gdb/ChangeLog | 5 +++++ gdb/ada-exp.h | 7 ++++++- gdb/ada-lang.c | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c49a9db1aa2..95659b4818a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2021-03-08 Tom Tromey + + * ada-lang.c (ada_binop_exp): No longer static. + * ada-exp.h (ada_binop_exp_operation): New typedef. + 2021-03-08 Tom Tromey * ada-lang.c (ada_val_atr): No longer static. diff --git a/gdb/ada-exp.h b/gdb/ada-exp.h index c86b0548947..8e908464f1f 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; using ada_binop_min_operation = binop_operation; using ada_binop_max_operation = binop_operation; +using ada_binop_exp_operation = binop_operation; + /* Implement the equal and not-equal operations for Ada. */ class ada_binop_equal_operation : public tuple_holding_operation diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index c689c7fec8b..8a4de779aa6 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, -- 2.30.2