diff options
author | Tom Tromey <tromey@adacore.com> | 2023-04-28 08:08:49 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-05-23 13:57:54 -0600 |
commit | b8c03634d6537ee7ad068ab840b6e78483aaca80 (patch) | |
tree | af65690289d5f6db975f3318064a830d3f95e8ca /gdb/printcmd.c | |
parent | 562db568441ed0f7e258b843916c34572170cc6d (diff) | |
download | gdb-b8c03634d6537ee7ad068ab840b6e78483aaca80.zip gdb-b8c03634d6537ee7ad068ab840b6e78483aaca80.tar.gz gdb-b8c03634d6537ee7ad068ab840b6e78483aaca80.tar.bz2 |
Introduce and use parser flags
This patch adds a new parser_flags type and changes the parser APIs to
use it rather than a collection of 'int' and 'bool'. More flags will
be added in subsquent patches.
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r-- | gdb/printcmd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 679a24e..ca0966b 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -1315,7 +1315,10 @@ process_print_command_args (const char *args, value_print_options *print_opts, /* VOIDPRINT is true to indicate that we do want to print a void value, so invert it for parse_expression. */ - expression_up expr = parse_expression (exp, nullptr, !voidprint); + parser_flags flags = 0; + if (!voidprint) + flags = PARSER_VOID_CONTEXT; + expression_up expr = parse_expression (exp, nullptr, flags); return expr->evaluate (); } |