diff options
author | Tom Tromey <tom@tromey.com> | 2021-03-08 07:27:57 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-03-08 07:28:20 -0700 |
commit | d4eff4c122e06e913452e2039e29e8db6b15b1dd (patch) | |
tree | 947f955e0c6857fae0edb7d26cb9d0e86f594daf /gdb/eval.c | |
parent | 46916f2bcbaf4532aab9fecb2344330710129ffa (diff) | |
download | gdb-d4eff4c122e06e913452e2039e29e8db6b15b1dd.zip gdb-d4eff4c122e06e913452e2039e29e8db6b15b1dd.tar.gz gdb-d4eff4c122e06e913452e2039e29e8db6b15b1dd.tar.bz2 |
Introduce repeat_operation
This adds class repeat_operation, which implements BINOP_REPEAT.
gdb/ChangeLog
2021-03-08 Tom Tromey <tom@tromey.com>
* 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.
Diffstat (limited to 'gdb/eval.c')
-rw-r--r-- | gdb/eval.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |