43 #include "filenames.h"
122 const char *function_name;
126 VEC (symbolp) *function_symbols;
132 const char *label_name;
139 VEC (symbolp) *label_symbols;
140 VEC (symbolp) *function_symbols;
214 VEC (symbolp) *symbols;
249 #define IF_KEYWORD_INDEX 0
270 #define LS_TOKEN_STOKEN(TOK) (TOK).data.string
271 #define LS_TOKEN_KEYWORD(TOK) (TOK).data.keyword
285 #define PARSER_STREAM(P) (*(P)->lexer.stream)
296 #define PARSER_STATE(PPTR) (&(PPTR)->state)
300 #define PARSER_RESULT(PPTR) (&(PPTR)->result)
318 const char **argptr);
323 VEC (symbolp) *function_symbols,
324 VEC (symbolp) **label_funcs_ret,
330 VEC (symbolp) **symbols,
335 const char *variable);
338 int funfirstline,
struct symbol *sym);
348 static VEC (
symtab_ptr) *collect_symtabs_from_filename (
const char *file);
374 static const char *
const linespec_quote_characters =
"\"\'";
408 && !strchr (linespec_quote_characters, *
PARSER_STREAM (parser)))
426 for (i = 0; i < ARRAY_SIZE (linespec_keywords); ++i)
428 int len = strlen (linespec_keywords[i]);
434 if (strncmp (p, linespec_keywords[i], len) == 0
447 for (j = 0; j < ARRAY_SIZE (linespec_keywords); ++j)
449 int nextlen = strlen (linespec_keywords[j]);
451 if (strncmp (p, linespec_keywords[j], nextlen) == 0
452 && isspace (p[nextlen]))
457 return linespec_keywords[i];
487 const char *p, *last;
490 while (p && *p !=
'\0' && *p !=
':')
524 if (strchr (linespec_quote_characters, *p))
537 char end_char, start_char;
542 if (start_char ==
'(')
544 else if (start_char ==
'<')
553 if (*p == start_char)
555 else if (*p == end_char)
582 if (strchr (linespec_quote_characters, *
PARSER_STREAM (parser)))
589 && quote_char ==
'\"')
618 error (
_(
"unmatched quote"));
686 && strchr (linespec_quote_characters,
718 char *p = strstr (start,
"operator");
776 case '0':
case '1':
case '2':
case '3':
case '4':
777 case '5':
case '6':
case '7':
case '8':
case '9':
778 if (!linespec_lexer_lex_number (parser, &(parser->
lexer.
current)))
794 case '\'':
case '\"':
874 const char *symname,
int literal_canonical)
882 self->canonical_names =
xrealloc (self->canonical_names,
884 * sizeof (*self->canonical_names)));
885 canonical = &
self->canonical_names[sals->
nelts - 1];
886 if (!literal_canonical && sal->
symtab)
893 if (symname != NULL && sal->
line != 0
896 else if (symname != NULL)
897 canonical->
suffix = xstrdup (symname);
905 canonical->
suffix = xstrdup (symname);
907 canonical->
suffix = xstrdup (
"<unknown>");
921 hash = iterative_hash_object (aep->
pspace, 0);
922 return iterative_hash_object (aep->
addr, hash);
948 slot = htab_find_slot (set, &e, INSERT);
1037 if (search_pspace != NULL && search_pspace != pspace)
1063 struct block *block;
1083 static const struct block *
1086 const struct block *block;
1105 struct block *block;
1120 VEC (typep) **superclasses)
1139 method_counter >= 0;
1143 char dem_opname[64];
1149 if (cplus_demangle_opname (method_name, dem_opname, DMGL_ANSI))
1150 method_name = dem_opname;
1151 else if (cplus_demangle_opname (method_name, dem_opname, 0))
1152 method_name = dem_opname;
1165 const char *phys_name;
1195 for (scan = s; *
scan; scan++)
1199 if (*scan == quoted)
1201 else if (*scan ==
'\\' && *(scan + 1))
1204 else if (*scan == c && ! quoted && depth == 0)
1206 else if (*scan ==
'"' || *scan ==
'\'')
1208 else if (*scan ==
'(' || *scan ==
'<')
1210 else if ((*scan ==
')' || *scan ==
'>') && depth > 0)
1224 const char *s = haystack;
1241 while (s != NULL && *s !=
'\0');
1253 if (canonical->
symtab == NULL)
1254 return xstrdup (canonical->
suffix);
1276 memset (&lsal, 0,
sizeof (lsal));
1278 for (j = 0; j < result->
nelts; ++j)
1284 canonical = &
self->canonical_names[j];
1288 if (strcmp (name, fullform) == 0)
1301 self->canonical->pre_expanded = 0;
1313 lsal.
sals = *result;
1363 const char *select_mode)
1365 char *args, *prompt;
1380 items_count = result->
nelts;
1381 items =
xmalloc (
sizeof (*items) * items_count);
1383 for (i = 0; i < items_count; ++i)
1388 canonical = &
self->canonical_names[i];
1395 if (canonical->
symtab == NULL)
1399 const char *fn_for_display;
1414 if (items_count >= 2)
1419 for (src = &items[1]; src < &items[items_count]; src++)
1422 items_count = dst + 1 - items;
1426 error (
_(
"canceled because the command is ambiguous\n"
1427 "See set/show multiple-symbol."));
1437 for (i = 0; i < items_count; i++)
1440 prompt = getenv (
"PS2");
1447 if (args == 0 || *args == 0)
1473 if (num >= items_count)
1503 static void ATTRIBUTE_NORETURN
1513 _(
"No symbol table is loaded. Use the \"file\" command."));
1523 _(
"Undefined convenience variable or function \"%s\" "
1524 "not defined in \"%s\"."), symbol, filename);
1527 _(
"Undefined convenience variable or function \"%s\" "
1528 "not defined."), symbol);
1534 _(
"Function \"%s\" not defined in \"%s\"."),
1538 _(
"Function \"%s\" not defined."), symbol);
1545 static void ATTRIBUTE_NORETURN
1549 static const char * token_type_strings[]
1550 = {
"keyword",
"colon",
"string",
"number",
"comma",
"end of input"};
1565 _(
"malformed linespec error: unexpected %s, \"%s\""),
1566 token_type_strings[token.
type],
string);
1570 _(
"malformed linespec error: unexpected %s"),
1571 token_type_strings[token.
type]);
1586 else if (*
string ==
'-')
1593 line_offset.
offset = atoi (
string);
1604 VEC (symbolp) *symbols, *labels;
1651 &symbols, &minimal_symbols);
1653 if (symbols != NULL || minimal_symbols != NULL)
1665 labels = find_label_symbols (
PARSER_STATE (parser), NULL,
1749 _(
"No label \"%s\" defined in function \"%s\"."),
1809 if (ls->function_name)
1822 if (ls->function_name == NULL)
1864 int use_default = 0;
1879 const char *fullname;
1889 ls->file_symtabs = collect_symtabs_from_filename (fullname);
1893 val.
line = ls->line_offset.offset;
1894 switch (ls->line_offset.sign)
1897 if (ls->line_offset.offset == 0)
1900 val.
line =
self->default_line + val.
line;
1904 if (ls->line_offset.offset == 0)
1907 val.
line =
self->default_line - val.
line;
1916 if (self->list_mode)
1922 const struct block **blocks;
1927 intermediate_results.
sals = NULL;
1928 intermediate_results.
nelts = 0;
1932 if (intermediate_results.
nelts == 0 && best_entry != NULL)
1934 &intermediate_results, &best_entry);
1948 filter = XNEWVEC (
int, intermediate_results.
nelts);
1950 blocks = XNEWVEC (
const struct block *, intermediate_results.
nelts);
1953 for (i = 0; i < intermediate_results.
nelts; ++i)
1962 for (i = 0; i < intermediate_results.
nelts; ++i)
1964 if (blocks[i] != NULL)
1965 for (j = i + 1; j < intermediate_results.
nelts; ++j)
1967 if (blocks[j] == blocks[i])
1975 for (i = 0; i < intermediate_results.
nelts; ++i)
1978 struct symbol *sym = (blocks[i]
1982 if (self->funfirstline)
1994 if (values.
nelts == 0)
1996 if (ls->source_filename)
1998 val.
line, ls->source_filename);
2014 if (ls->expression != NULL)
2020 sal.pc = ls->expr_pc;
2022 sal.explicit_pc = 1;
2025 else if (ls->labels.label_symbols != NULL)
2032 for (i = 0;
VEC_iterate (symbolp, ls->labels.label_symbols, i, sym); ++i)
2042 else if (ls->function_symbols != NULL || ls->minimal_symbols != NULL)
2051 if (ls->function_symbols != NULL)
2059 for (i = 0;
VEC_iterate (symbolp, ls->function_symbols, i, sym); ++i)
2070 if (ls->minimal_symbols != NULL)
2094 if (ls->source_filename == NULL)
2102 ls->source_filename = xstrdup (fullname);
2113 if (sals.
nelts > 0 && state->canonical != NULL)
2114 state->canonical->pre_expanded = 1;
2183 parser->is_quote_enclosed = 0;
2185 && strchr (linespec_quote_characters, **argptr) != NULL)
2195 parser->is_quote_enclosed = 1;
2199 parser->lexer.saved_arg = *argptr;
2200 parser->lexer.stream = argptr;
2208 if (values.
sals != NULL)
2234 PARSER_STREAM (parser) = strstr (parser->lexer.saved_arg, copy);
2241 goto convert_to_sals;
2264 goto convert_to_sals;
2276 char *user_filename;
2286 = symtabs_from_filename (user_filename);
2290 file_exception = ex;
2294 if (file_exception.
reason >= 0)
2308 xfree (user_filename);
2339 if (file_exception.
reason < 0)
2368 struct symtab *default_symtab,
2372 memset (
self, 0,
sizeof (*
self));
2376 self->default_symtab = default_symtab;
2377 self->default_line = default_line;
2378 self->canonical = canonical;
2389 struct symtab *default_symtab,
2397 default_symtab, default_line, canonical);
2405 htab_delete (self->addr_set);
2432 if (
PARSER_RESULT (parser)->labels.function_symbols != NULL)
2442 struct symtab *default_symtab,
2444 const char *select_mode,
2452 const char *copy, *orig;
2464 default_line, canonical);
2468 orig = copy = *argptr;
2470 *argptr += copy - orig;
2478 if (result.
nelts > 0)
2483 for (i = 0; i < result.
nelts; ++i)
2490 if (select_mode == NULL)
2519 struct symtab *default_symtab,
2525 const char *copy, *orig;
2528 default_line, NULL);
2532 orig = copy = *argptr;
2534 *argptr += copy - orig;
2549 error (
_(
"Empty line specification."));
2559 error (
_(
"Junk at end of line specification: %s"),
string);
2571 error (
_(
"Empty line specification."));
2581 error (
_(
"Junk at end of line specification: %s"),
string);
2593 if (*default_symtab == 0)
2601 *default_symtab = cursal.
symtab;
2602 *default_line = cursal.
line;
2618 "program space is in startup"));
2639 const char *new_argptr;
2644 info.file_symtabs = NULL;
2647 info.
result.symbols = NULL;
2648 info.
result.minimal_symbols = NULL;
2652 new_argptr =
find_imps (*argptr, &symbol_names);
2666 saved_arg = alloca (new_argptr - *argptr + 1);
2667 memcpy (saved_arg, *argptr, new_argptr - *argptr);
2668 saved_arg[new_argptr - *argptr] =
'\0';
2670 ls->function_name = xstrdup (saved_arg);
2671 ls->function_symbols = info.
result.symbols;
2672 ls->minimal_symbols = info.
result.minimal_symbols;
2675 if (self->canonical)
2677 self->canonical->pre_expanded = 1;
2678 if (ls->source_filename)
2679 self->canonical->addr_string
2680 =
xstrprintf (
"%s:%s", ls->source_filename, saved_arg);
2682 self->canonical->addr_string = xstrdup (saved_arg);
2686 *argptr = new_argptr;
2699 VEC (symbolp) *symbols;
2726 slot = htab_find_slot (collector->unique_syms, sym, INSERT);
2740 const char *class_name)
2748 collector.symbols = NULL;
2751 collector.unique_syms = htab_create_alloc (1, htab_hash_pointer,
2752 htab_eq_pointer, NULL,
2782 return collector.symbols;
2792 struct symbol *
const *sa = a;
2793 struct symbol *
const *sb = b;
2804 uia = (uintptr_t) *sa;
2805 uib = (uintptr_t) *sb;
2832 uia = (uintptr_t) sa->
minsym;
2833 uib = (uintptr_t) sb->
minsym;
2866 VEC (typep) *iter_classes;
2869 iter_classes = superclasses;
2872 VEC (typep) *new_supers = NULL;
2877 for (ix = 0;
VEC_iterate (typep, iter_classes, ix, t); ++ix)
2884 iter_classes = new_supers;
2896 const char *class_name,
const char *method_name,
2897 VEC (symbolp) *sym_classes,
VEC (symbolp) **symbols,
2903 int last_result_len;
2904 VEC (typep) *superclass_vec;
2916 info.file_symtabs = file_symtabs;
2917 info.
result.symbols = NULL;
2918 info.
result.minimal_symbols = NULL;
2929 superclass_vec = NULL;
2931 result_names = NULL;
2933 last_result_len = 0;
2934 for (ix = 0;
VEC_iterate (symbolp, sym_classes, ix, sym); ++ix)
2945 find_methods (t, method_name, &result_names, &superclass_vec);
2949 if (ix ==
VEC_length (symbolp, sym_classes) - 1
2973 *symbols = info.
result.symbols;
2974 *minsyms = info.
result.minimal_symbols;
2994 htab_t symtab_table;
3005 slot = htab_find_slot (data->symtab_table, symtab, INSERT);
3018 collect_symtabs_from_filename (
const char *file)
3024 collector.symtabs = NULL;
3025 collector.symtab_table = htab_create (1, htab_hash_pointer, htab_eq_pointer,
3040 return collector.symtabs;
3046 symtabs_from_filename (
const char *filename)
3050 result = collect_symtabs_from_filename (filename);
3056 _(
"No symbol table is loaded. "
3057 "Use the \"file\" command."));
3071 VEC (symbolp) **symbols,
3080 info.
result.symbols = NULL;
3081 info.
result.minimal_symbols = NULL;
3082 info.file_symtabs = file_symtabs;
3099 *symbols = info.
result.symbols;
3107 *minsyms = info.
result.minimal_symbols;
3117 VEC (symbolp) **symbols,
3122 const char *lookup_name;
3137 lookup_name = canon;
3159 char *klass, *method;
3160 const char *last, *p, *scope_op;
3161 VEC (symbolp) *classes;
3192 klass =
xmalloc ((last - lookup_name + 1) *
sizeof (
char));
3194 strncpy (klass, lookup_name, last - lookup_name);
3195 klass[last - lookup_name] =
'\0';
3198 last += strlen (scope_op);
3199 method =
xmalloc ((strlen (last) + 1) *
sizeof (
char));
3201 strcpy (method, last);
3204 classes = lookup_prefix_sym (state, file_symtabs, klass);
3212 find_method (state, file_symtabs, klass, method, classes,
3233 static VEC (symbolp) *
3235 VEC (symbolp) *function_symbols,
3236 VEC (symbolp) **label_funcs_ret,
const char *name)
3239 const struct block *block;
3242 VEC (symbolp) *result = NULL;
3244 if (function_symbols == NULL)
3268 VEC_iterate (symbolp, function_symbols, ix, fn_sym); ++ix)
3344 pcs = find_pcs_for_symtab_line (elt, line, best_entry);
3372 p = (variable[1] ==
'$') ? variable + 2 : variable + 1;
3375 while (*p >=
'0' && *p <=
'9')
3380 struct value *val_history;
3382 sscanf ((variable[1] ==
'$') ? variable + 2 : variable + 1,
"%d", &index);
3386 error (
_(
"History values used in line "
3387 "specs must have integer values."));
3409 error (
_(
"Convenience variables used in line "
3410 "specs must have integer values."));
3458 if (self->funfirstline)
3460 if (sal.symtab != NULL
3551 if (info->
symtab != NULL)
3571 switch (minsym->
type)
3610 memset (&local, 0,
sizeof (local));
3625 if (search_pspace != NULL && search_pspace != pspace)
3641 if (search_pspace == NULL ||
SYMTAB_PSPACE (symtab) == search_pspace)
3675 info->
result.minimal_symbols, item);
3732 int funfirstline,
struct symbol *sym)
3751 else if (funfirstline)
3774 memset (lr, 0,
sizeof (*lr));
void error_no_arg(const char *why)
#define PARSER_STATE(PPTR)
static void linespec_parse_basic(linespec_parser *parser)
static linespec_token linespec_lexer_peek_token(linespec_parser *parser)
const char * symtab_to_filename_for_display(struct symtab *symtab)
static void find_superclass_methods(VEC(typep)*superclasses, const char *name, VEC(const_char_ptr)**result_names)
#define SYMTAB_COMPUNIT(symtab)
#define SYMTAB_LANGUAGE(symtab)
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 const char * find_toplevel_string(const char *haystack, const char *needle)
static int classify_mtype(enum minimal_symbol_type t)
void(* expand_symtabs_matching)(struct objfile *objfile, expand_symtabs_file_matcher_ftype *file_matcher, expand_symtabs_symbol_matcher_ftype *symbol_matcher, expand_symtabs_exp_notify_ftype *expansion_notify, enum search_domain kind, void *data)
struct symbol * block_containing_function(const struct block *bl)
static struct symtabs_and_lines create_sals_line_offset(struct linespec_state *self, linespec_p ls)
int( symbol_found_callback_ftype)(struct symbol *sym, void *data)
#define TYPE_N_BASECLASSES(thistype)
void fputs_unfiltered(const char *buf, struct ui_file *file)
static void linespec_parser_delete(void *arg)
static void decode_digits_ordinary(struct linespec_state *self, linespec_p ls, int line, struct symtabs_and_lines *sals, struct linetable_entry **best_entry)
const char multiple_symbols_cancel[]
int strcmp_iw(const char *string1, const char *string2)
#define TYPE_NFN_FIELDS(thistype)
static char * copy_token_string(linespec_token token)
LONGEST value_as_long(struct value *val)
static void add_matching_symbols_to_info(const char *name, struct collect_info *info, struct program_space *pspace)
void set_default_source_symtab_and_line(void)
#define BMSYMBOL_VALUE_ADDRESS(symbol)
static linespec_token linespec_lexer_lex_string(linespec_parser *parser)
static void scan(struct macro_buffer *dest, struct macro_buffer *src, struct macro_name_list *no_loop, macro_lookup_ftype *lookup_func, void *lookup_baton)
struct type ** const(pascal_builtin_types[])
static const char *const linespec_keywords[]
static int add_symtabs_to_list(struct symtab *symtab, void *d)
static void linespec_state_destructor(struct linespec_state *self)
struct program_space * pspace
struct internalvar * lookup_only_internalvar(const char *name)
char * ui_file_xstrdup(struct ui_file *file, long *length)
enum language set_language(enum language lang)
void destroy_linespec_result(struct linespec_result *ls)
void ui_file_delete(struct ui_file *file)
int get_internalvar_integer(struct internalvar *var, LONGEST *result)
struct symtab_and_line get_current_source_symtab_and_line(void)
enum domain_enum_tag domain_enum
#define SYMBOL_CLASS(symbol)
static VEC(static VEC()*collect_symtabs_from_filename(const char *file) symtab_ptr)
struct ui_out * interp_ui_out(struct interp *interp)
void init_sal(struct symtab_and_line *sal)
int ui_out_is_mi_like_p(struct ui_out *uiout)
const struct gdb_exception exception_none
static void cleanup_linespec_result(void *a)
symbol_name_cmp_ftype symbol_name_cmp
__extension__ enum minimal_symbol_type type
const char multiple_symbols_ask[]
int have_partial_symbols(void)
static void decode_digits_list_mode(struct linespec_state *self, linespec_p ls, struct symtabs_and_lines *values, struct symtab_and_line val)
enum language la_language
DEF_VEC_O(bound_minimal_symbol_d)
static hashval_t hash_address_entry(const void *p)
static const char * find_toplevel_char(const char *s, char c)
const char * source_filename
#define VEC_safe_push(T, V, O)
#define BLOCKVECTOR_BLOCK(blocklist, n)
struct obj_section * section
char * skip_spaces(char *chp)
struct symtab_and_line find_function_start_sal(struct symbol *sym, int funfirstline)
#define PARSER_RESULT(PPTR)
struct symtabs_and_lines sals
static const struct block * get_current_search_block(void)
static const char * skip_quote_char(const char *string, char quote_char)
static char * canonical_to_fullform(const struct linespec_canonical_name *canonical)
const char * multiple_symbols_select_mode(void)
struct obj_section * find_pc_overlay(CORE_ADDR pc)
#define BLOCK_FUNCTION(bl)
void set_current_program_space(struct program_space *pspace)
const char * symtab_to_fullname(struct symtab *s)
enum offset_relative_sign sign
#define MSYMBOL_OBJ_SECTION(objfile, symbol)
mach_port_t kern_return_t mach_port_t msgports mach_port_t kern_return_t pid_t pid mach_port_t kern_return_t mach_port_t task mach_port_t kern_return_t int flags
void null_cleanup(void *arg)
int(* symbol_name_cmp_ftype)(const char *symbol_search_name, const char *lookup_name)
static struct line_offset linespec_parse_line_offset(const char *string)
#define SYMTAB_BLOCKVECTOR(symtab)
#define ALL_OBJFILES(obj)
#define TYPE_FN_FIELD_PHYSNAME(thisfn, n)
#define VEC_iterate(T, V, I, P)
char * command_line_input(const char *, int, char *)
struct type * check_typedef(struct type *type)
#define SYMBOL_VALUE_ADDRESS(symbol)
const struct language_defn * language
#define CATCH(EXCEPTION, MASK)
int fputc_unfiltered(int c, struct ui_file *stream)
struct target_ops current_target
struct symtab_and_line find_pc_line(CORE_ADDR pc, int notcurrent)
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)
symbol_found_callback_ftype * callback
void fprintf_filtered(struct ui_file *stream, const char *format,...)
static struct symtabs_and_lines parse_linespec(linespec_parser *parser, const char **argptr)
char * cp_canonicalize_string_no_typedefs(const char *string)
const char * const_char_ptr
#define SYMTAB_OBJFILE(symtab)
const char * skip_spaces_const(const char *chp)
CORE_ADDR gdbarch_convert_from_func_ptr_addr(struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
struct symtabs_and_lines decode_line_1(char **argptr, int flags, struct symtab *default_symtab, int default_line)
void iterate_over_minimal_symbols(struct objfile *objf, const char *name, void(*callback)(struct minimal_symbol *, void *), void *user_data)
int struct linetable_entry ** best_entry
const struct sym_fns * sf
static linespec_token linespec_lexer_consume_token(linespec_parser *parser)
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
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)
struct gdbarch * get_objfile_arch(const struct objfile *objfile)
static void ATTRIBUTE_NORETURN unexpected_linespec_error(linespec_parser *parser)
static void add_minsym(struct minimal_symbol *minsym, void *d)
void init_linespec_result(struct linespec_result *lr)
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)
#define VEC_index(T, V, I)
#define BLOCK_SUPERBLOCK(bl)
struct cleanup * make_cleanup_destroy_linespec_result(struct linespec_result *ls)
#define MSYMBOL_NATURAL_NAME(symbol)
#define SYMBOL_LINE(symbol)
#define SYMTAB_PSPACE(symtab)
static int startswith(const char *string, const char *pattern)
const char * linespec_lexer_lex_keyword(const char *p)
int is_operator_name(const char *name)
static void decode_line_2(struct linespec_state *self, struct symtabs_and_lines *result, const char *select_mode)
static struct line_offset linespec_parse_variable(struct linespec_state *self, const char *variable)
struct linespec_result * canonical
struct linespec_state * state
char * ada_name_for_lookup(const char *name)
#define TYPE_BASECLASS(thistype, index)
char * xstrprintf(const char *format,...)
void printf_unfiltered(const char *format,...)
int get_last_displayed_line(void)
char * remove_trailing_whitespace(const char *start, char *s)
static struct symtabs_and_lines decode_objc(struct linespec_state *self, linespec_p ls, const char **argptr)
void skip_prologue_sal(struct symtab_and_line *sal)
struct ui_file * mem_fileopen(void)
struct line_offset line_offset
const struct block * block_for_pc_sect(CORE_ADDR pc, struct obj_section *section)
static void search_minsyms_for_name(struct collect_info *info, const char *name, struct program_space *search_pspace, struct symtab *symtab)
static void filter_results(struct linespec_state *self, struct symtabs_and_lines *result, VEC(const_char_ptr)*filters)
static void iterate_over_file_blocks(struct symtab *symtab, const char *name, domain_enum domain, symbol_found_callback_ftype *callback, void *data)
#define ALL_OBJFILE_COMPUNITS(objfile, cu)
enum ls_token_type linespec_token_type
struct symtab * get_last_displayed_symtab(void)
unsigned long hash(const void *addr, int length)
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)
struct value * parse_to_comma_and_eval(const char **expp)
PTR xrealloc(PTR ptr, size_t size)
int have_minimal_symbols(void)
struct program_space * pspace
#define VEC_truncate(T, V, I)
static int iterate_name_matcher(const char *name, void *d)
void throw_exception(struct gdb_exception exception)
#define MSYMBOL_TYPE(msymbol)
static int compare_symbols(const void *a, const void *b)
void discard_cleanups(struct cleanup *old_chain)
const struct language_defn * current_language
int last_displayed_sal_is_valid(void)
static void find_methods(struct type *t, const char *name, VEC(const_char_ptr)**result_names, VEC(typep)**superclasses)
struct linespec_canonical_name * canonical_names
static int collect_symbols(struct symbol *sym, void *data)
#define ALL_PSPACES(pspace)
static linespec_token linespec_lexer_lex_one(linespec_parser *parser)
static int symbol_to_sal(struct symtab_and_line *result, int funfirstline, struct symbol *sym)
struct symtab * default_symtab
#define SYMBOL_BLOCK_VALUE(symbol)
#define TYPE_CODE(thistype)
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 void add_all_symbol_names_from_pspace(struct collect_info *info, struct program_space *pspace, VEC(const_char_ptr)*names)
struct linespec * linespec_p
struct minimal_symbol * minsym
static int compare_msymbols(const void *a, const void *b)
struct symbol * lookup_symbol(const char *name, const struct block *block, domain_enum domain, struct field_of_this_result *is_a_field_of_this)
struct program_space * pspace
const struct ada_opname_map ada_opname_table[]
#define COMPUNIT_FILETABS(cust)
#define VEC_address(T, V)
void iterate_over_symtabs(const char *name, int(*callback)(struct symtab *symtab, void *data), void *data)
#define CHECK_TYPEDEF(TYPE)
#define BLOCKVECTOR_NBLOCKS(blocklist)
struct cleanup * make_cleanup_htab_delete(htab_t htab)
int have_full_symbols(void)
static void minsym_found(struct linespec_state *self, struct objfile *objfile, struct minimal_symbol *msymbol, struct symtabs_and_lines *result)
#define COMPUNIT_LOCATIONS_VALID(cust)
static void ATTRIBUTE_NORETURN symbol_not_found_error(const char *symbol, const char *filename)
const struct block * get_selected_block(CORE_ADDR *addr_in_block)
symbol_name_cmp_ftype(* la_get_symbol_name_cmp)(const char *lookup_name)
struct ls_parser::@94 lexer
#define SYMBOL_NATURAL_NAME(symbol)
const char * find_imps(const char *method, VEC(const_char_ptr)**symbol_names)
struct program_space * current_program_space
struct symtabs_and_lines decode_line_with_current_source(char *string, int flags)
static struct symtabs_and_lines convert_linespec_to_sals(struct linespec_state *state, linespec_p ls)
#define LS_TOKEN_KEYWORD(TOK)
struct cleanup * save_current_program_space(void)
struct symtab_and_line find_pc_sect_line(CORE_ADDR pc, struct obj_section *section, int notcurrent)
char * savestring(const char *ptr, size_t len)
static void initialize_defaults(struct symtab **default_symtab, int *default_line)
struct interp * top_level_interpreter(void)
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 int eq_address_entry(const void *a, const void *b)
struct type * value_type(const struct value *value)
#define SYMBOL_INLINED(symbol)
void(* la_iterate_over_symbols)(const struct block *block, const char *name, domain_enum domain, symbol_found_callback_ftype *callback, void *data)
#define SYMBOL_TYPE(symbol)
static void add_sal_to_sals_basic(struct symtabs_and_lines *sals, struct symtab_and_line *sal)
static int iterate_inline_only(struct symbol *sym, void *d)
struct value * access_value_history(int num)
static void convert_results_to_lsals(struct linespec_state *self, struct symtabs_and_lines *result)
CORE_ADDR value_as_address(struct value *val)
struct symtab_and_line * sals
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)
struct symtabs_and_lines decode_line_with_last_displayed(char *string, int flags)
static int is_closing_quote_enclosed(const char *p)
#define TYPE_FN_FIELDLIST_NAME(thistype, n)
static int collect_one_symbol(struct symbol *sym, void *d)
const char * type_name_no_tag(const struct type *type)
#define TYPE_FN_FIELDLIST_LENGTH(thistype, n)
static int decode_line_2_compare_items(const void *ap, const void *bp)
struct program_space * program_space
static const char * find_parameter_list_end(const char *input)
const struct quick_symbol_functions * qf
int get_number_or_range(struct get_number_or_range_state *state)
PTR xcalloc(size_t number, size_t size)
struct symtab * symbol_symtab(const struct symbol *symbol)
#define LS_TOKEN_STOKEN(TOK)
static int compare_msyms(const void *a, const void *b)
static int is_ada_operator(const char *string)
struct symtab * find_line_symtab(struct symtab *symtab, int line, int *index, int *exact_match)
static CORE_ADDR linespec_expression_to_pc(const char **exp_ptr)
const char multiple_symbols_all[]
void error(const char *fmt,...)
static int maybe_add_address(htab_t set, struct program_space *pspace, CORE_ADDR addr)
#define LA_ITERATE_OVER_SYMBOLS(BLOCK, NAME, DOMAIN, CALLBACK, DATA)
#define TYPE_FN_FIELDLIST1(thistype, n)
void throw_error(enum errors error, const char *fmt,...)
void init_number_or_range(struct get_number_or_range_state *state, const char *string)
void do_cleanups(struct cleanup *old_chain)
struct cleanup * demangle_for_lookup(const char *name, enum language lang, const char **result_name)
#define MSYMBOL_VALUE_ADDRESS(objfile, symbol)
static void canonicalize_linespec(struct linespec_state *state, linespec_p ls)
enum return_reason reason
const ULONGEST const LONGEST len
#define TYPE_FN_FIELD_STUB(thisfn, n)