From d4eff4c122e06e913452e2039e29e8db6b15b1dd Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 8 Mar 2021 07:27:57 -0700 Subject: Introduce repeat_operation This adds class repeat_operation, which implements BINOP_REPEAT. gdb/ChangeLog 2021-03-08 Tom Tromey * expop.h (class repeat_operation): New. * eval.c (eval_op_repeat): No longer static. Remove "op" parameter. (evaluate_subexp_standard): Update. * ax-gdb.c (repeat_operation::do_generate_ax): New method. --- gdb/eval.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/eval.c') diff --git a/gdb/eval.c b/gdb/eval.c index 83d0147..2d2f881 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -1732,9 +1732,9 @@ eval_op_leq (struct type *expect_type, struct expression *exp, /* A helper function for BINOP_REPEAT. */ -static struct value * +struct value * eval_op_repeat (struct type *expect_type, struct expression *exp, - enum noside noside, + enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2) { if (noside == EVAL_SKIP) @@ -2946,7 +2946,7 @@ evaluate_subexp_standard (struct type *expect_type, case BINOP_REPEAT: arg1 = evaluate_subexp (nullptr, exp, pos, noside); arg2 = evaluate_subexp (nullptr, exp, pos, noside); - return eval_op_repeat (expect_type, exp, noside, arg1, arg2); + return eval_op_repeat (expect_type, exp, noside, op, arg1, arg2); case BINOP_COMMA: evaluate_subexp (nullptr, exp, pos, noside); -- cgit v1.1