From: Tom Tromey Date: Fri, 28 Apr 2023 14:45:48 +0000 (-0600) Subject: Add flags to parse_and_eval X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2c64cbb737e801c5c3b0e0d8b03901b65b2f84dc;p=binutils-gdb.git Add flags to parse_and_eval This adds a flags parameter to parse_and_eval. --- diff --git a/gdb/eval.c b/gdb/eval.c index d8d53c28686..457a6697923 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -67,9 +67,9 @@ parse_and_eval_long (const char *exp) } struct value * -parse_and_eval (const char *exp) +parse_and_eval (const char *exp, parser_flags flags) { - expression_up expr = parse_expression (exp); + expression_up expr = parse_expression (exp, nullptr, flags); return expr->evaluate (); } diff --git a/gdb/value.h b/gdb/value.h index d042d816409..a9c77a033ab 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -1313,7 +1313,7 @@ extern void fetch_subexp_value (struct expression *exp, std::vector *val_chain, bool preserve_errors); -extern struct value *parse_and_eval (const char *exp); +extern struct value *parse_and_eval (const char *exp, parser_flags flags = 0); extern struct value *parse_to_comma_and_eval (const char **expp);