GDB (xrefs)

Functions | Variables
/tmp/gdb-8.1/gdb/parse.c File Reference
`#include "defs.h"`
`#include <ctype.h>`
`#include "arch-utils.h"`
`#include "symtab.h"`
`#include "gdbtypes.h"`
`#include "frame.h"`
`#include "expression.h"`
`#include "value.h"`
`#include "command.h"`
`#include "language.h"`
`#include "f-lang.h"`
`#include "parser-defs.h"`
`#include "gdbcmd.h"`
`#include "symfile.h"`
`#include "inferior.h"`
`#include "target-float.h"`
`#include "block.h"`
`#include "source.h"`
`#include "objfiles.h"`
`#include "user-regs.h"`
`#include <algorithm>`
`#include "common/gdb_optional.h"`

Go to the source code of this file.

## Functions
static void | show_expressiondebug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void | show_parserdebug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static int | prefixify_subexp (struct expression *, struct expression *, int, int)
static expression_up | parse_exp_in_context (const char **, CORE_ADDR, const struct block *, int, int, int *)
static expression_up | parse_exp_in_context_1 (const char **, CORE_ADDR, const struct block *, int, int, int *)
void | start_arglist (void)
int | end_arglist (void)
static void | write_exp_elt (struct parser_state *ps, const union exp_element *expelt)
void | write_exp_elt_opcode (struct parser_state *ps, enum exp_opcode expelt)
void | write_exp_elt_sym (struct parser_state *ps, struct symbol *expelt)
void | write_exp_elt_msym (struct parser_state *ps, minimal_symbol *expelt)
void | write_exp_elt_block (struct parser_state *ps, const struct block *b)
void | write_exp_elt_objfile (struct parser_state *ps, struct objfile *objfile)
void | write_exp_elt_longcst (struct parser_state *ps, LONGEST expelt)
void | write_exp_elt_floatcst (struct parser_state *ps, const gdb_byte expelt[16])
void | write_exp_elt_type (struct parser_state *ps, struct type *expelt)
void | write_exp_elt_intern (struct parser_state *ps, struct internalvar *expelt)
void | write_exp_string (struct parser_state *ps, struct stoken str)
void | write_exp_string_vector (struct parser_state *ps, int type, struct stoken_vector *vec)
void | write_exp_bitstring (struct parser_state *ps, struct stoken str)
type * | find_minsym_type_and_address (minimal_symbol *msymbol, struct objfile *objfile, CORE_ADDR *address_p)
void | write_exp_msymbol (struct parser_state *ps, struct bound_minimal_symbol bound_msym)
void | mark_struct_expression (struct parser_state *ps)
void | mark_completion_tag (enum type_code tag, const char *ptr, int length)
void | write_dollar_variable (struct parser_state *ps, struct stoken str)
const char * | find_template_name_end (const char *p)
char * | copy_name (struct stoken token)
int | prefixify_expression (struct expression *expr)
static int | length_of_subexp (struct expression *expr, int endpos)
void | operator_length (const struct expression *expr, int endpos, int *oplenp, int *argsp)
void | operator_length_standard (const struct expression *expr, int endpos, int *oplenp, int *argsp)
expression_up | parse_exp_1 (const char **stringptr, CORE_ADDR pc, const struct block *block, int comma)
expression_up | parse_expression (const char *string)
expression_up | parse_expression_with_language (const char *string, enum language lang)
struct type * | parse_expression_for_completion (const char *string, char **name, enum type_code *code)
void | null_post_parser (expression_up *exp, int void_context_p)
bool | parse_float (const char *p, int len, const struct type *type, gdb_byte *data)
static void | type_stack_reserve (struct type_stack *stack, int howmuch)
static void | check_type_stack_depth (void)
static void | insert_into_type_stack (int slot, union type_stack_elt element)
void | insert_type (enum type_pieces tp)
void | push_type (enum type_pieces tp)
void | push_type_int (int n)
void | insert_type_address_space (struct parser_state *pstate, char *string)
enum type_pieces | pop_type (void)
int | pop_type_int (void)
static | VEC (type_ptr)
static struct type_stack * | pop_type_stack (void)
struct type_stack * | append_type_stack (struct type_stack *to, struct type_stack *from)
void | push_type_stack (struct type_stack *stack)
struct type_stack * | get_type_stack (void)
void | type_stack_cleanup (void *arg)
void | push_typelist (VEC(type_ptr) *list)
type_instance_flags | follow_type_instance_flags ()
struct type * | follow_types (struct type *follow_type)
void | parser_fprintf (FILE *x, const char *y,...)
int | operator_check_standard (struct expression *exp, int pos, int(*objfile_func)(struct objfile *objfile, void *data), void *data)
static int | exp_iterate (struct expression *exp, int(*objfile_func)(struct objfile *objfile, void *data), void *data)
static int | exp_uses_objfile_iter (struct objfile *exp_objfile, void *objfile_voidp)
int | exp_uses_objfile (struct expression *exp, struct objfile *objfile)
void | increase_expout_size (struct parser_state *ps, size_t lenelt)
void | _initialize_parse (void)

## Variables
const struct exp_descriptor | exp_descriptor_standard
const struct block * | expression_context_block
CORE_ADDR | expression_context_pc
const struct block * | innermost_block
int | arglist_len
static struct type_stack | type_stack
const char * | lexptr
const char * | prev_lexptr
int | paren_depth
int | comma_terminates
int | parse_completion
static int | expout_last_struct = -1
static enum type_code | expout_tag_completion_type = TYPE_CODE_UNDEF
static char * | expout_completion_name
static unsigned int | expressiondebug = 0
int | parser_debug
static std::vector< int > * | funcall_chain

## Function Documentation

## ◆ _initialize_parse()

void _initialize_parse | ( | void |  | ) |

Definition at line 1874 of file parse.c.

References _, add_setshow_boolean_cmd(), add_setshow_zuinteger_cmd(), class_maintenance, type_stack::depth, type_stack::elements, expressiondebug, parser_debug, setdebuglist, show_expressiondebug(), show_parserdebug(), showdebuglist, and type_stack::size.

## ◆ append_type_stack()

struct type_stack* append_type_stack | ( | struct type_stack * | to,
|  | struct type_stack * | from
| ) |  |

Definition at line 1489 of file parse.c.

References type_stack::depth, type_stack::elements, and type_stack_reserve().

Referenced by yyparse().

## ◆ check_type_stack_depth()

static void check_type_stack_depth | ( | void |  | ) |
| static

Definition at line 1358 of file parse.c.

References type_stack_reserve().

Referenced by insert_into_type_stack(), push_type(), push_type_int(), push_type_stack(), and push_typelist().

## ◆ copy_name()

char* copy_name | ( | struct stoken | token | ) |

Definition at line 761 of file parse.c.

References xrealloc().

Referenced by add_psymbol_to_bcache(), add_psymbol_to_list(), c_print_token(), classify_inner_name(), classify_name(), classify_packaged_name(), classify_unsafe_function(), lex_one_token(), minimal_symbol_reader::record_full(), record_minimal_symbol(), symbol_set_names(), VEC(), write_dollar_variable(), yylex(), and yyparse().

## ◆ end_arglist()

int end_arglist | ( | void |  | ) |

Definition at line 143 of file parse.c.

References arglist_len, and funcall_chain.

Referenced by yyparse().

## ◆ exp_iterate()

static int exp_iterate | ( | struct expression * | exp,
|  | int(*)(struct objfile *objfile, void *data) | objfile_func,
|  | void * | data
| ) |  |
| static

Definition at line 1808 of file parse.c.

References gdb_assert, language_defn::la_exp_desc, expression::language_defn, expression::nelts, exp_descriptor::operator_check, and operator_length().

Referenced by exp_uses_objfile().

## ◆ exp_uses_objfile()

int exp_uses_objfile | ( | struct expression * | exp,
|  | struct objfile * | objfile
| ) |  |

Definition at line 1850 of file parse.c.

References exp_iterate(), exp_uses_objfile_iter(), gdb_assert, and objfile::separate_debug_objfile_backlink.

Referenced by clear_dangling_display_expressions().

## ◆ exp_uses_objfile_iter()

static int exp_uses_objfile_iter | ( | struct objfile * | exp_objfile,
|  | void * | objfile_voidp
| ) |  |
| static

Definition at line 1835 of file parse.c.

References objfile::objfile(), and objfile::separate_debug_objfile_backlink.

Referenced by exp_uses_objfile().

## ◆ find_minsym_type_and_address()

type* find_minsym_type_and_address | ( | minimal_symbol * | msymbol,
|  | struct objfile * | objfile,
|  | CORE_ADDR * | address_p
| ) |  |

Definition at line 444 of file parse.c.

References BMSYMBOL_VALUE_ADDRESS, current_target, gdbarch_convert_from_func_ptr_addr(), get_objfile_arch(), lookup_minimal_symbol_by_pc(), bound_minimal_symbol::minsym, mst_bss, mst_data, mst_file_bss, mst_file_data, mst_file_text, mst_slot_got_plt, mst_solib_trampoline, mst_text, mst_text_gnu_ifunc, exp_element::msymbol, MSYMBOL_OBJ_SECTION, MSYMBOL_TYPE, MSYMBOL_VALUE_RAW_ADDRESS, objfile_type::nodebug_data_symbol, objfile_type::nodebug_got_plt_symbol, objfile_type::nodebug_text_gnu_ifunc_symbol, objfile_type::nodebug_text_symbol, objfile_type::nodebug_tls_symbol, objfile_type::nodebug_unknown_symbol, objfile_type(), overlay_debugging, symbol_overlayed_address(), target_translate_tls_address(), and obj_section::the_bfd_section.

Referenced by evaluate_var_msym_value(), and gen_msym_var_ref().

## ◆ find_template_name_end()

const char* find_template_name_end | ( | const char * | p | ) |

Definition at line 690 of file parse.c.

Referenced by lex_one_token().

## ◆ follow_type_instance_flags()

type_instance_flags follow_type_instance_flags | ( |  | ) |

Definition at line 1556 of file parse.c.

References flags, gdb_assert_not_reached, pop_type(), tp_const, tp_end, tp_volatile, TYPE_INSTANCE_FLAG_CONST, and TYPE_INSTANCE_FLAG_VOLATILE.

Referenced by yyparse().

## ◆ follow_types()

struct type* follow_types | ( | struct type * | follow_type | ) |

Definition at line 1580 of file parse.c.

References type_stack::depth, follow_types(), gdb_assert, gdb_assert_not_reached, lookup_array_range_type(), lookup_function_type(), lookup_function_type_with_arguments(), lookup_lvalue_reference_type(), lookup_pointer_type(), lookup_rvalue_reference_type(), make_cv_type(), make_type_with_address_space(), pop_type(), pop_type_int(), pop_type_stack(), process_reference(), PROP_UNDEFINED, tp_array, tp_const, tp_end, tp_function, tp_function_with_arguments, tp_pointer, tp_reference, tp_rvalue_reference, tp_space_identifier, tp_type_stack, tp_volatile, TYPE_CONST, TYPE_HIGH_BOUND_KIND, TYPE_INDEX_TYPE, type_stack, TYPE_VOLATILE, VEC(), VEC_address, VEC_free, and VEC_length.

Referenced by follow_types(), and yyparse().

## ◆ get_type_stack()

struct type_stack* get_type_stack | ( | void |  | ) |

Definition at line 1515 of file parse.c.

References type_stack::depth, type_stack::elements, type_stack::size, type_stack, and XNEW.

Referenced by yyparse().

## ◆ increase_expout_size()

void increase_expout_size | ( | struct parser_state * | ps,
|  | size_t | lenelt
| ) |  |

Definition at line 1860 of file parse.c.

References EXP_ELEM_TO_BYTES, cleanup_check::ps, and XRESIZEVAR.

Referenced by write_exp_bitstring(), write_exp_string(), and write_exp_string_vector().

## ◆ insert_into_type_stack()

static void insert_into_type_stack | ( | int | slot,
|  | union type_stack_elt | element
| ) |  |
| static

Definition at line 1368 of file parse.c.

References check_type_stack_depth(), type_stack::depth, and type_stack::elements.

Referenced by insert_type(), and insert_type_address_space().

## ◆ insert_type()

void insert_type | ( | enum type_pieces | tp | ) |

Definition at line 1386 of file parse.c.

References type_stack::depth, gdb_assert, insert_into_type_stack(), type_stack_elt::piece, tp_const, tp_pointer, tp_reference, tp_rvalue_reference, and tp_volatile.

## ◆ insert_type_address_space()

void insert_type_address_space | ( | struct parser_state * | pstate,
|  | char * | string
| ) |  |

Definition at line 1430 of file parse.c.

References address_space_name_to_int(), type_stack::depth, insert_into_type_stack(), type_stack_elt::int_val, parse_gdbarch, type_stack_elt::piece, pstate, and tp_space_identifier.

Referenced by yyparse().

## ◆ length_of_subexp()

static int length_of_subexp | ( | struct expression * | expr,
|  | int | endpos
| ) |  |
| static

Definition at line 807 of file parse.c.

References operator_length().

Referenced by prefixify_subexp().

## ◆ mark_completion_tag()

void mark_completion_tag | ( | enum type_code | tag,
|  | const char * | ptr,
|  | int | length
| ) |  |

Definition at line 556 of file parse.c.

References expout_completion_name, expout_last_struct, expout_tag_completion_type, gdb_assert, parse_completion, TYPE_CODE_ENUM, TYPE_CODE_STRUCT, TYPE_CODE_UNDEF, TYPE_CODE_UNION, and xmalloc().

Referenced by yyparse().

## ◆ mark_struct_expression()

void mark_struct_expression | ( | struct parser_state * | ps | ) |

Definition at line 544 of file parse.c.

References expout_last_struct, expout_tag_completion_type, gdb_assert, parse_completion, cleanup_check::ps, and TYPE_CODE_UNDEF.

Referenced by convert_ast_to_expression(), and yyparse().

## ◆ null_post_parser()

void null_post_parser | ( | expression_up * | exp,
|  | int | void_context_p
| ) |  |

Definition at line 1319 of file parse.c.

## ◆ operator_check_standard()

int operator_check_standard | ( | struct expression * | exp,
|  | int | pos,
|  | int(*)(struct objfile *objfile, void *data) | objfile_func,
|  | void * | data
| ) |  |

Definition at line 1723 of file parse.c.

References exp_element::block, expression::elts, gdb_assert, exp_element::longconst, lookup_objfile_from_block(), exp_element::objfile, exp_element::symbol, symbol_objfile(), SYMBOL_TYPE, exp_element::type, and TYPE_OBJFILE.

Referenced by ada_operator_check(), and rust_operator_check().

## ◆ operator_length()

void operator_length | ( | const struct expression * | expr,
|  | int | endpos,
|  | int * | oplenp,
|  | int * | argsp
| ) |  |

Definition at line 827 of file parse.c.

References language_defn::la_exp_desc, expression::language_defn, and exp_descriptor::operator_length.

Referenced by exp_iterate(), length_of_subexp(), prefixify_subexp(), and watchpoint_exp_is_const().

## ◆ operator_length_standard()

void operator_length_standard | ( | const struct expression * | expr,
|  | int | endpos,
|  | int * | oplenp,
|  | int * | argsp
| ) |  |

Definition at line 837 of file parse.c.

References _, BOTH_BOUND_DEFAULT, BYTES_TO_EXP_ELEM, expression::elts, error(), HIGH_BOUND_DEFAULT, exp_element::longconst, longest_to_int(), LOW_BOUND_DEFAULT, NONE_BOUND_DEFAULT, and exp_element::opcode.

Referenced by ada_operator_length(), and rust_operator_length().

## ◆ parse_exp_1()

expression_up parse_exp_1 | ( | const char ** | stringptr,
|  | CORE_ADDR | pc,
|  | const struct block * | block,
|  | int | comma
| ) |  |

Definition at line 1089 of file parse.c.

References parse_exp_in_context().

Referenced by ada_read_renaming_var_value(), agent_eval_command_one(), create_excep_cond_exprs(), encode_actions_1(), find_condition_and_thread(), init_breakpoint_sal(), maint_agent_printf_command(), parse_cmd_to_aexpr(), parse_expression(), parse_to_comma_and_eval(), set_breakpoint_condition(), update_breakpoint_locations(), update_watchpoint(), validate_actionline(), varobj_create(), varobj_set_value(), and watch_command_1().

## ◆ parse_exp_in_context()

static expression_up parse_exp_in_context | ( | const char ** | stringptr,
|  | CORE_ADDR | pc,
|  | const struct block * | block,
|  | int | comma,
|  | int | void_context_p,
|  | int * | out_subexp
| ) |  |
| static

Definition at line 1096 of file parse.c.

References parse_exp_in_context_1().

Referenced by parse_exp_1(), and parse_expression_for_completion().

## ◆ parse_exp_in_context_1()

static expression_up parse_exp_in_context_1 | ( | const char ** | stringptr,
|  | CORE_ADDR | pc,
|  | const struct block * | block,
|  | int | comma,
|  | int | void_context_p,
|  | int * | out_subexp
| ) |  |
| static

Definition at line 1112 of file parse.c.

References _, block_linkage_function(), BLOCK_START, BLOCKVECTOR_BLOCK, CATCH, comma_terminates, current_language, type_stack::depth, dump_prefix_expression(), dump_raw_expression(), END_CATCH, error_no_arg(), expout_completion_name, expout_last_struct, expout_tag_completion_type, expression_context_block, expression_context_pc, expressiondebug, func, funcall_chain, gdb_stdlog, get_current_arch(), get_current_source_symtab_and_line(), get_selected_block(), language_defn::la_error, language_defn::la_language, language_defn::la_parser, language_defn::la_post_parser, language_def(), language_mode_auto, language_unknown, lexptr, make_scoped_restore(), paren_depth, parse_completion, prefixify_expression(), prev_lexptr, cleanup_check::ps, RETURN_MASK_ALL, set_language(), STATIC_BLOCK, SYMBOL_LANGUAGE, symtab_and_line::symtab, SYMTAB_BLOCKVECTOR, throw_exception(), TRY, TYPE_CODE_UNDEF, and xfree().

Referenced by parse_exp_in_context().

## ◆ parse_expression()

expression_up parse_expression | ( | const char * | string | ) |

Definition at line 1237 of file parse.c.

References _, error(), and parse_exp_1().

Referenced by display_command(), do_one_display(), dump_arc_instruction_command(), execute_control_command_1(), gnuv3_get_type_from_type_info(), info_mach_region_command(), init_if_undefined_command(), maintenance_print_type(), mi_cmd_data_evaluate_expression(), output_command_const(), parse_and_eval(), parse_and_eval_address(), parse_and_eval_long(), parse_and_eval_type(), parse_expression_with_language(), print_command_1(), print_object_command(), print_variable_or_computed(), return_command(), set_command(), whatis_exp(), and x_command().

## ◆ parse_expression_for_completion()

struct type* parse_expression_for_completion | ( | const char * | string,
|  | char ** | name,
|  | enum type_code * | code
| ) |  |

Definition at line 1270 of file parse.c.

References CATCH, code, END_CATCH, evaluate_subexpression_type(), expout_completion_name, expout_last_struct, expout_tag_completion_type, extract_field_op(), name, parse_completion, parse_exp_in_context(), RETURN_MASK_ERROR, TRY, TYPE_CODE_UNDEF, and value_type().

Referenced by complete_expression().

## ◆ parse_expression_with_language()

expression_up parse_expression_with_language | ( | const char * | string,
|  | enum language | lang
| ) |  |

Definition at line 1249 of file parse.c.

References current_language, gdb::optional< T >::emplace(), language_defn::la_language, parse_expression(), and set_language().

Referenced by dtrace_process_dof_probe().

## ◆ parse_float()

bool parse_float | ( | const char * | p,
|  | int | len,
|  | const struct type * | type,
|  | gdb_byte * | data
| ) |  |

Definition at line 1331 of file parse.c.

References string, and target_float_from_string().

Referenced by lex_number(), and parse_number().

## ◆ parser_fprintf()

void parser_fprintf | ( | FILE * | x,
|  | const char * | y,
|  |  | ...
| ) |  |

Definition at line 1705 of file parse.c.

References fprintf_unfiltered(), gdb_stderr, and vfprintf_unfiltered().

Referenced by c_print_token().

## ◆ pop_type()

enum type_pieces pop_type | ( | void |  | ) |

Definition at line 1451 of file parse.c.

References type_stack::depth, type_stack::elements, type_stack_elt::piece, and tp_end.

Referenced by follow_type_instance_flags(), follow_types(), and yyparse().

## ◆ pop_type_int()

int pop_type_int | ( | void |  | ) |

Definition at line 1459 of file parse.c.

References type_stack::depth, type_stack::elements, and type_stack_elt::int_val.

Referenced by follow_types(), and yyparse().

## ◆ pop_type_stack()

static struct type_stack* pop_type_stack | ( | void |  | ) |
| static

Definition at line 1479 of file parse.c.

References type_stack::depth, type_stack::elements, gdb_assert, and type_stack_elt::stack_val.

Referenced by follow_types().

## ◆ prefixify_expression()

int prefixify_expression | ( | struct expression * | expr | ) |

Definition at line 789 of file parse.c.

References EXP_ELEM_TO_BYTES, expression::nelts, and prefixify_subexp().

Referenced by dtrace_probe::build_arg_exprs(), stap_probe::parse_arguments(), and parse_exp_in_context_1().

## ◆ prefixify_subexp()

static int prefixify_subexp | ( | struct expression * | inexpr,
|  | struct expression * | outexpr,
|  | int | inend,
|  | int | outbeg
| ) |  |
| static

Definition at line 1022 of file parse.c.

References expression::elts, EXP_ELEM_TO_BYTES, expout_last_struct, length_of_subexp(), and operator_length().

Referenced by prefixify_expression().

## ◆ push_type()

void push_type | ( | enum type_pieces | tp | ) |

Definition at line 1408 of file parse.c.

References check_type_stack_depth(), type_stack::depth, type_stack::elements, and type_stack_elt::piece.

Referenced by push_type_stack(), push_typelist(), and yyparse().

## ◆ push_type_int()

void push_type_int | ( | int | n | ) |

Definition at line 1415 of file parse.c.

References check_type_stack_depth(), type_stack::depth, type_stack::elements, and type_stack_elt::int_val.

Referenced by yyparse().

## ◆ push_type_stack()

void push_type_stack | ( | struct type_stack * | stack | ) |

Definition at line 1503 of file parse.c.

References check_type_stack_depth(), type_stack::depth, type_stack::elements, push_type(), type_stack_elt::stack_val, and tp_type_stack.

Referenced by yyparse().

## ◆ push_typelist()

void push_typelist | ( | VEC(type_ptr) * | list | ) |

Definition at line 1543 of file parse.c.

References check_type_stack_depth(), type_stack::depth, type_stack::elements, push_type(), and tp_function_with_arguments.

Referenced by yyparse().

## ◆ show_expressiondebug()

static void show_expressiondebug | ( | struct ui_file * | file,
|  | int | from_tty,
|  | struct cmd_list_element * | c,
|  | const char * | value
| ) |  |
| static

Definition at line 96 of file parse.c.

References _, and fprintf_filtered().

Referenced by _initialize_parse().

## ◆ show_parserdebug()

static void show_parserdebug | ( | struct ui_file * | file,
|  | int | from_tty,
|  | struct cmd_list_element * | c,
|  | const char * | value
| ) |  |
| static

Definition at line 107 of file parse.c.

References _, and fprintf_filtered().

Referenced by _initialize_parse().

## ◆ start_arglist()

void start_arglist | ( | void |  | ) |

Definition at line 133 of file parse.c.

References arglist_len, and funcall_chain.

Referenced by yyparse().

## ◆ type_stack_cleanup()

void type_stack_cleanup | ( | void * | arg | ) |

Definition at line 1530 of file parse.c.

References type_stack::elements, and xfree().

Referenced by yyparse().

## ◆ type_stack_reserve()

static void type_stack_reserve | ( | struct type_stack * | stack,
|  | int | howmuch
| ) |  |
| static

Definition at line 1343 of file parse.c.

References value::stack, and XRESIZEVEC.

Referenced by append_type_stack(), and check_type_stack_depth().

## ◆ VEC()

static VEC | ( | type_ptr |  | ) |
| static

Definition at line 1469 of file parse.c.

References type_stack::depth, type_stack::elements, and gdb_assert.

Referenced by follow_types().

## ◆ write_dollar_variable()

void write_dollar_variable | ( | struct parser_state * | ps,
|  | struct stoken | str
| ) |  |

Definition at line 594 of file parse.c.

References block_symbol::block, copy_name(), create_internalvar(), stoken::length, lookup_bound_minimal_symbol(), lookup_only_internalvar(), lookup_symbol(), bound_minimal_symbol::minsym, parse_gdbarch, cleanup_check::ps, stoken::ptr, block_symbol::symbol, user_reg_map_name_to_regnum(), VAR_DOMAIN, write_exp_elt_block(), write_exp_elt_intern(), write_exp_elt_longcst(), write_exp_elt_opcode(), write_exp_elt_sym(), write_exp_msymbol(), and write_exp_string().

Referenced by convert_ast_to_expression(), yylex(), and yyparse().

## ◆ write_exp_bitstring()

void write_exp_bitstring | ( | struct parser_state * | ps,
|  | struct stoken | str
| ) |  |

Definition at line 413 of file parse.c.

References bits, BYTES_TO_EXP_ELEM, HOST_CHAR_BIT, increase_expout_size(), stoken::length, cleanup_check::ps, stoken::ptr, and write_exp_elt_longcst().

## ◆ write_exp_elt()

static void write_exp_elt | ( | struct parser_state * | ps,
|  | const union exp_element * | expelt
| ) |  |
| static

Definition at line 192 of file parse.c.

References EXP_ELEM_TO_BYTES, cleanup_check::ps, and XRESIZEVAR.

Referenced by write_exp_elt_block(), write_exp_elt_floatcst(), write_exp_elt_intern(), write_exp_elt_longcst(), write_exp_elt_msym(), write_exp_elt_objfile(), write_exp_elt_opcode(), write_exp_elt_sym(), and write_exp_elt_type().

## ◆ write_exp_elt_block()

void write_exp_elt_block | ( | struct parser_state * | ps,
|  | const struct block * | b
| ) |  |

Definition at line 235 of file parse.c.

References exp_element::block, memset(), cleanup_check::ps, and write_exp_elt().

Referenced by convert_ast_to_expression(), write_ambiguous_var(), write_dollar_variable(), write_var_from_sym(), and yyparse().

## ◆ write_exp_elt_floatcst()

void write_exp_elt_floatcst | ( | struct parser_state * | ps,
|  | const gdb_byte | expelt[16]
| ) |  |

Definition at line 265 of file parse.c.

References exp_element::floatconst, cleanup_check::ps, and write_exp_elt().

Referenced by convert_ast_to_expression(), and yyparse().

## ◆ write_exp_elt_intern()

void write_exp_elt_intern | ( | struct parser_state * | ps,
|  | struct internalvar * | expelt
| ) |  |

Definition at line 287 of file parse.c.

References exp_element::internalvar, memset(), cleanup_check::ps, and write_exp_elt().

Referenced by write_dollar_variable().

## ◆ write_exp_elt_longcst()

void write_exp_elt_longcst | ( | struct parser_state * | ps,
|  | LONGEST | expelt
| ) |  |

Definition at line 255 of file parse.c.

References exp_element::longconst, memset(), cleanup_check::ps, and write_exp_elt().

Referenced by aarch64_stap_parse_special_token(), amd64_dtrace_parse_probe_argument(), arm_stap_parse_special_token(), convert_ast_to_expression(), end_msglist(), i386_stap_parse_special_token_three_arg_disp(), i386_stap_parse_special_token_triplet(), stap_parse_register_operand(), stap_parse_single_operand(), write_dollar_variable(), write_exp_bitstring(), write_exp_string(), write_exp_string_vector(), write_int(), write_object_renaming(), and yyparse().

## ◆ write_exp_elt_msym()

void write_exp_elt_msym | ( | struct parser_state * | ps,
|  | minimal_symbol * | expelt
| ) |  |

Definition at line 225 of file parse.c.

References memset(), exp_element::msymbol, cleanup_check::ps, and write_exp_elt().

Referenced by write_exp_msymbol().

## ◆ write_exp_elt_objfile()

void write_exp_elt_objfile | ( | struct parser_state * | ps,
|  | struct objfile * | objfile
| ) |  |

Definition at line 245 of file parse.c.

References memset(), exp_element::objfile, cleanup_check::ps, and write_exp_elt().

Referenced by write_exp_msymbol().

## ◆ write_exp_elt_opcode()

void write_exp_elt_opcode | ( | struct parser_state * | ps,
|  | enum exp_opcode | expelt
| ) |  |

Definition at line 205 of file parse.c.

References memset(), exp_element::opcode, cleanup_check::ps, and write_exp_elt().

Referenced by aarch64_stap_parse_special_token(), amd64_dtrace_parse_probe_argument(), arm_stap_parse_special_token(), dtrace_probe::build_arg_exprs(), convert_ast_to_expression(), i386_stap_parse_special_token_three_arg_disp(), i386_stap_parse_special_token_triplet(), ppc_stap_parse_special_token(), stap_parse_argument(), stap_parse_argument_1(), stap_parse_register_operand(), stap_parse_single_operand(), write_ambiguous_var(), write_dollar_variable(), write_exp_msymbol(), write_exp_op_with_string(), write_exp_string_vector(), write_int(), write_object_renaming(), write_var_from_sym(), and yyparse().

## ◆ write_exp_elt_sym()

void write_exp_elt_sym | ( | struct parser_state * | ps,
|  | struct symbol * | expelt
| ) |  |

Definition at line 215 of file parse.c.

References memset(), cleanup_check::ps, exp_element::symbol, and write_exp_elt().

Referenced by convert_ast_to_expression(), write_ambiguous_var(), write_dollar_variable(), write_var_from_sym(), and yyparse().

## ◆ write_exp_elt_type()

void write_exp_elt_type | ( | struct parser_state * | ps,
|  | struct type * | expelt
| ) |  |

Definition at line 277 of file parse.c.

References memset(), cleanup_check::ps, exp_element::type, and write_exp_elt().

Referenced by aarch64_stap_parse_special_token(), amd64_dtrace_parse_probe_argument(), arm_stap_parse_special_token(), dtrace_probe::build_arg_exprs(), convert_ast_to_expression(), i386_stap_parse_special_token_three_arg_disp(), i386_stap_parse_special_token_triplet(), stap_parse_argument(), stap_parse_register_operand(), stap_parse_single_operand(), write_int(), write_object_renaming(), and yyparse().

## ◆ write_exp_msymbol()

void write_exp_msymbol | ( | struct parser_state * | ps,
|  | struct bound_minimal_symbol | bound_msym
| ) |  |

Definition at line 531 of file parse.c.

References bound_minimal_symbol::minsym, bound_minimal_symbol::objfile, cleanup_check::ps, write_exp_elt_msym(), write_exp_elt_objfile(), and write_exp_elt_opcode().

Referenced by write_dollar_variable(), write_var_or_type(), and yyparse().

## ◆ write_exp_string()

void write_exp_string | ( | struct parser_state * | ps,
|  | struct stoken | str
| ) |  |

Definition at line 318 of file parse.c.

References BYTES_TO_EXP_ELEM, increase_expout_size(), stoken::length, cleanup_check::ps, stoken::ptr, and write_exp_elt_longcst().

Referenced by aarch64_stap_parse_special_token(), amd64_dtrace_parse_probe_argument(), arm_stap_parse_special_token(), convert_ast_to_expression(), i386_stap_parse_special_token_three_arg_disp(), i386_stap_parse_special_token_triplet(), ppc_stap_parse_special_token(), stap_parse_register_operand(), write_destructor_name(), write_dollar_variable(), write_exp_op_with_string(), and yyparse().

## ◆ write_exp_string_vector()

void write_exp_string_vector | ( | struct parser_state * | ps,
|  | int | type,
|  | struct stoken_vector * | vec
| ) |  |

Definition at line 360 of file parse.c.

References BYTES_TO_EXP_ELEM, EXP_ELEM_TO_BYTES, increase_expout_size(), stoken_vector::len, typed_stoken::length, cleanup_check::ps, typed_stoken::ptr, stoken_vector::tokens, write_exp_elt_longcst(), and write_exp_elt_opcode().

Referenced by yyparse().

## Variable Documentation

## ◆ arglist_len

int arglist_len

Definition at line 72 of file parse.c.

Referenced by end_arglist(), start_arglist(), and yyparse().

## ◆ comma_terminates

int comma_terminates

Definition at line 77 of file parse.c.

Referenced by lex_one_token(), parse_exp_in_context_1(), rustyylex(), and yylex().

## ◆ exp_descriptor_standard

const struct exp_descriptor exp_descriptor_standard

Initial value:
=
{
print_subexp_standard,
operator_length_standard,
operator_check_standard,
op_name_standard,
dump_subexp_body_standard,
evaluate_subexp_standard
}
operator_check_standard
int operator_check_standard(struct expression *exp, int pos, int(*objfile_func)(struct objfile *objfile, void *data), void *data)
Definition: parse.c:1723
dump_subexp_body_standard
int dump_subexp_body_standard(struct expression *exp, struct ui_file *stream, int elt)
Definition: expprint.c:795
print_subexp_standard
void print_subexp_standard(struct expression *exp, int *pos, struct ui_file *stream, enum precedence prec)
Definition: expprint.c:58
evaluate_subexp_standard
struct value * evaluate_subexp_standard(struct type *expect_type, struct expression *exp, int *pos, enum noside noside)
Definition: eval.c:1240
operator_length_standard
void operator_length_standard(const struct expression *expr, int endpos, int *oplenp, int *argsp)
Definition: parse.c:837
op_name_standard
const char * op_name_standard(enum exp_opcode opcode)
Definition: expprint.c:695

Definition at line 58 of file parse.c.

## ◆ expout_completion_name

char* expout_completion_name
| static

Definition at line 91 of file parse.c.

Referenced by mark_completion_tag(), parse_exp_in_context_1(), and parse_expression_for_completion().

## ◆ expout_last_struct

int expout_last_struct = -1
| static

Definition at line 85 of file parse.c.

Referenced by mark_completion_tag(), mark_struct_expression(), parse_exp_in_context_1(), parse_expression_for_completion(), and prefixify_subexp().

## ◆ expout_tag_completion_type

enum type_code expout_tag_completion_type = TYPE_CODE_UNDEF
| static

Definition at line 88 of file parse.c.

Referenced by mark_completion_tag(), mark_struct_expression(), parse_exp_in_context_1(), and parse_expression_for_completion().

## ◆ expression_context_block

const struct block* expression_context_block

Definition at line 69 of file parse.c.

Referenced by c_parse(), clear_symtab_users(), convert_ast_to_expression(), convert_ast_to_type(), crate_name(), lex_one_token(), parse_exp_in_context_1(), super_name(), VEC(), write_name_assoc(), write_var_or_type(), yylex(), yyparse(), and objfile::~objfile().

## ◆ expression_context_pc

CORE_ADDR expression_context_pc

Definition at line 70 of file parse.c.

Referenced by c_parse(), and parse_exp_in_context_1().

## ◆ expressiondebug

unsigned int expressiondebug = 0
| static

Definition at line 94 of file parse.c.

Referenced by _initialize_parse(), and parse_exp_in_context_1().

## ◆ funcall_chain

std::vector<int>* funcall_chain
| static

Definition at line 127 of file parse.c.

Referenced by end_arglist(), parse_exp_in_context_1(), and start_arglist().

## ◆ innermost_block

const struct block* innermost_block

Definition at line 71 of file parse.c.

Referenced by clear_symtab_users(), display_command(), do_one_display(), resolve_subexp(), set_breakpoint_condition(), update_innermost_block(), varobj_create(), watch_command_1(), write_var_from_sym(), yyparse(), and objfile::~objfile().

## ◆ lexptr

const char* lexptr

Definition at line 74 of file parse.c.

Referenced by parse_exp_in_context_1().

## ◆ paren_depth

int paren_depth

Definition at line 76 of file parse.c.

Referenced by lex_one_token(), parse_exp_in_context_1(), rustyylex(), and yylex().

## ◆ parse_completion

int parse_completion

Definition at line 80 of file parse.c.

Referenced by ada_resolve_function(), lex_identifier(), lex_one_token(), mark_completion_tag(), mark_struct_expression(), parse_exp_in_context_1(), parse_expression_for_completion(), rust_parse(), rustyylex(), and yylex().

## ◆ parser_debug

int parser_debug

Definition at line 104 of file parse.c.

Referenced by _initialize_parse(), c_parse(), d_parse(), and go_parse().

## ◆ prev_lexptr

const char* prev_lexptr

Definition at line 75 of file parse.c.

Referenced by parse_exp_in_context_1().

## ◆ type_stack

struct type_stack type_stack
| static

Definition at line 73 of file parse.c.

Referenced by follow_types(), and get_type_stack().