GDB (xrefs)
|
#include "defs.h"
#include "symtab.h"
#include "frame.h"
#include "command.h"
#include "symfile.h"
#include "objfiles.h"
#include "source.h"
#include "demangle.h"
#include "value.h"
#include "completer.h"
#include "cp-abi.h"
#include "cp-support.h"
#include "parser-defs.h"
#include "block.h"
#include "objc-lang.h"
#include "linespec.h"
#include "exceptions.h"
#include "language.h"
#include "interps.h"
#include "mi/mi-cmds.h"
#include "target.h"
#include "arch-utils.h"
#include <ctype.h>
#include "cli/cli-utils.h"
#include "filenames.h"
#include "ada-lang.h"
#include "stack.h"
Go to the source code of this file.
#define LS_TOKEN_KEYWORD | ( | TOK | ) | (TOK).data.keyword |
Definition at line 271 of file linespec.c.
Referenced by copy_token_string(), and linespec_lexer_lex_one().
#define LS_TOKEN_STOKEN | ( | TOK | ) | (TOK).data.string |
Definition at line 270 of file linespec.c.
Referenced by copy_token_string(), linespec_lexer_lex_one(), linespec_lexer_lex_string(), linespec_parse_basic(), and parse_linespec().
#define PARSER_RESULT | ( | PPTR | ) | (&(PPTR)->result) |
Definition at line 305 of file linespec.c.
Referenced by linespec_parse_basic(), linespec_parser_delete(), linespec_parser_new(), and parse_linespec().
#define PARSER_STATE | ( | PPTR | ) | (&(PPTR)->state) |
Definition at line 301 of file linespec.c.
Referenced by decode_line_full(), linespec_lexer_lex_string(), linespec_parse_basic(), linespec_parser_delete(), linespec_parser_new(), and parse_linespec().
#define PARSER_STREAM | ( | P | ) | (*(P)->lexer.stream) |
Definition at line 285 of file linespec.c.
Referenced by linespec_lexer_lex_one(), linespec_lexer_lex_string(), linespec_lexer_peek_token(), and parse_linespec().
typedef struct bound_minimal_symbol bound_minimal_symbol_d |
Definition at line 64 of file linespec.c.
typedef struct linespec* linespec_p |
Definition at line 148 of file linespec.c.
typedef struct ls_parser linespec_parser |
Definition at line 307 of file linespec.c.
typedef struct ls_token linespec_token |
Definition at line 268 of file linespec.c.
typedef enum ls_token_type linespec_token_type |
Definition at line 245 of file linespec.c.
Definition at line 48 of file linespec.c.
Definition at line 51 of file linespec.c.
enum ls_token_type |
LSTOKEN_KEYWORD | |
LSTOKEN_COLON | |
LSTOKEN_STRING | |
LSTOKEN_NUMBER | |
LSTOKEN_COMMA | |
LSTOKEN_EOI | |
LSTOKEN_CONSUMED |
Definition at line 222 of file linespec.c.
enum offset_relative_sign |
Definition at line 69 of file linespec.c.
static void add_all_symbol_names_from_pspace | ( | struct collect_info * | info, |
struct program_space * | pspace, | ||
VEC(const_char_ptr)* | names | ||
) | [static] |
Definition at line 2826 of file linespec.c.
References add_matching_symbols_to_info(), and VEC_iterate.
Referenced by decode_objc(), find_function_symbols(), and find_method().
static void add_matching_symbols_to_info | ( | const char * | name, |
struct collect_info * | info, | ||
struct program_space * | pspace | ||
) | [static] |
Definition at line 3603 of file linespec.c.
References collect_symbols(), gdb_assert, iterate_over_all_matching_symtabs(), iterate_over_file_blocks(), search_minsyms_for_name(), set_current_program_space(), collect_info::state, SYMTAB_PSPACE, VAR_DOMAIN, and VEC_iterate.
Referenced by add_all_symbol_names_from_pspace(), and find_function_symbols().
static void add_minsym | ( | struct minimal_symbol * | minsym, |
void * | d | ||
) | [static] |
Definition at line 3496 of file linespec.c.
References current_target, gdbarch_convert_from_func_ptr_addr(), get_objfile_arch(), collect_minsyms::list_mode, bound_minimal_symbol::minsym, mst_abs, mst_bss, mst_data, mst_file_bss, mst_file_data, mst_slot_got_plt, bound_minimal_symbol::objfile, collect_minsyms::objfile, SYMBOL_VALUE_ADDRESS, and VEC_safe_push.
Referenced by search_minsyms_for_name().
static void add_sal_to_sals | ( | struct linespec_state * | self, |
struct symtabs_and_lines * | sals, | ||
struct symtab_and_line * | sal, | ||
const char * | symname, | ||
int | literal_canonical | ||
) | [static] |
Definition at line 852 of file linespec.c.
References add_sal_to_sals_basic(), language_ada, symtab_and_line::line, symtabs_and_lines::nelts, linespec_canonical_name::suffix, linespec_canonical_name::symtab, symtab_and_line::symtab, symtab_to_fullname(), xrealloc(), and xstrprintf().
Referenced by convert_linespec_to_sals(), create_sals_line_offset(), decode_digits_list_mode(), and minsym_found().
static void add_sal_to_sals_basic | ( | struct symtabs_and_lines * | sals, |
struct symtab_and_line * | sal | ||
) | [static] |
Definition at line 836 of file linespec.c.
References symtabs_and_lines::nelts, symtabs_and_lines::sals, and xrealloc().
Referenced by add_sal_to_sals(), decode_digits_ordinary(), and filter_results().
static int add_symtabs_to_list | ( | struct symtab * | symtab, |
void * | d | ||
) | [static] |
static char* canonical_to_fullform | ( | const struct linespec_canonical_name * | canonical | ) | [static] |
Definition at line 1229 of file linespec.c.
References linespec_canonical_name::suffix, linespec_canonical_name::symtab, symtab_to_fullname(), and xstrprintf().
Referenced by decode_line_2(), and filter_results().
static void canonicalize_linespec | ( | struct linespec_state * | state, |
linespec_p | ls | ||
) | [static] |
Definition at line 1762 of file linespec.c.
References linespec_result::addr_string, linespec_state::canonical, linespec::expression, fprintf_filtered(), fputc_unfiltered(), fputs_unfiltered(), gdb_assert, linespec::labels, linespec::line_offset, LINE_OFFSET_NONE, LINE_OFFSET_PLUS, LINE_OFFSET_UNKNOWN, mem_fileopen(), line_offset::offset, line_offset::sign, linespec::source_filename, linespec_result::special_display, SYMBOL_NATURAL_NAME, ui_file_delete(), ui_file_xstrdup(), VEC_index, and VEC_length.
Referenced by convert_linespec_to_sals().
static int classify_mtype | ( | enum minimal_symbol_type | t | ) | [static] |
Definition at line 3459 of file linespec.c.
References mst_file_bss, mst_file_data, mst_file_text, and mst_solib_trampoline.
Referenced by compare_msyms(), and search_minsyms_for_name().
static void cleanup_linespec_result | ( | void * | a | ) | [static] |
Definition at line 3703 of file linespec.c.
References destroy_linespec_result().
Referenced by make_cleanup_destroy_linespec_result().
static int collect_one_symbol | ( | struct symbol * | sym, |
void * | d | ||
) | [static] |
Definition at line 2687 of file linespec.c.
References CHECK_TYPEDEF, LOC_TYPEDEF, SYMBOL_CLASS, SYMBOL_TYPE, TYPE_CODE, TYPE_CODE_NAMESPACE, TYPE_CODE_STRUCT, TYPE_CODE_UNION, and VEC_safe_push.
Referenced by VEC().
static int collect_symbols | ( | struct symbol * | sym, |
void * | data | ||
) | [static] |
Definition at line 3397 of file linespec.c.
References linespec_state::list_mode, LOC_BLOCK, collect_info::result, collect_info::state, SYMBOL_CLASS, and VEC_safe_push.
Referenced by add_matching_symbols_to_info().
static int compare_msymbols | ( | const void * | a, |
const void * | b | ||
) | [static] |
Definition at line 2795 of file linespec.c.
References bound_minimal_symbol::minsym, bound_minimal_symbol::objfile, and objfile::pspace.
Referenced by convert_linespec_to_sals().
static int compare_msyms | ( | const void * | a, |
const void * | b | ||
) | [static] |
Definition at line 3482 of file linespec.c.
References classify_mtype(), bound_minimal_symbol::minsym, and MSYMBOL_TYPE.
Referenced by search_minsyms_for_name().
static int compare_symbols | ( | const void * | a, |
const void * | b | ||
) | [static] |
Definition at line 2767 of file linespec.c.
References SYMBOL_SYMTAB, and SYMTAB_PSPACE.
Referenced by convert_linespec_to_sals(), and find_method().
static struct symtabs_and_lines convert_linespec_to_sals | ( | struct linespec_state * | state, |
linespec_p | ls | ||
) | [static, read] |
Definition at line 1984 of file linespec.c.
References add_sal_to_sals(), canonicalize_linespec(), compare_msymbols(), compare_symbols(), create_sals_line_offset(), find_pc_line(), find_pc_overlay(), LINE_OFFSET_UNKNOWN, maybe_add_address(), bound_minimal_symbol::minsym, minsym_found(), symtabs_and_lines::nelts, bound_minimal_symbol::objfile, symtab_and_line::pc, objfile::pspace, qsort, set_current_program_space(), SYMBOL_NATURAL_NAME, SYMBOL_SYMTAB, symbol_to_sal(), SYMTAB_PSPACE, symtab_to_fullname(), VEC_address, VEC_iterate, and VEC_length.
Referenced by decode_objc(), and parse_linespec().
static void convert_results_to_lsals | ( | struct linespec_state * | self, |
struct symtabs_and_lines * | result | ||
) | [static] |
Definition at line 1285 of file linespec.c.
References linespec_sals::canonical, linespec_sals::sals, and VEC_safe_push.
Referenced by decode_line_2(), and decode_line_full().
static char* copy_token_string | ( | linespec_token | token | ) | [static] |
Definition at line 488 of file linespec.c.
References LS_TOKEN_KEYWORD, LS_TOKEN_STOKEN, LSTOKEN_KEYWORD, remove_trailing_whitespace(), savestring(), and ls_token::type.
Referenced by linespec_parse_basic(), parse_linespec(), and unexpected_linespec_error().
static struct symtabs_and_lines create_sals_line_offset | ( | struct linespec_state * | self, |
linespec_p | ls | ||
) | [static, read] |
Definition at line 1833 of file linespec.c.
References _, add_sal_to_sals(), best_entry, block_containing_function(), block_for_pc_sect(), decode_digits_list_mode(), decode_digits_ordinary(), do_cleanups(), init_sal(), initialize_defaults(), linetable_entry::line, symtab_and_line::line, LINE_OFFSET_MINUS, LINE_OFFSET_NONE, LINE_OFFSET_PLUS, make_cleanup(), symtabs_and_lines::nelts, NOT_FOUND_ERROR, symtab_and_line::pc, symtab_and_line::pspace, symtabs_and_lines::sals, symtab_and_line::section, set_current_program_space(), set_default_source_symtab_and_line(), skip_prologue_sal(), SYMBOL_NATURAL_NAME, symtab_to_fullname(), throw_error(), VEC_free, VEC_index, VEC_length, VEC_pop, and xfree().
Referenced by convert_linespec_to_sals().
static void decode_digits_list_mode | ( | struct linespec_state * | self, |
linespec_p | ls, | ||
struct symtabs_and_lines * | values, | ||
struct symtab_and_line | val | ||
) | [static] |
Definition at line 3264 of file linespec.c.
References add_sal_to_sals(), symtab_and_line::explicit_line, find_line_symtab(), gdb_assert, symtab_and_line::line, symtab_and_line::pc, symtab_and_line::pspace, set_current_program_space(), symtab_and_line::symtab, SYMTAB_PSPACE, and VEC_iterate.
Referenced by create_sals_line_offset().
static void decode_digits_ordinary | ( | struct linespec_state * | self, |
linespec_p | ls, | ||
int | line, | ||
struct symtabs_and_lines * | sals, | ||
struct linetable_entry ** | best_entry | ||
) | [static] |
Definition at line 3298 of file linespec.c.
References add_sal_to_sals_basic(), gdb_assert, init_sal(), symtab_and_line::line, line, symtab_and_line::pc, symtab_and_line::pspace, set_current_program_space(), symtab_and_line::symtab, SYMTAB_PSPACE, VEC, VEC_free, and VEC_iterate.
Referenced by create_sals_line_offset().
struct symtabs_and_lines decode_line_1 | ( | char ** | argptr, |
int | flags, | ||
struct symtab * | default_symtab, | ||
int | default_line | ||
) | [read] |
Definition at line 2495 of file linespec.c.
References current_language, do_cleanups(), linespec_parser_delete(), linespec_parser_new(), make_cleanup(), parse_linespec(), and save_current_program_space().
Referenced by decode_line_with_current_source(), decode_line_with_last_displayed(), edit_command(), gdb_get_file_command(), gdb_get_function_command(), gdb_get_line_command(), gdb_get_vars_command(), list_command(), scope_info(), tracepoint_exists(), and until_break_command().
static void decode_line_2 | ( | struct linespec_state * | self, |
struct symtabs_and_lines * | result, | ||
const char * | select_mode | ||
) | [static] |
Definition at line 1339 of file linespec.c.
References _, canonical_to_fullform(), command_line_input(), convert_results_to_lsals(), decode_line_2_compare_items(), decode_line_2_item::displayform, do_cleanups(), error(), error_no_arg(), filter_results(), get_number_or_range_state::finished, decode_line_2_item::fullform, gdb_assert, get_number_or_range(), init_number_or_range(), make_cleanup(), multiple_symbols_all, multiple_symbols_cancel, symtabs_and_lines::nelts, printf_unfiltered(), qsort, decode_line_2_item::selected, linespec_canonical_name::suffix, linespec_canonical_name::symtab, symtab_to_filename_for_display(), VEC, VEC_cleanup, VEC_safe_push, xfree(), xmalloc(), and xstrprintf().
Referenced by decode_line_full().
static int decode_line_2_compare_items | ( | const void * | ap, |
const void * | bp | ||
) | [static] |
Definition at line 1320 of file linespec.c.
References decode_line_2_item::displayform, and decode_line_2_item::fullform.
Referenced by decode_line_2().
void decode_line_full | ( | char ** | argptr, |
int | flags, | ||
struct symtab * | default_symtab, | ||
int | default_line, | ||
struct linespec_result * | canonical, | ||
const char * | select_mode, | ||
const char * | filter | ||
) |
Definition at line 2418 of file linespec.c.
References linespec_result::addr_string, linespec_state::canonical_names, convert_results_to_lsals(), current_language, decode_line_2(), DECODE_LINE_LIST_MODE, do_cleanups(), filter_results(), gdb_assert, interp_ui_out(), linespec_parser_delete(), linespec_parser_new(), make_cleanup(), multiple_symbols_all, multiple_symbols_ask, multiple_symbols_cancel, multiple_symbols_select_mode(), symtabs_and_lines::nelts, parse_linespec(), PARSER_STATE, linespec_result::pre_expanded, save_current_program_space(), linespec_canonical_name::suffix, top_level_interpreter(), ui_out_is_mi_like_p(), VEC, VEC_cleanup, VEC_safe_push, and xfree().
Referenced by agent_command_1(), break_range_command(), decode_linespec_default(), and parse_breakpoint_sals().
struct symtabs_and_lines decode_line_with_current_source | ( | char * | string, |
int | flags | ||
) | [read] |
Definition at line 2520 of file linespec.c.
References _, decode_line_1(), error(), get_current_source_symtab_and_line(), symtab_and_line::line, and symtab_and_line::symtab.
Referenced by clear_command(), func_command(), gdb_loc(), info_macros_command(), mi_cmd_trace_find(), select_source_symtab(), and trace_find_line_command().
struct symtabs_and_lines decode_line_with_last_displayed | ( | char * | string, |
int | flags | ||
) | [read] |
Definition at line 2543 of file linespec.c.
References _, decode_line_1(), error(), get_last_displayed_line(), get_last_displayed_symtab(), last_displayed_sal_is_valid(), and symtabs_and_lines::sals.
Referenced by jump_command(), and line_info().
static struct symtabs_and_lines decode_objc | ( | struct linespec_state * | self, |
linespec_p | ls, | ||
const char ** | argptr | ||
) | [static, read] |
Definition at line 2611 of file linespec.c.
References add_all_symbol_names_from_pspace(), convert_linespec_to_sals(), do_cleanups(), find_imps(), make_cleanup(), memcpy(), symtabs_and_lines::nelts, collect_info::result, symtabs_and_lines::sals, collect_info::state, VEC, VEC_cleanup, VEC_empty, VEC_safe_push, and xstrprintf().
Referenced by parse_linespec().
void destroy_linespec_result | ( | struct linespec_result * | ls | ) |
Definition at line 3686 of file linespec.c.
References linespec_result::addr_string, linespec_sals::canonical, linespec_sals::sals, symtabs_and_lines::sals, VEC_free, VEC_iterate, and xfree().
Referenced by cleanup_linespec_result(), and decode_linespec_default().
static int eq_address_entry | ( | const void * | a, |
const void * | b | ||
) | [static] |
Definition at line 909 of file linespec.c.
References address_entry::addr, and address_entry::pspace.
Referenced by linespec_state_constructor().
static void filter_results | ( | struct linespec_state * | self, |
struct symtabs_and_lines * | result, | ||
VEC(const_char_ptr)* | filters | ||
) | [static] |
Definition at line 1242 of file linespec.c.
References add_sal_to_sals_basic(), linespec_sals::canonical, canonical_to_fullform(), do_cleanups(), make_cleanup(), memset(), name, symtabs_and_lines::nelts, linespec_sals::sals, symtabs_and_lines::sals, VEC_iterate, VEC_safe_push, and xfree().
Referenced by decode_line_2(), and decode_line_full().
static void find_function_symbols | ( | struct linespec_state * | state, |
VEC(symtab_ptr)* | file_symtabs, | ||
const char * | name, | ||
VEC(symbolp)** | symbols, | ||
VEC(bound_minimal_symbol_d)** | minsyms | ||
) | [static] |
Definition at line 3046 of file linespec.c.
References add_all_symbol_names_from_pspace(), add_matching_symbols_to_info(), do_cleanups(), find_imps(), make_cleanup(), collect_info::result, collect_info::state, VEC, VEC_cleanup, VEC_empty, and VEC_free.
Referenced by find_linespec_symbols().
static void find_linespec_symbols | ( | struct linespec_state * | state, |
VEC(symtab_ptr)* | file_symtabs, | ||
const char * | name, | ||
VEC(symbolp)** | symbols, | ||
VEC(bound_minimal_symbol_d)** | minsyms | ||
) | [static] |
Definition at line 3091 of file linespec.c.
References ada_name_for_lookup(), cp_canonicalize_string_no_typedefs(), demangle_for_lookup(), do_cleanups(), gdb_exception::error, find_function_symbols(), find_method(), find_toplevel_string(), language_defn::la_language, linespec_state::language, language_ada, make_cleanup(), NOT_FOUND_ERROR, p, gdb_exception::reason, RETURN_MASK_ERROR, throw_exception(), TRY_CATCH, VEC, VEC_cleanup, VEC_empty, xfree(), and xmalloc().
Referenced by linespec_parse_basic().
static void find_method | ( | struct linespec_state * | self, |
VEC(symtab_ptr)* | file_symtabs, | ||
const char * | class_name, | ||
const char * | method_name, | ||
VEC(symbolp)* | sym_classes, | ||
VEC(symbolp)** | symbols, | ||
VEC(bound_minimal_symbol_d)** | minsyms | ||
) | [static] |
Definition at line 2872 of file linespec.c.
References _, add_all_symbol_names_from_pspace(), check_typedef(), compare_symbols(), do_cleanups(), program_space::executing_startup, find_methods(), find_superclass_methods(), gdb_assert, make_cleanup(), NOT_FOUND_ERROR, null_cleanup(), qsort, collect_info::result, set_current_program_space(), collect_info::state, SYMBOL_SYMTAB, SYMBOL_TYPE, SYMTAB_PSPACE, throw_error(), VEC, VEC_address, VEC_cleanup, VEC_empty, VEC_index, VEC_iterate, VEC_length, and VEC_truncate.
Referenced by find_linespec_symbols().
static void find_methods | ( | struct type * | t, |
const char * | name, | ||
VEC(const_char_ptr)** | result_names, | ||
VEC(typep)** | superclasses | ||
) | [static] |
Definition at line 1096 of file linespec.c.
References CHECK_TYPEDEF, strcmp_iw(), TYPE_BASECLASS, TYPE_FN_FIELD_PHYSNAME, TYPE_FN_FIELD_STUB, TYPE_FN_FIELDLIST1, TYPE_FN_FIELDLIST_LENGTH, TYPE_FN_FIELDLIST_NAME, TYPE_N_BASECLASSES, type_name_no_tag(), TYPE_NFN_FIELDS, and VEC_safe_push.
Referenced by find_method(), and find_superclass_methods().
static const char* find_parameter_list_end | ( | const char * | input | ) | [static] |
static void find_superclass_methods | ( | VEC(typep)* | superclasses, |
const char * | name, | ||
VEC(const_char_ptr)** | result_names | ||
) | [static] |
Definition at line 2838 of file linespec.c.
References do_cleanups(), find_methods(), make_cleanup(), null_cleanup(), VEC, VEC_cleanup, VEC_empty, VEC_iterate, and VEC_length.
Referenced by find_method().
static const char* find_toplevel_char | ( | const char * | s, |
char | c | ||
) | [static] |
Definition at line 1165 of file linespec.c.
References scan().
Referenced by find_toplevel_string(), and skip_quote_char().
static const char* find_toplevel_string | ( | const char * | haystack, |
const char * | needle | ||
) | [static] |
Definition at line 1200 of file linespec.c.
References find_toplevel_char().
Referenced by find_linespec_symbols().
static struct block* get_current_search_block | ( | void | ) | [static, read] |
Definition at line 1062 of file linespec.c.
References current_language, get_selected_block(), language_defn::la_language, and set_language().
static hashval_t hash_address_entry | ( | const void * | p | ) | [static] |
Definition at line 897 of file linespec.c.
References address_entry::addr, hash(), and address_entry::pspace.
Referenced by linespec_state_constructor().
void init_linespec_result | ( | struct linespec_result * | lr | ) |
Definition at line 3678 of file linespec.c.
References memset().
Referenced by agent_command_1(), break_range_command(), create_breakpoint(), and decode_linespec_default().
static void initialize_defaults | ( | struct symtab ** | default_symtab, |
int * | default_line | ||
) | [static] |
Definition at line 2568 of file linespec.c.
References get_current_source_symtab_and_line(), symtab_and_line::line, and symtab_and_line::symtab.
Referenced by create_sals_line_offset(), and parse_linespec().
static int is_ada_operator | ( | const char * | string | ) | [static] |
Definition at line 452 of file linespec.c.
References ada_opname_table, ada_opname_map::decoded, and ada_opname_map::encoded.
Referenced by linespec_lexer_lex_string(), and parse_linespec().
static int is_closing_quote_enclosed | ( | const char * | p | ) | [static] |
Definition at line 506 of file linespec.c.
References linespec_lexer_lex_keyword(), skip_spaces(), and strchr().
Referenced by linespec_lexer_lex_one(), linespec_lexer_lex_string(), and parse_linespec().
static int iterate_inline_only | ( | struct symbol * | sym, |
void * | d | ||
) | [static] |
Definition at line 956 of file linespec.c.
References symbol_and_data_callback::callback, symbol_and_data_callback::data, and SYMBOL_INLINED.
Referenced by iterate_over_all_matching_symtabs().
static int iterate_name_matcher | ( | const char * | name, |
void * | d | ||
) | [static] |
Definition at line 982 of file linespec.c.
References symbol_matcher_data::lookup_name, and symbol_matcher_data::symbol_name_cmp.
Referenced by iterate_over_all_matching_symtabs().
static void iterate_over_all_matching_symtabs | ( | struct linespec_state * | state, |
const char * | name, | ||
const domain_enum | domain, | ||
symbol_found_callback_ftype * | callback, | ||
void * | data, | ||
struct program_space * | search_pspace, | ||
int | include_inline | ||
) | [static] |
Definition at line 998 of file linespec.c.
References ALL_DOMAIN, ALL_OBJFILE_PRIMARY_SYMTABS, ALL_OBJFILES, ALL_PSPACES, BLOCKVECTOR, BLOCKVECTOR_BLOCK, BLOCKVECTOR_NBLOCKS, symbol_and_data_callback::callback, program_space::executing_startup, quick_symbol_functions::expand_symtabs_matching, FIRST_LOCAL_BLOCK, iterate_inline_only(), iterate_name_matcher(), iterate_over_file_blocks(), language_defn::la_get_symbol_name_cmp, language_defn::la_iterate_over_symbols, linespec_state::language, symbol_matcher_data::lookup_name, name, sym_fns::qf, set_current_program_space(), objfile::sf, strcmp_iw(), and symbol_matcher_data::symbol_name_cmp.
Referenced by add_matching_symbols_to_info(), and VEC().
static void iterate_over_file_blocks | ( | struct symtab * | symtab, |
const char * | name, | ||
domain_enum | domain, | ||
symbol_found_callback_ftype * | callback, | ||
void * | data | ||
) | [static] |
Definition at line 1079 of file linespec.c.
References BLOCK_SUPERBLOCK, BLOCKVECTOR, BLOCKVECTOR_BLOCK, LA_ITERATE_OVER_SYMBOLS, and STATIC_BLOCK.
Referenced by add_matching_symbols_to_info(), iterate_over_all_matching_symtabs(), and VEC().
static CORE_ADDR linespec_expression_to_pc | ( | const char ** | exp_ptr | ) | [static] |
Definition at line 2589 of file linespec.c.
References _, current_program_space, program_space::executing_startup, NOT_FOUND_ERROR, parse_to_comma_and_eval(), throw_error(), and value_as_address().
Referenced by parse_linespec().
static linespec_token linespec_lexer_consume_token | ( | linespec_parser * | parser | ) | [static] |
Definition at line 810 of file linespec.c.
References ls_parser::current, ls_parser::lexer, linespec_lexer_lex_one(), LSTOKEN_CONSUMED, and ls_token::type.
Referenced by linespec_lexer_peek_token(), linespec_parse_basic(), and parse_linespec().
static const char* linespec_lexer_lex_keyword | ( | const char * | p | ) | [static] |
Definition at line 426 of file linespec.c.
References len, and linespec_keywords.
Referenced by is_closing_quote_enclosed(), linespec_lexer_lex_one(), and linespec_lexer_lex_string().
static linespec_token linespec_lexer_lex_one | ( | linespec_parser * | parser | ) | [static] |
Definition at line 729 of file linespec.c.
References ls_parser::current, is_closing_quote_enclosed(), ls_parser::is_quote_enclosed, ls_parser::keyword_ok, ls_parser::lexer, linespec_lexer_lex_keyword(), linespec_lexer_lex_string(), LS_TOKEN_KEYWORD, LS_TOKEN_STOKEN, LSTOKEN_COLON, LSTOKEN_COMMA, LSTOKEN_CONSUMED, LSTOKEN_EOI, LSTOKEN_KEYWORD, PARSER_STREAM, skip_spaces_const(), and ls_token::type.
Referenced by linespec_lexer_consume_token(), linespec_parse_basic(), parse_linespec(), and unexpected_linespec_error().
static linespec_token linespec_lexer_lex_string | ( | linespec_parser * | parser | ) | [static] |
Definition at line 557 of file linespec.c.
References _, error(), find_parameter_list_end(), is_ada_operator(), is_closing_quote_enclosed(), is_operator_name(), ls_parser::is_quote_enclosed, language_ada, language_cplus, len, linespec_lexer_lex_keyword(), LS_TOKEN_STOKEN, LSTOKEN_STRING, p, PARSER_STATE, PARSER_STREAM, skip_quote_char(), skip_spaces_const(), strchr(), strstr(), token, and ls_token::type.
Referenced by linespec_lexer_lex_one().
static linespec_token linespec_lexer_peek_token | ( | linespec_parser * | parser | ) | [static] |
Definition at line 819 of file linespec.c.
References ls_parser::current, ls_parser::lexer, linespec_lexer_consume_token(), and PARSER_STREAM.
Referenced by parse_linespec().
static void linespec_parse_basic | ( | linespec_parser * | parser | ) | [static] |
Definition at line 1578 of file linespec.c.
References _, copy_token_string(), discard_cleanups(), do_cleanups(), find_linespec_symbols(), LINE_OFFSET_UNKNOWN, linespec_lexer_consume_token(), linespec_lexer_lex_one(), linespec_parse_line_offset(), linespec_parse_variable(), LS_TOKEN_STOKEN, LSTOKEN_COLON, LSTOKEN_COMMA, LSTOKEN_EOI, LSTOKEN_KEYWORD, LSTOKEN_NUMBER, LSTOKEN_STRING, make_cleanup(), name, NOT_FOUND_ERROR, PARSER_RESULT, PARSER_STATE, line_offset::sign, throw_error(), token, ls_token::type, unexpected_linespec_error(), VEC, and xfree().
Referenced by parse_linespec().
static struct line_offset linespec_parse_line_offset | ( | const char * | string | ) | [static, read] |
Definition at line 1555 of file linespec.c.
References LINE_OFFSET_MINUS, LINE_OFFSET_NONE, LINE_OFFSET_PLUS, line_offset::offset, line_offset::sign, and string.
Referenced by linespec_parse_basic().
static struct line_offset linespec_parse_variable | ( | struct linespec_state * | self, |
const char * | variable | ||
) | [static, read] |
Definition at line 3340 of file linespec.c.
References _, access_value_history(), error(), get_internalvar_integer(), LINE_OFFSET_NONE, LINE_OFFSET_UNKNOWN, LONGEST, lookup_only_internalvar(), offset, line_offset::offset, p, line_offset::sign, TYPE_CODE, TYPE_CODE_INT, value_as_long(), and value_type().
Referenced by linespec_parse_basic(), and parse_linespec().
static void linespec_parser_delete | ( | void * | arg | ) | [static] |
Definition at line 2388 of file linespec.c.
References linespec_state_destructor(), PARSER_RESULT, PARSER_STATE, VEC_free, and xfree().
Referenced by decode_line_1(), and decode_line_full().
static void linespec_parser_new | ( | linespec_parser * | parser, |
int | flags, | ||
const struct language_defn * | language, | ||
struct symtab * | default_symtab, | ||
int | default_line, | ||
struct linespec_result * | canonical | ||
) | [static] |
Definition at line 2364 of file linespec.c.
References ls_parser::current, ls_parser::lexer, LINE_OFFSET_UNKNOWN, linespec_state_constructor(), LSTOKEN_CONSUMED, memset(), PARSER_RESULT, PARSER_STATE, and ls_token::type.
Referenced by decode_line_1(), and decode_line_full().
static void linespec_state_constructor | ( | struct linespec_state * | self, |
int | flags, | ||
const struct language_defn * | language, | ||
struct symtab * | default_symtab, | ||
int | default_line, | ||
struct linespec_result * | canonical | ||
) | [static] |
Definition at line 2343 of file linespec.c.
References current_program_space, DECODE_LINE_FUNFIRSTLINE, DECODE_LINE_LIST_MODE, eq_address_entry(), hash_address_entry(), memset(), xcalloc(), and xfree().
Referenced by linespec_parser_new().
static void linespec_state_destructor | ( | struct linespec_state * | self | ) | [static] |
Definition at line 2380 of file linespec.c.
Referenced by linespec_parser_delete().
struct cleanup* make_cleanup_destroy_linespec_result | ( | struct linespec_result * | ls | ) | [read] |
Definition at line 3711 of file linespec.c.
References cleanup_linespec_result(), and make_cleanup().
Referenced by agent_command_1(), break_range_command(), and create_breakpoint().
static int maybe_add_address | ( | htab_t | set, |
struct program_space * | pspace, | ||
CORE_ADDR | addr | ||
) | [static] |
Definition at line 922 of file linespec.c.
References address_entry::addr, memcpy(), p, and address_entry::pspace.
Referenced by convert_linespec_to_sals(), and minsym_found().
static void minsym_found | ( | struct linespec_state * | self, |
struct objfile * | objfile, | ||
struct minimal_symbol * | msymbol, | ||
struct symtabs_and_lines * | result | ||
) | [static] |
Definition at line 3412 of file linespec.c.
References add_sal_to_sals(), current_target, find_pc_sect_line(), gdbarch_convert_from_func_ptr_addr(), get_objfile_arch(), maybe_add_address(), objfile::pspace, skip_prologue_sal(), SYMBOL_NATURAL_NAME, SYMBOL_OBJ_SECTION, and SYMBOL_VALUE_ADDRESS.
Referenced by convert_linespec_to_sals().
static struct symtabs_and_lines parse_linespec | ( | linespec_parser * | parser, |
const char ** | argptr | ||
) | [static, read] |
Definition at line 2147 of file linespec.c.
References convert_linespec_to_sals(), copy_token_string(), decode_objc(), discard_cleanups(), do_cleanups(), gdb_assert, initialize_defaults(), is_ada_operator(), is_closing_quote_enclosed(), LINE_OFFSET_UNKNOWN, linespec_expression_to_pc(), linespec_lexer_consume_token(), linespec_lexer_lex_one(), linespec_lexer_peek_token(), linespec_parse_basic(), linespec_parse_variable(), LS_TOKEN_STOKEN, LSTOKEN_COLON, LSTOKEN_COMMA, LSTOKEN_EOI, LSTOKEN_KEYWORD, LSTOKEN_NUMBER, LSTOKEN_STRING, make_cleanup(), PARSER_RESULT, PARSER_STATE, PARSER_STREAM, gdb_exception::reason, RETURN_MASK_ERROR, symtabs_and_lines::sals, line_offset::sign, skip_quote_char(), strchr(), strstr(), symbol_not_found_error(), throw_exception(), token, TRY_CATCH, ls_token::type, unexpected_linespec_error(), VEC_safe_push, and xfree().
Referenced by decode_line_1(), and decode_line_full().
static void search_minsyms_for_name | ( | struct collect_info * | info, |
const char * | name, | ||
struct program_space * | search_pspace | ||
) | [static] |
Definition at line 3534 of file linespec.c.
References add_minsym(), ALL_OBJFILES, ALL_PSPACES, classify_mtype(), compare_msyms(), do_cleanups(), program_space::executing_startup, linespec_state::funfirstline, collect_minsyms::funfirstline, iterate_over_minimal_symbols(), linespec_state::list_mode, collect_minsyms::list_mode, make_cleanup(), memset(), bound_minimal_symbol::minsym, MSYMBOL_TYPE, collect_minsyms::objfile, qsort, collect_info::result, set_current_program_space(), collect_info::state, VEC_address, VEC_cleanup, VEC_empty, VEC_index, VEC_iterate, VEC_length, and VEC_safe_push.
Referenced by add_matching_symbols_to_info().
static const char* skip_quote_char | ( | const char * | string, |
char | quote_char | ||
) | [static] |
Definition at line 469 of file linespec.c.
References find_toplevel_char(), and p.
Referenced by linespec_lexer_lex_string(), and parse_linespec().
static void ATTRIBUTE_NORETURN symbol_not_found_error | ( | const char * | symbol, |
const char * | filename | ||
) | [static] |
Definition at line 1482 of file linespec.c.
References _, have_full_symbols(), have_minimal_symbols(), have_partial_symbols(), NOT_FOUND_ERROR, and throw_error().
Referenced by parse_linespec().
static int symbol_to_sal | ( | struct symtab_and_line * | result, |
int | funfirstline, | ||
struct symbol * | sym | ||
) | [static] |
Definition at line 3637 of file linespec.c.
References symtab_and_line::explicit_pc, find_function_start_sal(), init_sal(), symtab_and_line::line, LOC_BLOCK, LOC_LABEL, symtab_and_line::pc, symtab_and_line::pspace, SYMBOL_CLASS, SYMBOL_LINE, SYMBOL_SYMTAB, SYMBOL_VALUE_ADDRESS, symtab_and_line::symtab, and SYMTAB_PSPACE.
Referenced by convert_linespec_to_sals().
static void ATTRIBUTE_NORETURN unexpected_linespec_error | ( | linespec_parser * | parser | ) | [static] |
Definition at line 1524 of file linespec.c.
References _, copy_token_string(), GENERIC_ERROR, linespec_lexer_lex_one(), LSTOKEN_KEYWORD, LSTOKEN_NUMBER, LSTOKEN_STRING, make_cleanup(), string, throw_error(), token, ls_token::type, and xfree().
Referenced by linespec_parse_basic(), and parse_linespec().
Definition at line 325 of file linespec.c.
Definition at line 2715 of file linespec.c.
References collect_one_symbol(), discard_cleanups(), do_cleanups(), gdb_assert, iterate_over_all_matching_symtabs(), iterate_over_file_blocks(), make_cleanup(), make_cleanup_htab_delete(), set_current_program_space(), STRUCT_DOMAIN, SYMTAB_PSPACE, VAR_DOMAIN, VEC_cleanup, VEC_iterate, xcalloc(), and xfree().
static VEC | ( | symtab_ptr | ) | [static] |
Definition at line 2994 of file linespec.c.
References add_symtabs_to_list(), ALL_PSPACES, do_cleanups(), program_space::executing_startup, iterate_over_symtabs(), make_cleanup_htab_delete(), and set_current_program_space().
const char* const linespec_keywords[] = { "if", "thread", "task" } [static] |
Definition at line 249 of file linespec.c.
Referenced by linespec_lexer_lex_keyword().