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 "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"
#include "location.h"
#include "gdbsupport/function-view.h"
#include "gdbsupport/def-vector.h"
#include <algorithm>
#include "inferior.h"
Go to the source code of this file.
Classes | |
struct | address_entry |
struct | linespec |
struct | linespec_canonical_name |
struct | linespec_state |
struct | collect_info |
struct | symbol_searcher_collect_info |
struct | linespec_token |
struct | linespec_parser |
struct | linespec_parser::state |
struct | decode_line_2_item |
Macros | |
#define | IF_KEYWORD_INDEX 0 |
#define | FORCE_KEYWORD_INDEX 4 |
#define | LS_TOKEN_STOKEN(TOK) (TOK).data.string |
#define | LS_TOKEN_KEYWORD(TOK) (TOK).data.keyword |
#define | PARSER_STREAM(P) ((P)->lexer.stream) |
#define | PARSER_STATE(PPTR) (&(PPTR)->state) |
#define | PARSER_RESULT(PPTR) (&(PPTR)->result) |
#define | PARSER_EXPLICIT(PPTR) (&PARSER_RESULT ((PPTR))->explicit_loc) |
Enumerations | |
enum class | linespec_complete_what { NOTHING , FUNCTION , LABEL , EXPRESSION , KEYWORD } |
enum | linespec_token_type { LSTOKEN_KEYWORD = 0 , LSTOKEN_COLON , LSTOKEN_STRING , LSTOKEN_NUMBER , LSTOKEN_COMMA , LSTOKEN_EOI , LSTOKEN_CONSUMED } |
Functions | |
static void | iterate_over_file_blocks (struct symtab *symtab, const lookup_name_info &name, domain_enum domain, gdb::function_view< symbol_found_callback_ftype > callback) |
static void | initialize_defaults (struct symtab **default_symtab, int *default_line) |
CORE_ADDR | linespec_expression_to_pc (const char **exp_ptr) |
static std::vector< symtab_and_line > | decode_objc (struct linespec_state *self, linespec *ls, const char *arg) |
static std::vector< symtab * > | symtabs_from_filename (const char *, struct program_space *pspace) |
static std::vector< block_symbol > | find_label_symbols (struct linespec_state *self, const std::vector< block_symbol > &function_symbols, std::vector< block_symbol > *label_funcs_ret, const char *name, bool completion_mode=false) |
static void | find_linespec_symbols (struct linespec_state *self, const std::vector< symtab * > &file_symtabs, const char *name, symbol_name_match_type name_match_type, std::vector< block_symbol > *symbols, std::vector< bound_minimal_symbol > *minsyms) |
static struct line_offset | linespec_parse_variable (struct linespec_state *self, const char *variable) |
static int | symbol_to_sal (struct symtab_and_line *result, int funfirstline, struct symbol *sym) |
static void | add_matching_symbols_to_info (const char *name, symbol_name_match_type name_match_type, enum search_domain search_domain, struct collect_info *info, struct program_space *pspace) |
static void | add_all_symbol_names_from_pspace (struct collect_info *info, struct program_space *pspace, const std::vector< const char * > &names, enum search_domain search_domain) |
static std::vector< symtab * > | collect_symtabs_from_filename (const char *file, struct program_space *pspace) |
static std::vector< symtab_and_line > | decode_digits_ordinary (struct linespec_state *self, linespec *ls, int line, const linetable_entry **best_entry) |
static std::vector< symtab_and_line > | decode_digits_list_mode (struct linespec_state *self, linespec *ls, struct symtab_and_line val) |
static void | minsym_found (struct linespec_state *self, struct objfile *objfile, struct minimal_symbol *msymbol, std::vector< symtab_and_line > *result) |
static bool | compare_symbols (const block_symbol &a, const block_symbol &b) |
static bool | compare_msymbols (const bound_minimal_symbol &a, const bound_minimal_symbol &b) |
static int | linespec_lexer_lex_number (linespec_parser *parser, linespec_token *tokenp) |
const char * | linespec_lexer_lex_keyword (const char *p) |
int | is_ada_operator (const char *string) |
static const char * | skip_quote_char (const char *string, char quote_char) |
static gdb::unique_xmalloc_ptr< char > | copy_token_string (linespec_token token) |
static int | is_closing_quote_enclosed (const char *p) |
static const char * | find_parameter_list_end (const char *input) |
static size_t | string_find_incomplete_keyword_at_end (const char *const *keywords, const char *string, size_t string_len) |
static linespec_token | linespec_lexer_lex_string (linespec_parser *parser) |
static linespec_token | linespec_lexer_lex_one (linespec_parser *parser) |
static linespec_token | linespec_lexer_consume_token (linespec_parser *parser) |
static linespec_token | linespec_lexer_peek_token (linespec_parser *parser) |
static void | add_sal_to_sals (struct linespec_state *self, std::vector< symtab_and_line > *sals, struct symtab_and_line *sal, const char *symname, int literal_canonical) |
static hashval_t | hash_address_entry (const void *p) |
static int | eq_address_entry (const void *a, const void *b) |
static int | maybe_add_address (htab_t set, struct program_space *pspace, CORE_ADDR addr) |
static void | iterate_over_all_matching_symtabs (struct linespec_state *state, const lookup_name_info &lookup_name, const domain_enum name_domain, enum search_domain search_domain, struct program_space *search_pspace, bool include_inline, gdb::function_view< symbol_found_callback_ftype > callback) |
static const struct block * | get_current_search_block (void) |
static void | find_methods (struct type *t, enum language t_lang, const char *name, std::vector< const char * > *result_names, std::vector< struct type * > *superclasses) |
static const char * | find_toplevel_string (const char *haystack, const char *needle) |
static std::string | canonical_to_fullform (const struct linespec_canonical_name *canonical) |
static void | filter_results (struct linespec_state *self, std::vector< symtab_and_line > *result, const std::vector< const char * > &filters) |
static void | convert_results_to_lsals (struct linespec_state *self, std::vector< symtab_and_line > *result) |
static bool | decode_line_2_compare_items (const decode_line_2_item &a, const decode_line_2_item &b) |
static void | decode_line_2 (struct linespec_state *self, std::vector< symtab_and_line > *result, const char *select_mode) |
static void ATTRIBUTE_NORETURN | symbol_not_found_error (const char *symbol, const char *filename) |
static void ATTRIBUTE_NORETURN | unexpected_linespec_error (linespec_parser *parser) |
static void ATTRIBUTE_NORETURN | undefined_label_error (const char *function, const char *label) |
static void ATTRIBUTE_NORETURN | source_file_not_found_error (const char *name) |
static linespec_token | save_stream_and_consume_token (linespec_parser *parser) |
struct line_offset | linespec_parse_line_offset (const char *string) |
static void | set_completion_after_number (linespec_parser *parser, linespec_complete_what next) |
static void | linespec_parse_basic (linespec_parser *parser) |
static void | canonicalize_linespec (struct linespec_state *state, const linespec *ls) |
static std::vector< symtab_and_line > | create_sals_line_offset (struct linespec_state *self, linespec *ls) |
static std::vector< symtab_and_line > | convert_address_location_to_sals (struct linespec_state *self, CORE_ADDR address) |
static std::vector< symtab_and_line > | convert_linespec_to_sals (struct linespec_state *state, linespec *ls) |
static void | convert_explicit_location_spec_to_linespec (struct linespec_state *self, linespec *result, const char *source_filename, const char *function_name, symbol_name_match_type fname_match_type, const char *label_name, struct line_offset line_offset) |
static std::vector< symtab_and_line > | convert_explicit_location_spec_to_sals (struct linespec_state *self, linespec *result, const explicit_location_spec *explicit_spec) |
static std::vector< symtab_and_line > | parse_linespec (linespec_parser *parser, const char *arg, symbol_name_match_type match_type) |
static void | linespec_state_constructor (struct linespec_state *self, int flags, const struct language_defn *language, struct program_space *search_pspace, struct symtab *default_symtab, int default_line, struct linespec_result *canonical) |
static void | linespec_state_destructor (struct linespec_state *self) |
void | linespec_lex_to_end (const char **stringp) |
void | linespec_complete_function (completion_tracker &tracker, const char *function, symbol_name_match_type func_match_type, const char *source_filename) |
static void | complete_linespec_component (linespec_parser *parser, completion_tracker &tracker, const char *text, linespec_complete_what component, const char *source_filename) |
static void | complete_label (completion_tracker &tracker, linespec_parser *parser, const char *label_name) |
void | linespec_complete_label (completion_tracker &tracker, const struct language_defn *language, const char *source_filename, const char *function_name, symbol_name_match_type func_name_match_type, const char *label_name) |
void | linespec_complete (completion_tracker &tracker, const char *text, symbol_name_match_type match_type) |
static std::vector< symtab_and_line > | location_spec_to_sals (linespec_parser *parser, const location_spec *locspec) |
void | decode_line_full (struct location_spec *locspec, int flags, struct program_space *search_pspace, struct symtab *default_symtab, int default_line, struct linespec_result *canonical, const char *select_mode, const char *filter) |
std::vector< symtab_and_line > | decode_line_1 (const location_spec *locspec, int flags, struct program_space *search_pspace, struct symtab *default_symtab, int default_line) |
std::vector< symtab_and_line > | decode_line_with_current_source (const char *string, int flags) |
std::vector< symtab_and_line > | decode_line_with_last_displayed (const char *string, int flags) |
static std::vector< block_symbol > | lookup_prefix_sym (struct linespec_state *state, const std::vector< symtab * > &file_symtabs, const char *class_name) |
static void | add_all_symbol_names_from_pspace (struct collect_info *info, struct program_space *pspace, const std::vector< const char * > &names, enum search_domain search_domain) |
static void | find_superclass_methods (std::vector< struct type * > &&superclasses, const char *name, enum language name_lang, std::vector< const char * > *result_names) |
static void | find_method (struct linespec_state *self, const std::vector< symtab * > &file_symtabs, const char *class_name, const char *method_name, std::vector< block_symbol > *sym_classes, std::vector< block_symbol > *symbols, std::vector< bound_minimal_symbol > *minsyms) |
static void | find_function_symbols (struct linespec_state *state, const std::vector< symtab * > &file_symtabs, const char *name, symbol_name_match_type name_match_type, std::vector< block_symbol > *symbols, std::vector< bound_minimal_symbol > *minsyms) |
static void | find_label_symbols_in_block (const struct block *block, const char *name, struct symbol *fn_sym, bool completion_mode, std::vector< block_symbol > *result, std::vector< block_symbol > *label_funcs_ret) |
static void | add_minsym (struct minimal_symbol *minsym, struct objfile *objfile, struct symtab *symtab, int list_mode, std::vector< struct bound_minimal_symbol > *msyms) |
static void | search_minsyms_for_name (struct collect_info *info, const lookup_name_info &name, struct program_space *search_pspace, struct symtab *symtab) |
static void | add_matching_symbols_to_info (const char *name, symbol_name_match_type name_match_type, enum search_domain search_domain, struct collect_info *info, struct program_space *pspace) |
const char * | get_gdb_linespec_parser_quote_characters (void) |
Variables | |
const char *const | linespec_keywords [] = { "if", "thread", "task", "inferior", "-force-condition", NULL } |
static const char | linespec_quote_characters [] = "\"\'" |
#define FORCE_KEYWORD_INDEX 4 |
Definition at line 259 of file linespec.c.
Referenced by linespec_lexer_lex_keyword().
#define IF_KEYWORD_INDEX 0 |
Definition at line 258 of file linespec.c.
Referenced by linespec_lexer_lex_keyword().
#define LS_TOKEN_KEYWORD | ( | TOK | ) | (TOK).data.keyword |
Definition at line 280 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 279 of file linespec.c.
Referenced by copy_token_string(), linespec_lexer_consume_token(), linespec_lexer_lex_number(), linespec_lexer_lex_one(), linespec_lexer_lex_string(), linespec_parse_basic(), and parse_linespec().
#define PARSER_EXPLICIT | ( | PPTR | ) | (&PARSER_RESULT ((PPTR))->explicit_loc) |
Definition at line 347 of file linespec.c.
Referenced by complete_linespec_component(), linespec_complete(), linespec_parse_basic(), linespec_parser::linespec_parser(), and parse_linespec().
#define PARSER_RESULT | ( | PPTR | ) | (&(PPTR)->result) |
Definition at line 319 of file linespec.c.
Referenced by complete_label(), linespec_complete(), linespec_complete_label(), linespec_parse_basic(), location_spec_to_sals(), and parse_linespec().
#define PARSER_STATE | ( | PPTR | ) | (&(PPTR)->state) |
Definition at line 315 of file linespec.c.
Referenced by complete_label(), decode_line_full(), linespec_complete(), linespec_complete_label(), linespec_lexer_lex_string(), linespec_parse_basic(), linespec_parser::linespec_parser(), location_spec_to_sals(), parse_linespec(), and linespec_parser::~linespec_parser().
#define PARSER_STREAM | ( | P | ) | ((P)->lexer.stream) |
Definition at line 304 of file linespec.c.
Referenced by linespec_complete(), linespec_lex_to_end(), linespec_lexer_consume_token(), linespec_lexer_lex_number(), linespec_lexer_lex_one(), linespec_lexer_lex_string(), linespec_lexer_peek_token(), linespec_parse_basic(), parse_linespec(), save_stream_and_consume_token(), and set_completion_after_number().
|
strong |
Enumerator | |
---|---|
NOTHING | |
FUNCTION | |
LABEL | |
EXPRESSION | |
KEYWORD |
Definition at line 55 of file linespec.c.
enum linespec_token_type |
Enumerator | |
---|---|
LSTOKEN_KEYWORD | |
LSTOKEN_COLON | |
LSTOKEN_STRING | |
LSTOKEN_NUMBER | |
LSTOKEN_COMMA | |
LSTOKEN_EOI | |
LSTOKEN_CONSUMED |
Definition at line 231 of file linespec.c.
|
static |
Referenced by decode_objc(), find_function_symbols(), and find_method().
|
static |
Definition at line 3523 of file linespec.c.
References add_matching_symbols_to_info(), and FULL.
|
static |
Referenced by add_all_symbol_names_from_pspace(), symbol_searcher::find_all_symbols(), and find_function_symbols().
|
static |
Definition at line 4311 of file linespec.c.
References program_space::executing_startup, iterate_over_all_matching_symtabs(), iterate_over_file_blocks(), language_asm, name, search_minsyms_for_name(), set_current_program_space(), and VAR_DOMAIN.
|
static |
Definition at line 4173 of file linespec.c.
References find_pc_sect_line(), msymbol_is_function(), and symtab_and_line::symtab.
Referenced by search_minsyms_for_name().
|
static |
Definition at line 1058 of file linespec.c.
References linespec_state::canonical, linespec_state::canonical_names, language_defn::la_language, linespec_state::language, language_ada, symtab_and_line::line, linespec_canonical_name::suffix, linespec_canonical_name::symtab, symtab_and_line::symtab, and symtab_to_fullname().
Referenced by convert_address_location_to_sals(), convert_linespec_to_sals(), create_sals_line_offset(), decode_digits_list_mode(), and minsym_found().
|
static |
Definition at line 1333 of file linespec.c.
References linespec_canonical_name::suffix, linespec_canonical_name::symtab, and symtab_to_fullname().
Referenced by decode_line_2(), and filter_results().
|
static |
Definition at line 1995 of file linespec.c.
References as_explicit_location_spec(), linespec_state::canonical, explicit_location_spec::clone(), linespec::explicit_loc, explicit_location_spec::function_name, linespec::function_symbols, linespec_state::is_linespec, explicit_location_spec::label_name, linespec::labels, linespec_result::locspec, general_symbol_info::natural_name(), location_spec::set_string(), linespec_result::special_display, block_symbol::symbol, and explicit_location_spec::to_linespec().
Referenced by convert_linespec_to_sals().
|
static |
Definition at line 3695 of file linespec.c.
References iterate_over_symtabs(), program_spaces, and set_current_program_space().
Referenced by create_sals_line_offset(), and symtabs_from_filename().
|
static |
Definition at line 3496 of file linespec.c.
References bound_minimal_symbol::minsym, bound_minimal_symbol::objfile, and objfile::pspace.
Referenced by convert_linespec_to_sals().
|
static |
Definition at line 3472 of file linespec.c.
References symtab::compunit(), compunit_symtab::objfile(), objfile::pspace, block_symbol::symbol, and symbol::symtab.
Referenced by convert_linespec_to_sals(), and find_method().
|
static |
Definition at line 2821 of file linespec.c.
References completion_tracker::add_completion(), find_label_symbols(), PARSER_RESULT, and PARSER_STATE.
Referenced by linespec_complete(), and linespec_complete_label().
|
static |
Definition at line 2757 of file linespec.c.
References completion_tracker::add_completions(), advance_to_expression_complete_word_point(), complete_expression(), complete_on_enum(), complete_source_filenames(), EXPRESSION, FUNCTION, completion_tracker::have_completions(), KEYWORD, linespec_complete_function(), linespec_keywords, PARSER_EXPLICIT, completion_tracker::quote_char(), completion_tracker::set_quote_char(), and completion_tracker::set_suppress_append_ws().
Referenced by linespec_complete().
|
static |
Definition at line 2158 of file linespec.c.
References add_sal_to_sals(), general_symbol_info::address, symtab_and_line::explicit_pc, find_pc_line(), find_pc_overlay(), find_pc_sect_containing_function(), symtab_and_line::pc, symtab_and_line::section, and symtab_and_line::symbol.
Referenced by location_spec_to_sals().
|
static |
Definition at line 2313 of file linespec.c.
References linespec::explicit_loc, linespec::file_symtabs, find_label_symbols(), find_linespec_symbols(), explicit_location_spec::func_name_match_type, explicit_location_spec::function_name, linespec::function_symbols, explicit_location_spec::label_name, linespec::label_symbols, linespec::labels, explicit_location_spec::line_offset, LINE_OFFSET_UNKNOWN, linespec::minimal_symbols, linespec_state::search_pspace, line_offset::sign, source_file_not_found_error(), explicit_location_spec::source_filename, symbol_not_found_error(), symtabs_from_filename(), and undefined_label_error().
Referenced by convert_explicit_location_spec_to_sals(), and linespec_complete_label().
|
static |
Definition at line 2385 of file linespec.c.
References convert_explicit_location_spec_to_linespec(), convert_linespec_to_sals(), explicit_location_spec::func_name_match_type, explicit_location_spec::function_name, explicit_location_spec::label_name, explicit_location_spec::line_offset, and explicit_location_spec::source_filename.
Referenced by location_spec_to_sals().
|
static |
Definition at line 2176 of file linespec.c.
References add_sal_to_sals(), linespec_state::addr_set, linespec_state::canonical, canonicalize_linespec(), compare_msymbols(), compare_symbols(), create_sals_line_offset(), current_inferior(), linespec_state::default_symtab, linespec::explicit_loc, symtab::filename, linespec::function_symbols, linespec_state::funfirstline, gdbarch_convert_from_func_ptr_addr(), linespec::label_symbols, linespec::labels, explicit_location_spec::line_offset, LINE_OFFSET_UNKNOWN, LOC_BLOCK, maybe_add_address(), linespec::minimal_symbols, minsym_found(), mst_data_gnu_ifunc, mst_text_gnu_ifunc, general_symbol_info::natural_name(), symtab_and_line::pc, linespec_result::pre_expanded, set_current_program_space(), line_offset::sign, explicit_location_spec::source_filename, symtab_and_line::symbol, and symbol_to_sal().
Referenced by convert_explicit_location_spec_to_sals(), decode_objc(), and parse_linespec().
|
static |
Definition at line 1378 of file linespec.c.
References linespec_state::canonical, linespec_sals::canonical, linespec_result::lsals, and linespec_sals::sals.
Referenced by decode_line_2(), and decode_line_full().
|
static |
Definition at line 578 of file linespec.c.
References LS_TOKEN_KEYWORD, LS_TOKEN_STOKEN, LSTOKEN_KEYWORD, remove_trailing_whitespace(), and token.
Referenced by linespec_parse_basic(), parse_linespec(), and unexpected_linespec_error().
|
static |
Definition at line 2028 of file linespec.c.
References add_sal_to_sals(), block_for_pc_sect(), collect_symtabs_from_filename(), decode_digits_list_mode(), decode_digits_ordinary(), linespec_state::default_line, linespec_state::default_symtab, linespec::explicit_loc, linespec::file_symtabs, symtab::filename, linespec_state::funfirstline, initialize_defaults(), linetable_entry::line, symtab_and_line::line, explicit_location_spec::line_offset, LINE_OFFSET_MINUS, LINE_OFFSET_NONE, LINE_OFFSET_PLUS, linespec_state::list_mode, general_symbol_info::natural_name(), line_offset::offset, linespec_state::program_space, linespec_state::search_pspace, set_current_program_space(), set_default_source_symtab_and_line(), line_offset::sign, skip_prologue_sal(), and explicit_location_spec::source_filename.
Referenced by convert_linespec_to_sals().
|
static |
Definition at line 3991 of file linespec.c.
References add_sal_to_sals(), symtab_and_line::explicit_line, linespec::file_symtabs, find_line_symtab(), symtab_and_line::line, linespec_state::list_mode, symtab_and_line::pc, symtab_and_line::pspace, set_current_program_space(), and symtab_and_line::symtab.
Referenced by create_sals_line_offset().
|
static |
Definition at line 4026 of file linespec.c.
References symtab_and_line::explicit_line, linespec::file_symtabs, find_pcs_for_symtab_line(), symbol::line(), symtab_and_line::line, symtab_and_line::pc, symtab_and_line::pspace, set_current_program_space(), and symtab_and_line::symtab.
Referenced by create_sals_line_offset().
std::vector< symtab_and_line > decode_line_1 | ( | const location_spec * | locspec, |
int | flags, | ||
struct program_space * | search_pspace, | ||
struct symtab * | default_symtab, | ||
int | default_line ) |
Definition at line 3194 of file linespec.c.
References current_language, linespec_state::default_line, linespec_state::default_symtab, flags, location_spec_to_sals(), and linespec_state::search_pspace.
Referenced by decode_line_with_current_source(), decode_line_with_last_displayed(), edit_command(), info_scope_command(), list_command(), and until_break_command().
|
static |
Definition at line 1433 of file linespec.c.
References linespec_state::canonical, linespec_state::canonical_names, canonical_to_fullform(), command_line_input(), convert_results_to_lsals(), decode_line_2_compare_items(), error_no_arg(), filter_results(), number_or_range_parser::finished(), decode_line_2_item::fullform, number_or_range_parser::get_number(), multiple_symbols_all, multiple_symbols_cancel, printf_unfiltered(), decode_line_2_item::selected, linespec_canonical_name::suffix, linespec_canonical_name::symtab, and symtab_to_filename_for_display().
Referenced by decode_line_full().
|
static |
Definition at line 1419 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 | ( | struct location_spec * | locspec, |
int | flags, | ||
struct program_space * | search_pspace, | ||
struct symtab * | default_symtab, | ||
int | default_line, | ||
struct linespec_result * | canonical, | ||
const char * | select_mode, | ||
const char * | filter ) |
Definition at line 3125 of file linespec.c.
References linespec_state::canonical, linespec_state::canonical_names, convert_results_to_lsals(), current_language, decode_line_2(), DECODE_LINE_LIST_MODE, linespec_state::default_line, linespec_state::default_symtab, filter_results(), flags, location_spec_to_sals(), multiple_symbols_all, multiple_symbols_ask, multiple_symbols_cancel, multiple_symbols_select_mode(), PARSER_STATE, linespec_result::pre_expanded, linespec_state::search_pspace, linespec_canonical_name::suffix, location_spec::to_string(), and top_level_interpreter().
Referenced by break_range_command(), code_breakpoint::decode_location_spec(), maint_agent_command_1(), and parse_breakpoint_sals().
std::vector< symtab_and_line > decode_line_with_current_source | ( | const char * | string, |
int | flags ) |
Definition at line 3211 of file linespec.c.
References current_language, decode_line_1(), flags, get_current_source_symtab_and_line(), symtab_and_line::line, symtab_and_line::pspace, string_to_location_spec(), and symtab_and_line::symtab.
Referenced by clear_command(), find_frame_for_function(), info_macros_command(), jump_command(), mi_cmd_trace_find(), and tfind_line_command().
std::vector< symtab_and_line > decode_line_with_last_displayed | ( | const char * | string, |
int | flags ) |
Definition at line 3235 of file linespec.c.
References current_language, decode_line_1(), flags, get_last_displayed_line(), get_last_displayed_symtab(), last_displayed_sal_is_valid(), and string_to_location_spec().
Referenced by info_line_command().
|
static |
Definition at line 3304 of file linespec.c.
References add_all_symbol_names_from_pspace(), linespec_state::canonical, convert_linespec_to_sals(), linespec::explicit_loc, find_imps(), FULL, explicit_location_spec::function_name, linespec::function_symbols, FUNCTIONS_DOMAIN, linespec_result::locspec, linespec::minimal_symbols, collect_info::minimal_symbols, new_linespec_location_spec(), linespec_result::pre_expanded, explicit_location_spec::source_filename, and collect_info::symbols.
Referenced by parse_linespec().
|
static |
Definition at line 1116 of file linespec.c.
References address_entry::addr, and address_entry::pspace.
Referenced by linespec_state_constructor().
|
static |
Definition at line 1346 of file linespec.c.
References linespec_state::canonical, linespec_sals::canonical, linespec_state::canonical_names, canonical_to_fullform(), linespec_result::lsals, name, linespec_result::pre_expanded, and linespec_sals::sals.
Referenced by decode_line_2(), and decode_line_full().
|
static |
Definition at line 3778 of file linespec.c.
References add_all_symbol_names_from_pspace(), add_matching_symbols_to_info(), collect_info::file_symtabs, find_imps(), FUNCTIONS_DOMAIN, name, linespec_state::search_pspace, collect_info::state, and collect_info::symbols.
Referenced by find_linespec_symbols().
|
static |
Definition at line 3941 of file linespec.c.
References symtab::compunit(), find_label_symbols_in_block(), block::function(), get_current_search_block(), name, compunit_symtab::objfile(), linespec_state::program_space, objfile::pspace, set_current_program_space(), block::superblock(), symbol::symbol(), symbol::symtab, and symbol::value_block().
Referenced by complete_label(), convert_explicit_location_spec_to_linespec(), and linespec_parse_basic().
|
static |
Definition at line 3896 of file linespec.c.
References case_sensitive_on, LABEL_DOMAIN, lookup_symbol(), symbol::matches(), name, collect_info::result, general_symbol_info::search_name(), and block_symbol::symbol.
Referenced by find_label_symbols().
|
static |
Definition at line 3806 of file linespec.c.
References cp_canonicalize_string_no_typedefs(), collect_info::file_symtabs, find_function_symbols(), find_method(), find_toplevel_string(), lookup_prefix_sym(), collect_info::state, and collect_info::symbols.
Referenced by convert_explicit_location_spec_to_linespec(), linespec_complete(), and linespec_parse_basic().
|
static |
Definition at line 3560 of file linespec.c.
References add_all_symbol_names_from_pspace(), check_typedef(), compare_symbols(), symtab::compunit(), program_space::executing_startup, collect_info::file_symtabs, find_methods(), find_superclass_methods(), FUNCTIONS_DOMAIN, general_symbol_info::language(), compunit_symtab::objfile(), objfile::pspace, set_current_program_space(), symbol::symbol(), collect_info::symbols, symbol::symtab, and symbol::type().
Referenced by find_linespec_symbols().
|
static |
Definition at line 1244 of file linespec.c.
References check_typedef(), f(), FULL, language_defn::get_symbol_name_matcher(), language_def(), name, type::name(), TYPE_BASECLASS, TYPE_FN_FIELD_PHYSNAME, TYPE_FN_FIELD_STUB, TYPE_FN_FIELDLIST1, TYPE_FN_FIELDLIST_LENGTH, TYPE_FN_FIELDLIST_NAME, TYPE_N_BASECLASSES, and TYPE_NFN_FIELDS.
Referenced by find_method(), and find_superclass_methods().
|
static |
Definition at line 607 of file linespec.c.
Referenced by linespec_lexer_lex_string().
|
static |
Definition at line 3535 of file linespec.c.
References find_methods(), and name.
Referenced by find_method().
|
static |
Definition at line 1304 of file linespec.c.
References find_toplevel_char().
Referenced by find_linespec_symbols().
|
static |
Definition at line 1216 of file linespec.c.
References get_selected_block().
Referenced by find_label_symbols().
const char * get_gdb_linespec_parser_quote_characters | ( | void | ) |
Definition at line 4410 of file linespec.c.
References linespec_quote_characters.
Referenced by explicit_location_spec_lex_one(), and explicit_location_spec_lex_one_function().
|
static |
Definition at line 1104 of file linespec.c.
References address_entry::addr, and address_entry::pspace.
Referenced by linespec_state_constructor().
|
static |
Definition at line 3261 of file linespec.c.
References linespec_state::default_symtab, get_current_source_symtab_and_line(), symtab_and_line::line, and symtab_and_line::symtab.
Referenced by create_sals_line_offset(), and parse_linespec().
int is_ada_operator | ( | const char * | string | ) |
Definition at line 543 of file linespec.c.
References ada_opname_table.
Referenced by explicit_location_spec_lex_one_function(), linespec_lexer_lex_string(), and parse_linespec().
|
static |
Definition at line 594 of file linespec.c.
References linespec_lexer_lex_keyword(), and linespec_quote_characters.
Referenced by linespec_lexer_lex_one(), linespec_lexer_lex_string(), and parse_linespec().
|
static |
Definition at line 1154 of file linespec.c.
References blockvector::block(), compunit_symtab::blockvector(), symtab::compunit(), objfile::compunits(), current_program_space, program_space::executing_startup, objfile::expand_symtabs_matching(), FIRST_LOCAL_BLOCK, symbol::is_inlined(), iterate_over_file_blocks(), language_defn::iterate_over_symbols(), linespec_state::language, blockvector::num_blocks(), program_space::objfiles(), program_spaces, address_entry::pspace, SEARCH_GLOBAL_BLOCK, SEARCH_STATIC_BLOCK, set_current_program_space(), block_symbol::symbol, and UNDEF_DOMAIN.
Referenced by add_matching_symbols_to_info(), and lookup_prefix_sym().
|
static |
Definition at line 1227 of file linespec.c.
References compunit_symtab::blockvector(), symtab::compunit(), current_language, language_defn::iterate_over_symbols(), name, blockvector::static_block(), and block::superblock().
Referenced by add_matching_symbols_to_info(), iterate_over_all_matching_symtabs(), and lookup_prefix_sym().
void linespec_complete | ( | completion_tracker & | tracker, |
const char * | text, | ||
symbol_name_match_type | match_type ) |
Definition at line 2873 of file linespec.c.
References completion_tracker::add_completion(), completion_tracker::advance_custom_word_point_by(), complete_label(), complete_linespec_component(), linespec_parser::complete_what, completion_tracker::completes_to_completion_word(), linespec_parser::completion_quote_char, linespec_parser::completion_quote_end, linespec_parser::completion_tracker, linespec_parser::completion_word, current_language, completion_tracker::discard_completions(), find_linespec_symbols(), FUNCTION, completion_tracker::have_completions(), KEYWORD, LABEL, linespec_parser::lexer, linespec_keywords, NOTHING, parse_linespec(), PARSER_EXPLICIT, PARSER_RESULT, PARSER_STATE, PARSER_STREAM, completion_tracker::quote_char(), linespec_parser::saved_arg, completion_tracker::set_quote_char(), and string_find_incomplete_keyword_at_end().
Referenced by complete_address_and_linespec_locations().
void linespec_complete_function | ( | completion_tracker & | tracker, |
const char * | function, | ||
symbol_name_match_type | func_match_type, | ||
const char * | source_filename ) |
Definition at line 2733 of file linespec.c.
References collect_file_symbol_completion_matches(), collect_symbol_completion_matches(), and LINESPEC.
Referenced by collect_explicit_location_matches(), complete_linespec_component(), and linespec_parse_basic().
void linespec_complete_label | ( | completion_tracker & | tracker, |
const struct language_defn * | language, | ||
const char * | source_filename, | ||
const char * | function_name, | ||
symbol_name_match_type | func_name_match_type, | ||
const char * | label_name ) |
Definition at line 2842 of file linespec.c.
References complete_label(), convert_explicit_location_spec_to_linespec(), PARSER_RESULT, and PARSER_STATE.
Referenced by collect_explicit_location_matches().
CORE_ADDR linespec_expression_to_pc | ( | const char ** | exp_ptr | ) |
Definition at line 3282 of file linespec.c.
References current_program_space, program_space::executing_startup, parse_to_comma_and_eval(), and value_as_address().
Referenced by location_spec_to_sals(), and string_to_location_spec_basic().
void linespec_lex_to_end | ( | const char ** | stringp | ) |
Definition at line 2704 of file linespec.c.
References current_language, linespec_parser::lexer, linespec_lexer_consume_token(), linespec_lexer_peek_token(), LSTOKEN_COMMA, LSTOKEN_EOI, LSTOKEN_KEYWORD, PARSER_STREAM, linespec_parser::saved_arg, and token.
Referenced by linespec_location_spec::linespec_location_spec().
|
static |
Definition at line 987 of file linespec.c.
References linespec_parser::completion_quote_char, linespec_parser::completion_quote_end, linespec_parser::completion_word, linespec_parser::current, linespec_parser::lexer, linespec_lexer_lex_one(), LS_TOKEN_STOKEN, LSTOKEN_CONSUMED, LSTOKEN_EOI, LSTOKEN_STRING, PARSER_STREAM, and linespec_token::type.
Referenced by linespec_lex_to_end(), linespec_lexer_peek_token(), linespec_parse_basic(), parse_linespec(), and save_stream_and_consume_token().
const char * linespec_lexer_lex_keyword | ( | const char * | p | ) |
Definition at line 471 of file linespec.c.
References FORCE_KEYWORD_INDEX, IF_KEYWORD_INDEX, and linespec_keywords.
Referenced by explicit_location_spec_lex_one(), explicit_location_spec_lex_one_function(), is_closing_quote_enclosed(), linespec_lexer_lex_one(), linespec_lexer_lex_string(), and string_to_explicit_location_spec().
|
static |
Definition at line 435 of file linespec.c.
References linespec_quote_characters, LS_TOKEN_STOKEN, LSTOKEN_NUMBER, PARSER_STREAM, and linespec_token::type.
Referenced by linespec_lexer_lex_one().
|
static |
Definition at line 902 of file linespec.c.
References linespec_parser::current, is_closing_quote_enclosed(), linespec_parser::is_quote_enclosed, linespec_parser::lexer, linespec_lexer_lex_keyword(), linespec_lexer_lex_number(), linespec_lexer_lex_string(), LS_TOKEN_KEYWORD, LS_TOKEN_STOKEN, LSTOKEN_COLON, LSTOKEN_COMMA, LSTOKEN_CONSUMED, LSTOKEN_EOI, LSTOKEN_KEYWORD, PARSER_STREAM, and linespec_token::type.
Referenced by linespec_lexer_consume_token(), linespec_parse_basic(), parse_linespec(), and unexpected_linespec_error().
|
static |
Definition at line 669 of file linespec.c.
References linespec_parser::completion_quote_char, linespec_parser::completion_quote_end, linespec_parser::completion_tracker, CP_OPERATOR_LEN, CP_OPERATOR_STR, find_parameter_list_end(), is_ada_operator(), is_closing_quote_enclosed(), is_operator_name(), linespec_parser::is_quote_enclosed, language_ada, language_cplus, linespec_lexer_lex_keyword(), linespec_quote_characters, LS_TOKEN_STOKEN, LSTOKEN_STRING, ada_opname_map::op, PARSER_STATE, PARSER_STREAM, skip_quote_char(), and token.
Referenced by linespec_lexer_lex_one().
|
static |
Definition at line 1030 of file linespec.c.
References linespec_parser::completion_quote_char, linespec_parser::completion_quote_end, linespec_parser::completion_word, linespec_parser::current, linespec_parser::lexer, linespec_lexer_consume_token(), and PARSER_STREAM.
Referenced by linespec_lex_to_end(), parse_linespec(), and save_stream_and_consume_token().
|
static |
Definition at line 1713 of file linespec.c.
References linespec_parser::complete_what, linespec_parser::completion_quote_char, linespec_parser::completion_tracker, linespec_parser::completion_word, copy_token_string(), find_label_symbols(), find_linespec_symbols(), completion_tracker::have_completions(), KEYWORD, LABEL, LINE_OFFSET_UNKNOWN, linespec_complete_function(), 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, name, NOTHING, PARSER_EXPLICIT, PARSER_RESULT, PARSER_STATE, PARSER_STREAM, save_stream_and_consume_token(), set_completion_after_number(), line_offset::sign, token, undefined_label_error(), and unexpected_linespec_error().
Referenced by parse_linespec().
struct line_offset linespec_parse_line_offset | ( | const char * | string | ) |
Definition at line 1664 of file linespec.c.
References LINE_OFFSET_MINUS, LINE_OFFSET_NONE, LINE_OFFSET_PLUS, line_offset::offset, and line_offset::sign.
Referenced by bppy_init(), linespec_parse_basic(), mi_cmd_break_insert_1(), and string_to_explicit_location_spec().
|
static |
Definition at line 4063 of file linespec.c.
References access_value_history(), type::code(), get_internalvar_integer(), LINE_OFFSET_NONE, lookup_only_internalvar(), line_offset::offset, value::offset(), line_offset::sign, value::type(), and value_as_long().
Referenced by linespec_parse_basic(), and parse_linespec().
|
static |
Definition at line 2646 of file linespec.c.
References linespec_state::addr_set, linespec_state::canonical, current_program_space, DECODE_LINE_FUNFIRSTLINE, DECODE_LINE_LIST_MODE, linespec_state::default_line, linespec_state::default_symtab, eq_address_entry(), flags, linespec_state::funfirstline, hash_address_entry(), linespec_state::is_linespec, linespec_state::language, linespec_state::list_mode, linespec_state::program_space, linespec_state::search_pspace, xcalloc(), and xfree().
Referenced by linespec_parser::linespec_parser().
|
static |
Definition at line 2688 of file linespec.c.
References linespec_state::addr_set, linespec_state::canonical_names, and xfree().
Referenced by linespec_parser::~linespec_parser().
|
static |
Definition at line 3064 of file linespec.c.
References address_location_spec::address, ADDRESS_LOCATION_SPEC, as_address_location_spec(), as_explicit_location_spec(), as_linespec_location_spec(), location_spec::clone(), convert_address_location_to_sals(), convert_explicit_location_spec_to_sals(), EXPLICIT_LOCATION_SPEC, linespec_expression_to_pc(), LINESPEC_LOCATION_SPEC, linespec_location_spec::match_type, parse_linespec(), PARSER_RESULT, PARSER_STATE, PROBE_LOCATION_SPEC, linespec_location_spec::spec_string, location_spec::to_string(), and location_spec::type().
Referenced by decode_line_1(), and decode_line_full().
|
static |
Definition at line 3432 of file linespec.c.
References ALL_DOMAIN, program_space::executing_startup, FULL, iterate_over_all_matching_symtabs(), iterate_over_file_blocks(), set_current_program_space(), STRUCT_DOMAIN, and VAR_DOMAIN.
Referenced by find_linespec_symbols().
|
static |
Definition at line 1129 of file linespec.c.
References address_entry::addr, and address_entry::pspace.
Referenced by convert_linespec_to_sals(), and minsym_found().
|
static |
Definition at line 4126 of file linespec.c.
References add_sal_to_sals(), linespec_state::addr_set, current_program_space, find_function_start_sal(), linespec_state::funfirstline, gnu_ifunc_resolve_name, general_symbol_info::linkage_name(), maybe_add_address(), mst_data_gnu_ifunc, mst_text_gnu_ifunc, symtab_and_line::msymbol, msymbol_is_function(), general_symbol_info::natural_name(), general_symbol_info::obj_section(), symtab_and_line::objfile, symtab_and_line::pc, objfile::pspace, symtab_and_line::pspace, symtab_and_line::section, minimal_symbol::type(), and minimal_symbol::value_address().
Referenced by convert_linespec_to_sals().
|
static |
Definition at line 2451 of file linespec.c.
References linespec_parser::complete_what, linespec_parser::completion_tracker, linespec_parser::completion_word, convert_linespec_to_sals(), copy_token_string(), decode_objc(), EXPRESSION, FUNCTION, initialize_defaults(), is_ada_operator(), is_closing_quote_enclosed(), linespec_parser::is_quote_enclosed, linespec_parser::lexer, LINE_OFFSET_UNKNOWN, linespec_lexer_consume_token(), linespec_lexer_lex_one(), linespec_lexer_peek_token(), linespec_parse_basic(), linespec_parse_variable(), linespec_quote_characters, LS_TOKEN_STOKEN, LSTOKEN_COLON, LSTOKEN_COMMA, LSTOKEN_EOI, LSTOKEN_KEYWORD, LSTOKEN_NUMBER, LSTOKEN_STRING, NOTHING, PARSER_EXPLICIT, PARSER_RESULT, PARSER_STATE, PARSER_STREAM, linespec_parser::saved_arg, line_offset::sign, skip_quote_char(), linespec_parser::stream, symbol_not_found_error(), symtabs_from_filename(), token, and unexpected_linespec_error().
Referenced by linespec_complete(), and location_spec_to_sals().
|
static |
Definition at line 1654 of file linespec.c.
References linespec_parser::completion_word, linespec_lexer_consume_token(), linespec_lexer_peek_token(), LSTOKEN_EOI, and PARSER_STREAM.
Referenced by linespec_parse_basic().
|
static |
Definition at line 4207 of file linespec.c.
References add_minsym(), symtab::compunit(), current_program_space, iterate_over_minimal_symbols(), mst_file_bss, mst_file_data, mst_file_text, mst_solib_trampoline, name, compunit_symtab::objfile(), program_space::objfiles(), program_spaces, objfile::pspace, set_current_program_space(), and type.
Referenced by add_matching_symbols_to_info().
|
static |
Definition at line 1695 of file linespec.c.
References linespec_parser::complete_what, linespec_parser::completion_word, NOTHING, and PARSER_STREAM.
Referenced by linespec_parse_basic().
|
static |
Definition at line 559 of file linespec.c.
References find_toplevel_char().
Referenced by linespec_lexer_lex_string(), and parse_linespec().
|
static |
Definition at line 1645 of file linespec.c.
References name.
Referenced by convert_explicit_location_spec_to_linespec(), and symtabs_from_filename().
|
static |
Definition at line 646 of file linespec.c.
Referenced by linespec_complete().
|
static |
Definition at line 1561 of file linespec.c.
References have_full_symbols(), have_minimal_symbols(), and have_partial_symbols().
Referenced by convert_explicit_location_spec_to_linespec(), and parse_linespec().
|
static |
Definition at line 4360 of file linespec.c.
References symbol::aclass(), symtab::compunit(), symtab_and_line::explicit_pc, find_function_start_sal(), symbol::line(), symtab_and_line::line, LOC_BLOCK, LOC_LABEL, compunit_symtab::objfile(), symtab_and_line::pc, objfile::pspace, symtab_and_line::pspace, symtab_and_line::symbol, symbol::symtab, symtab_and_line::symtab, and symbol::value_address().
Referenced by convert_linespec_to_sals().
|
static |
Definition at line 3725 of file linespec.c.
References collect_symtabs_from_filename(), have_full_symbols(), have_partial_symbols(), and source_file_not_found_error().
Referenced by convert_explicit_location_spec_to_linespec(), and parse_linespec().
|
static |
Definition at line 1630 of file linespec.c.
Referenced by convert_explicit_location_spec_to_linespec(), and linespec_parse_basic().
|
static |
Definition at line 1603 of file linespec.c.
References copy_token_string(), linespec_lexer_lex_one(), LSTOKEN_KEYWORD, LSTOKEN_NUMBER, LSTOKEN_STRING, and token.
Referenced by linespec_parse_basic(), and parse_linespec().
const char* const linespec_keywords[] = { "if", "thread", "task", "inferior", "-force-condition", NULL } |
Definition at line 257 of file linespec.c.
Referenced by collect_explicit_location_matches(), complete_explicit_location_spec(), complete_linespec_component(), linespec_complete(), linespec_lexer_lex_keyword(), and location_completer().
|
static |
Definition at line 425 of file linespec.c.
Referenced by get_gdb_linespec_parser_quote_characters(), is_closing_quote_enclosed(), linespec_lexer_lex_number(), linespec_lexer_lex_string(), and parse_linespec().