From 37eedb39824dc26c82a92b5515a352d7de0c9b5b Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 24 Mar 2019 10:28:42 -0600 Subject: Make base class for parser_state This makes a new base class, expr_builder, for parser_state. This separates the state needed to construct an expression from the state needed by the parsers. gdb/ChangeLog 2019-04-04 Tom Tromey * gdbarch.h, gdbarch.c: Rebuild. * gdbarch.sh (dtrace_parse_probe_argument): Change type. * stap-probe.h: (struct stap_parse_info): Replace "parser_state" with "expr_builder". * parser-defs.h (struct expr_builder): Rename from "parser_state". (parser_state): New class. * parse.c (expr_builder): Rename. (expr_builder::release): Rename. (write_exp_elt, write_exp_elt_opcode, write_exp_elt_sym) (write_exp_elt_msym, write_exp_elt_block, write_exp_elt_objfile) (write_exp_elt_longcst, write_exp_elt_floatcst) (write_exp_elt_type, write_exp_elt_intern, write_exp_string) (write_exp_string_vector, write_exp_bitstring) (write_exp_msymbol, mark_struct_expression) (write_dollar_variable) (insert_type_address_space, increase_expout_size): Replace "parser_state" with "expr_builder". * dtrace-probe.c: Replace "parser_state" with "expr_builder". * amd64-linux-tdep.c (amd64_dtrace_parse_probe_argument): Replace "parser_state" with "expr_builder". --- gdb/gdbarch.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/gdbarch.h') diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 7e18524..7ebd365a 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -60,7 +60,7 @@ struct syscall; struct agent_expr; struct axs_value; struct stap_parse_info; -struct parser_state; +struct expr_builder; struct ravenscar_arch_ops; struct mem_range; struct syscalls_info; @@ -1356,8 +1356,8 @@ extern void set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, gdbar extern int gdbarch_dtrace_parse_probe_argument_p (struct gdbarch *gdbarch); -typedef void (gdbarch_dtrace_parse_probe_argument_ftype) (struct gdbarch *gdbarch, struct parser_state *pstate, int narg); -extern void gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch, struct parser_state *pstate, int narg); +typedef void (gdbarch_dtrace_parse_probe_argument_ftype) (struct gdbarch *gdbarch, struct expr_builder *builder, int narg); +extern void gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch, struct expr_builder *builder, int narg); extern void set_gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch, gdbarch_dtrace_parse_probe_argument_ftype *dtrace_parse_probe_argument); /* True if the given ADDR does not contain the instruction sequence -- cgit v1.1