36 #include "filenames.h" 51 #include <sys/types.h> 124 #define DEFAULT_SYMBOL_CACHE_SIZE 1021 129 #define MAX_SYMBOL_CACHE_SIZE (1024*1024) 133 #define SYMBOL_LOOKUP_FAILED \ 134 ((struct block_symbol) {(struct symbol *) 1, NULL}) 135 #define SYMBOL_LOOKUP_FAILED_P(SIB) (SIB.symbol == (struct symbol *) 1) 321 size_t search_len = strlen (search_name);
323 if (len < search_len)
327 if (FILENAME_CMP (
filename + len - search_len, search_name) != 0)
343 return (len == search_len
344 || (!IS_ABSOLUTE_PATH (search_name)
345 && IS_DIR_SEPARATOR (
filename[len - search_len - 1]))
357 const char *search_name)
364 if (search_path_elements > file_path_elements)
367 if (IS_ABSOLUTE_PATH (search_name))
369 return (search_path_elements == file_path_elements
371 FNM_FILE_NAME | FNM_NOESCAPE) == 0);
375 const char *file_to_compare
377 file_path_elements - search_path_elements);
380 FNM_FILE_NAME | FNM_NOESCAPE) == 0;
400 const char *real_path,
407 const char* base_name = lbasename (
name);
409 for (cust = first; cust != NULL && cust != after_last; cust = cust->
next)
423 && FILENAME_CMP (base_name, lbasename (s->
filename)) != 0)
435 if (real_path != NULL)
441 if (FILENAME_CMP (real_path,
fullname) == 0)
470 if (IS_ABSOLUTE_PATH (
name))
473 gdb_assert (IS_ABSOLUTE_PATH (real_path.get ()));
504 struct symtab *result = NULL;
524 int mangled_name_len;
527 struct fn_field *method = &f[signature_id];
534 int is_full_physname_constructor;
539 const char *const_prefix = method->
is_const ?
"C" :
"";
540 const char *volatile_prefix = method->
is_volatile ?
"V" :
"";
542 int len = (newname == NULL ? 0 : strlen (newname));
553 || (newname && strcmp (
field_name, newname) == 0);
567 xsnprintf (buf,
sizeof (buf),
"__%s%s", const_prefix, volatile_prefix);
573 xsnprintf (buf,
sizeof (buf),
"__%s%s", const_prefix, volatile_prefix);
579 xsnprintf (buf,
sizeof (buf),
"__%s%s%d", const_prefix,
580 volatile_prefix, len);
583 + strlen (buf) + len + strlen (
physname) + 1);
585 mangled_name = (
char *)
xmalloc (mangled_name_len);
587 mangled_name[0] =
'\0';
591 strcat (mangled_name, buf);
596 strcat (mangled_name, newname);
599 return (mangled_name);
608 struct obstack *obstack)
649 struct obstack *obstack)
689 return htab_hash_string (e->
mangled);
774 const char *linkage_name,
int len,
int copy_name,
779 const char *linkage_name_copy;
788 gsymbol->
name = linkage_name;
794 memcpy (
name, linkage_name, len);
806 if (linkage_name[len] !=
'\0')
810 alloc_name = (
char *) alloca (len + 1);
811 memcpy (alloc_name, linkage_name, len);
812 alloc_name[len] =
'\0';
814 linkage_name_copy = alloc_name;
817 linkage_name_copy = linkage_name;
819 entry.
mangled = linkage_name_copy;
829 && (*slot)->demangled[0] ==
'\0'))
833 int demangled_len = demangled_name ? strlen (demangled_name) : 0;
844 if (!
copy_name && linkage_name_copy == linkage_name)
850 + demangled_len + 1));
851 (*slot)->
mangled = linkage_name;
864 + len + demangled_len + 2));
865 mangled_ptr = &((*slot)->demangled[demangled_len + 1]);
866 strcpy (mangled_ptr, linkage_name_copy);
867 (*slot)->mangled = mangled_ptr;
870 if (demangled_name != NULL)
872 strcpy ((*slot)->demangled, demangled_name);
873 xfree (demangled_name);
876 (*slot)->demangled[0] =
'\0';
879 gsymbol->
name = (*slot)->mangled;
880 if ((*slot)->demangled[0] !=
'\0')
908 return gsymbol->
name;
917 const char *dem_name = NULL;
946 return gsymbol->
name;
981 if (first == NULL || second == NULL)
985 if (first->owner == NULL || second->owner == NULL)
989 if (first->owner == second->owner)
996 if (bfd_get_section_size (first) != bfd_get_section_size (second))
1000 if (bfd_get_section_vma (first->owner, first)
1001 - bfd_get_start_address (first->owner)
1002 != bfd_get_section_vma (second->owner, second)
1003 - bfd_get_start_address (second->owner))
1006 if (bfd_get_section_name (first->owner, first) == NULL
1007 || bfd_get_section_name (second->owner, second) == NULL
1008 || strcmp (bfd_get_section_name (first->owner, first),
1009 bfd_get_section_name (second->owner, second)) != 0)
1015 if (obj->
obfd == first->owner)
1067 unsigned int hash = (uintptr_t) objfile_context;
1086 const struct objfile *objfile_context,
1089 const char *slot_name;
1110 if (slot_name == NULL &&
name == NULL)
1114 if (slot_domain != domain)
1117 else if (slot_name != NULL &&
name != NULL)
1131 if (strcmp (slot_name,
name) != 0)
1133 if (slot_domain != domain)
1284 error (
_(
"Symbol cache size is too large, max is %u."),
1313 bsc = cache->global_symbols;
1315 bsc = cache->static_symbols;
1330 "%s block symbol cache hit%s for %s, %s\n",
1333 ?
" (not found)" :
"",
1349 "%s block symbol cache miss for %s, %s\n",
1443 for (pass = 0; pass < 2; ++pass)
1449 for (i = 0; i < bsc->
size; ++i)
1474 for (pass = 0; pass < 2; ++pass)
1485 for (i = 0; i < bsc->
size; ++i)
1491 switch (slot->
state)
1532 :
"(no object file)");
1570 for (pass = 0; pass < 2; ++pass)
1604 :
"(no object file)");
1775 if (without_params != NULL)
1785 m_demangled_name = lookup_name.
name ();
1831 if (demangled_name != NULL)
1837 if (!canon.empty ())
1843 if (demangled_name != NULL)
1849 if (demangled_name != NULL)
1886 block, domain, lang,
1887 is_a_field_of_this);
1899 is_a_field_of_this);
1918 if (lang->la_name_of_this == NULL ||
block == NULL)
1926 "lookup_language_this (%s, %s (objfile %s))",
2021 "lookup_symbol_aux (%s, %s (objfile %s), %s, %s)\n",
2032 if (is_a_field_of_this != NULL)
2033 memset (is_a_field_of_this, 0,
sizeof (*is_a_field_of_this));
2039 if (result.
symbol != NULL)
2073 error (
_(
"Internal error: `%s' is not an aggregate"),
2081 "lookup_symbol_aux (...) = NULL\n");
2092 if (result.
symbol != NULL)
2132 if (static_block == NULL)
2135 while (
block != static_block)
2201 "lookup_symbol_in_block (%s, %s (objfile %s), %s)",
2239 if (result.
symbol != NULL)
2262 "lookup_symbol_in_objfile_symtabs (%s, %s, %s, %s)",
2265 ?
"GLOBAL_BLOCK" :
"STATIC_BLOCK",
2279 if (result.
symbol != NULL)
2309 const char *linkage_name,
2313 struct objfile *main_objfile, *cur_objfile;
2323 for (cur_objfile = main_objfile;
2330 modified_name, domain);
2331 if (result.symbol == NULL)
2333 modified_name, domain);
2334 if (result.symbol != NULL)
2344 static void ATTRIBUTE_NORETURN
2349 Internal: %s symbol `%s' found in %s psymtab but not in symtab.\n\ 2350 %s may be an inlined function, or may be a template function\n \ 2351 (if a template, try specifying an instantiation: %s<type>)."),
2376 "lookup_symbol_via_quick_fns (%s, %s, %s, %s)\n",
2379 ?
"GLOBAL_BLOCK" :
"STATIC_BLOCK",
2389 "lookup_symbol_via_quick_fns (...) = NULL\n");
2398 if (result.
symbol == NULL)
2404 "lookup_symbol_via_quick_fns (...) = %s (block %s)\n",
2457 if (result.symbol != NULL)
2476 result.block = NULL;
2477 if (result.symbol != NULL)
2494 if (static_block == NULL)
2502 "lookup_symbol_in_static_block (%s, %s (objfile %s)," 2512 static_block, domain);
2516 "lookup_symbol_in_static_block (...) = %s\n",
2536 "lookup_symbol_in_objfile (%s, %s, %s, %s)\n",
2539 ?
"GLOBAL_BLOCK" :
"STATIC_BLOCK",
2545 if (result.
symbol != NULL)
2550 "lookup_symbol_in_objfile (...) = %s" 2562 "lookup_symbol_in_objfile (...) = %s%s\n",
2566 result.
symbol != NULL ?
" (via quick fns)" :
"");
2586 if (result.
symbol != NULL)
2596 if (result.
symbol != NULL)
2668 if (result.
symbol != NULL)
2680 if (result.
symbol == NULL)
2682 memset (&lookup_data, 0,
sizeof (lookup_data));
2688 result = lookup_data.
result;
2691 if (result.
symbol != NULL)
2716 return (symbol_domain ==
domain);
2730 static struct type *
2760 static struct type *
2767 const struct symbol *sym;
2837 return (
struct type *) 0;
2862 if (!callback (sym))
2943 struct symbol *sym = NULL;
2961 if (best_cust != NULL)
3066 struct symtab *best_symtab = 0;
3140 if (msymbol.
minsym != NULL)
3147 if (mfunsym.
minsym == NULL)
3213 if (item->
pc > pc && (!alt || item->
pc < alt->
pc))
3216 for (i = 0; i < len; i++, item++)
3236 if (prev && prev->
line && (!best || prev->
pc > best->
pc))
3239 best_symtab = iter_s;
3242 if (best_end <= best->pc)
3249 if (best && i < len && item->pc > best->
pc 3250 && (best_end == 0 || best_end > item->
pc))
3251 best_end = item->
pc;
3262 else if (best->
line == 0)
3271 val.
symtab = best_symtab;
3274 if (best_end && (!alt || best_end < alt->pc))
3323 int *index,
int *exact_match)
3332 struct symtab *best_symtab;
3338 if (best_index < 0 || !exact)
3356 if (best_index >= 0)
3357 best = best_linetable->
item[best_index].
line;
3389 if (best == 0 || l->
item[ind].
line < best)
3404 *index = best_index;
3406 *exact_match = exact;
3415 std::vector<CORE_ADDR>
3420 std::vector<CORE_ADDR> result;
3437 if (*best_item == NULL || item->
line < (*best_item)->line)
3504 *startptr = found_sal.
pc;
3505 *endptr = found_sal.
pc;
3509 *startptr = found_sal.
pc;
3510 *endptr = found_sal.
end;
3524 int *exact_match,
int start)
3533 int best_index = -1;
3544 for (i = start; i < len; i++)
3548 if (item->
line == lineno)
3555 if (item->
line > lineno && (best == 0 || item->
line < best))
3574 return sal.symtab != 0;
3594 if (funfirstline && sal.
symtab != NULL
3651 for (i = 0; i < l->
nitems; i++)
3658 if (item->
line > 0 && func_start <= item->
pc && item->
pc < func_end)
3680 const struct block *b, *function_block;
3681 int force_skip, skip;
3706 if (msymbol.
minsym == NULL)
3757 if (skip && start_sal.
pc != pc
3782 while (!force_skip && skip--);
3792 if (!force_skip && sym && start_sal.
symtab == NULL)
3814 sal->
end = start_sal.
end;
3819 function_block = NULL;
3828 if (function_block != NULL
3859 const struct block *bl;
3866 if (prologue_sal.
line != 0)
3893 if (prologue_sal.
end >= end_pc)
3896 while (prologue_sal.
end < end_pc)
3905 if (sal.line >= prologue_sal.
line)
3909 if (sal.symtab != prologue_sal.
symtab)
3941 if (prologue_sal.
end < end_pc)
3944 return prologue_sal.
end;
3947 return prologue_sal.
pc;
3984 if (isalpha (*p) || *p ==
'_' || *p ==
'$' || *p ==
'\0')
3988 while (*p ==
' ' || *p ==
'\t')
3993 if (isalpha (*p) || *p ==
'_' || *p ==
'$')
3995 const char *q = p + 1;
3997 while (isalnum (*q) || *q ==
'_' || *q ==
'$')
4015 else if (p[1] ==
'[')
4018 error (
_(
"mismatched quoting on brackets, " 4019 "try 'operator\\[\\]'"));
4020 else if (p[2] ==
'\\' && p[3] ==
']')
4026 error (
_(
"nothing is allowed between '[' and ']'"));
4052 if (p[0] ==
'-' && p[1] ==
'>')
4060 else if (p[2] ==
'\\')
4071 if (p[1] ==
'=' || p[1] == p[0])
4082 error (
_(
"`operator ()' must be specified " 4083 "without whitespace in `()'"));
4088 error (
_(
"`operator ?:' must be specified " 4089 "without whitespace in `?:'"));
4094 error (
_(
"`operator []' must be specified " 4095 "without whitespace in `[]'"));
4099 error (
_(
"`operator %s' not supported"), p);
4172 error (
_(
"No symbol table is loaded. Use the \"file\" command."));
4179 printf_filtered (
"Source files for which symbols have been read in:\n\n");
4191 "will be read in on demand:\n\n");
4193 filenames_seen.
clear ();
4204 file_matches (
const char *file,
const char *files[],
int nfiles,
int basenames)
4208 if (file != NULL && nfiles != 0)
4210 for (i = 0; i < nfiles; i++)
4213 ? lbasename (files[i])
4218 else if (nfiles == 0)
4249 std::sort (result->begin (), result->end ());
4250 result->erase (std::unique (result->begin (), result->end ()),
4268 std::vector<symbol_search>
4270 int nfiles,
const char *files[])
4293 std::vector<symbol_search> result;
4298 ourtype = types[kind];
4299 ourtype2 = types2[kind];
4300 ourtype3 = types3[kind];
4301 ourtype4 = types4[kind];
4317 if (isalpha (*opname) || *opname ==
'_' || *opname ==
'$')
4320 if (opname[-1] !=
' ' || opname[-2] ==
' ')
4326 if (opname[-1] ==
' ')
4332 char *tmp = (
char *) alloca (8 + fix + strlen (opname) + 1);
4334 sprintf (tmp,
"operator%.*s%s", fix,
" ", opname);
4341 preg.
emplace (regexp, cflags,
_(
"Invalid regexp"));
4353 [&] (
const char *symname)
4355 return (!preg || preg->
exec (symname,
4449 result.emplace_back (i, sym);
4455 if (!result.empty ())
4489 result.emplace_back (i, msymbol,
objfile);
4507 int block,
const char *last)
4512 if (last == NULL || filename_cmp (last, s_filename) != 0)
4568 static const char *
const classnames[] =
4569 {
"variable",
"function",
"type"};
4570 const char *last_filename = NULL;
4576 std::vector<symbol_search> symbols =
search_symbols (regexp, kind, 0, NULL);
4580 classnames[kind], regexp);
4588 if (p.msymbol.minsym != NULL)
4640 const char **files = NULL;
4641 const char *file_name;
4646 const char *colon = strchr (regexp,
':');
4648 if (colon && *(colon + 1) !=
':')
4653 colon_index = colon - regexp;
4654 local_name = (
char *) alloca (colon_index + 1);
4655 memcpy (local_name, regexp, colon_index);
4656 local_name[colon_index--] = 0;
4657 while (isspace (local_name[colon_index]))
4658 local_name[colon_index--] = 0;
4659 file_name = local_name;
4673 if (p.msymbol.minsym == NULL)
4711 return name_match (symbol_name, lookup_name, &match_res);
4719 const char *symname,
4721 const char *text,
const char *word)
4760 const char *text,
const char *word)
4764 lookup_name, text, word);
4773 const char *text,
const char *word)
4777 lookup_name, text, word);
4788 const char *text,
const char *word)
4790 static char *tmp = NULL;
4791 static unsigned int tmplen = 0;
4793 const char *method, *category, *
selector;
4799 if ((method[0] !=
'-') && (method[0] !=
'+'))
4809 while ((strlen (method) + 1) >= tmplen)
4815 tmp = (
char *)
xrealloc (tmp, tmplen);
4821 category = strchr (method,
'(');
4823 if ((category != NULL) && (
selector != NULL))
4825 memcpy (tmp, method, (category - method));
4826 tmp[category - method] =
' ';
4829 lookup_name, text, word);
4832 lookup_name, text, word);
4839 tmp2 = strchr (tmp,
']');
4844 lookup_name, text, word);
4854 for (; p > text; --p)
4856 if (isalnum (p[-1]) || p[-1] ==
'_' || p[-1] ==
'\0')
4864 else if (p[-1] ==
'[' && (p[-2] ==
'-' || p[-2] ==
'+'))
4866 else if (p[-1] ==
' ' || p[-1] ==
'(' || p[-1] ==
')')
4876 if (isalnum (t[-1]) || t[-1] ==
'_' ||
4877 t[-1] ==
' ' || t[-1] ==
':' ||
4878 t[-1] ==
'(' || t[-1] ==
')')
4883 if (t[-1] ==
'[' && (t[-2] ==
'-' || t[-2] ==
'+'))
4898 const char *text,
const char *word)
4911 lookup_name, text, word);
4954 const char *text,
const char *word,
4958 const struct block *b;
4988 const char *text,
const char *word,
4999 const struct block *b;
5000 const struct block *surrounding_static_block, *surrounding_global_block;
5003 const char *sym_text;
5012 const char *quote_pos = NULL;
5016 for (p = text; *p !=
'\0'; ++p)
5018 if (quote_found !=
'\0')
5020 if (*p == quote_found)
5023 else if (*p ==
'\\' && p[1] == quote_found)
5028 else if (*p ==
'\'' || *p ==
'"')
5034 if (quote_found ==
'\'')
5036 sym_text = quote_pos + 1;
5037 else if (quote_found ==
'"')
5049 if (isalnum (p[-1]) || p[-1] ==
'_' || p[-1] ==
'\0' 5050 || p[-1] ==
':' || strchr (break_on, p[-1]) != NULL)
5086 sym_text, word,
code);
5096 tracker, mode, lookup_name,
5097 sym_text, word,
code);
5109 if (surrounding_static_block != NULL)
5110 while (b != surrounding_static_block)
5141 if (surrounding_static_block != NULL)
5146 if (surrounding_global_block != NULL)
5160 auto add_macro_name = [&] (
const char *macro_name,
5166 lookup_name, sym_text, word);
5193 const char *text,
const char *word,
5209 const char *text,
const char *word)
5222 const char *text,
const char *word,
5243 const char *text,
const char *word,
5244 const char *srcfile)
5247 const char *sym_text;
5257 const char *quote_pos = NULL;
5261 for (p = text; *p !=
'\0'; ++p)
5263 if (quote_found !=
'\0')
5265 if (*p == quote_found)
5268 else if (*p ==
'\\' && p[1] == quote_found)
5273 else if (*p ==
'\'' || *p ==
'"')
5279 if (quote_found ==
'\'')
5281 sym_text = quote_pos + 1;
5282 else if (quote_found ==
'"')
5302 tracker, mode, lookup_name,
5322 static const char *illegal_aliens[] = {
5328 for (i = 0; illegal_aliens[i]; i++)
5330 if (filename_cmp (fname, illegal_aliens[i]) == 0)
5359 && filename_ncmp (filename, data->
text, data->
text_len) == 0)
5367 const char *base_name = lbasename (filename);
5369 if (base_name != filename
5371 && filename_ncmp (base_name, data->
text, data->
text_len) == 0)
5386 size_t text_len = strlen (text);
5388 const char *base_name;
5413 base_name = lbasename (s->
filename);
5415 && !filenames_seen.
seen (base_name)
5499 const char *new_main_name;
5535 if (new_main_name != NULL)
5542 if (new_main_name != NULL)
5549 if (new_main_name != NULL)
5556 if (new_main_name != NULL)
5607 static const char *
const arm_idents[] = {
5608 "ARM C Compiler, ADS",
5609 "Thumb C Compiler, ADS",
5610 "ARM C++ Compiler, ADS",
5611 "Thumb C++ Compiler, ADS",
5612 "ARM/Thumb C/C++ Compiler, RVCT",
5613 "ARM C/C++ Compiler, RVCT" 5617 if (producer == NULL)
5620 for (i = 0; i < ARRAY_SIZE (arm_idents); i++)
5635 #define MAX_SYMBOL_IMPLS (LOC_FINAL_VALUE + 10) 5749 memset (sym, 0,
sizeof (*sym));
5832 All global and static variable names, or those matching REGEXP."));
5835 All global and static variable names, or those matching REGEXP."));
5838 _(
"All function names, or those matching REGEXP."));
5849 _(
"All type names, or those matching REGEXP."));
5852 _(
"Source files in the program."));
5855 _(
"Set a breakpoint for all functions matching REGEXP."));
5860 Set the debugger behavior when more than one symbol are possible matches\n\ 5861 in an expression."),
_(
"\ 5862 Show how the debugger handles ambiguities in expressions."),
_(
"\ 5863 Valid values are \"ask\", \"all\", \"cancel\", and the default is \"all\"."),
5868 Set whether a source file may have multiple base names."),
_(
"\ 5869 Show whether a source file may have multiple base names."),
_(
"\ 5870 (A \"base name\" is the name of a file with the directory part removed.\n\ 5871 Example: The base name of \"/home/user/hello.c\" is \"hello.c\".)\n\ 5872 If set, GDB will canonicalize file names (e.g., expand symlinks)\n\ 5873 before comparing them. Canonicalization is an expensive operation,\n\ 5874 but it allows the same file be known by more than one base name.\n\ 5875 If not set (the default), all source files are assumed to have just\n\ 5876 one base name, and gdb will do file name comparisons more efficiently."),
5881 _(
"Set debugging of symbol table creation."),
5882 _(
"Show debugging of symbol table creation."),
_(
"\ 5883 When enabled (non-zero), debugging messages are printed when building\n\ 5884 symbol tables. A value of 1 (one) normally provides enough information.\n\ 5885 A value greater than 1 provides more verbose information."),
5892 Set debugging of symbol lookup."),
_(
"\ 5893 Show debugging of symbol lookup."),
_(
"\ 5894 When enabled (non-zero), symbol lookups are logged."),
5900 _(
"Set the size of the symbol cache."),
5901 _(
"Show the size of the symbol cache."),
_(
"\ 5902 The size of the symbol cache.\n\ 5903 If zero then the symbol cache is disabled."),
5909 _(
"Dump the symbol cache for each program space."),
5914 _(
"Print symbol cache statistics for each program space."),
5919 _(
"Flush the symbol cache for each program space."),
struct gdbarch * target_gdbarch(void)
struct block_symbol lookup_symbol_search_name(const char *search_name, const struct block *block, domain_enum domain)
static void completion_list_objc_symbol(completion_tracker &tracker, struct minimal_symbol *msymbol, const lookup_name_info &lookup_name, const char *text, const char *word)
static void set_symbol_cache_size_handler(const char *args, int from_tty, struct cmd_list_element *c)
static int check_field(struct type *type, const char *name, struct field_of_this_result *is_a_field_of_this)
const struct symbol_register_ops * ops_register
enum language main_language(void)
static void symtab_symbol_info(const char *regexp, enum search_domain kind, int from_tty)
const char * symtab_to_filename_for_display(struct symtab *symtab)
int count_path_elements(const char *path)
#define SYMTAB_COMPUNIT(symtab)
std::vector< symbol_search > search_symbols(const char *regexp, enum search_domain kind, int nfiles, const char *files[])
struct symbol * language_lookup_primitive_type_as_symbol(const struct language_defn *la, struct gdbarch *gdbarch, const char *name)
completion_list make_source_files_completion_list(const char *text, const char *word)
struct bound_minimal_symbol lookup_minimal_symbol_by_pc_section(CORE_ADDR pc, struct obj_section *section)
static void symbol_cache_stats(struct symbol_cache *cache)
#define SYMTAB_LANGUAGE(symtab)
static void set_symbol_cache_size(unsigned int new_size)
struct template_symbol * allocate_template_symbol(struct objfile *objfile)
struct macro_source_file * file
struct observer * observer_attach_free_objfile(observer_free_objfile_ftype *f)
static struct type * basic_lookup_transparent_type_quick(struct objfile *objfile, int block_index, const char *name)
#define SYMBOL_PRINT_NAME(symbol)
void symbol_set_symtab(struct symbol *symbol, struct symtab *symtab)
#define MSYMBOL_LINKAGE_NAME(symbol)
#define MSYMBOL_LANGUAGE(symbol)
void symbol_set_language(struct general_symbol_info *gsymbol, enum language language, struct obstack *obstack)
struct linetable_entry item[1]
static char * symbol_find_demangled_name(struct general_symbol_info *gsymbol, const char *mangled)
#define TYPE_FIELD_NAME(thistype, n)
#define TYPE_N_BASECLASSES(thistype)
void(* describe_location)(struct symbol *symbol, CORE_ADDR addr, struct ui_file *stream)
const char multiple_symbols_cancel[]
const char * go_main_name(void)
struct objfile * separate_debug_objfile_backlink
int strcmp_iw(const char *string1, const char *string2)
#define TYPE_NFN_FIELDS(thistype)
const char * set_malloc_ptr(char *ptr)
int section_is_overlay(struct obj_section *section)
struct type *(* la_lookup_transparent_type)(const char *)
static const char *const multiple_symbols_modes[]
static void initialize_objfile_symbol_1(struct symbol *sym)
struct objfile * symfile_object_file
struct bfd_section * the_bfd_section
#define BMSYMBOL_VALUE_ADDRESS(symbol)
struct block_symbol_cache * static_symbols
enum address_class aclass
void expand_symtabs_matching(gdb::function_view< expand_symtabs_file_matcher_ftype > file_matcher, const lookup_name_info &lookup_name, gdb::function_view< expand_symtabs_symbol_matcher_ftype > symbol_matcher, gdb::function_view< expand_symtabs_exp_notify_ftype > expansion_notify, enum search_domain kind)
const char * symbol_search_name(const struct general_symbol_info *gsymbol)
struct program_space * pspace
bool(* map_symtabs_matching_filename)(struct objfile *objfile, const char *name, const char *real_path, gdb::function_view< bool(symtab *)> callback)
symbol_name_matcher_ftype * get_symbol_name_matcher(const language_defn *lang, const lookup_name_info &lookup_name)
void map_symbol_filenames(symbol_filename_ftype *fun, void *data, int need_fullname)
struct symbol * find_pc_sect_function(CORE_ADDR pc, struct obj_section *section)
char * gdb_mangle_name(struct type *type, int method_id, int signature_id)
const struct block * block_global_block(const struct block *block)
#define TYPE_FN_FIELDLIST(thistype, n)
struct symbol * block_lookup_symbol_primary(const struct block *block, const char *name, const domain_enum domain)
bool completion_mode() const
enum domain_enum_tag domain_enum
int compare_filenames_for_search(const char *filename, const char *search_name)
struct cmd_list_element * add_info(const char *name, cmd_const_cfunc_ftype *fun, const char *doc)
void collect_file_symbol_completion_matches(completion_tracker &tracker, complete_symbol_mode mode, symbol_name_match_type name_match_type, const char *text, const char *word, const char *srcfile)
struct symtab * lookup_symtab(const char *name)
#define SYMBOL_CLASS(symbol)
void * memset(T *s, int c, size_t n)=delete
#define TYPE_IS_OPAQUE(thistype)
struct compunit_symtab *(* find_pc_sect_compunit_symtab)(struct objfile *objfile, struct bound_minimal_symbol msymbol, CORE_ADDR pc, struct obj_section *section, int warn_if_readin)
static void symbol_cache_dump(const struct symbol_cache *cache)
#define obj_section_endaddr(s)
int compare_glob_filenames_for_search(const char *filename, const char *search_name)
const struct language_defn * language_def(enum language lang)
static void free_symbol_cache(struct symbol_cache *cache)
struct observer * observer_attach_executable_changed(observer_executable_changed_ftype *f)
CORE_ADDR gdbarch_deprecated_function_start_offset(struct gdbarch *gdbarch)
void(* expand_symtabs_with_fullname)(struct objfile *objfile, const char *fullname)
void collect_symbol_completion_matches_type(completion_tracker &tracker, const char *text, const char *word, enum type_code code)
void add_setshow_enum_cmd(const char *name, enum command_class theclass, const char *const *enumlist, const char **var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_const_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
unsigned int symbol_lookup_debug
bool() symbol_name_matcher_ftype(const char *symbol_search_name, const lookup_name_info &lookup_name, completion_match_result *comp_match_res)
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **list)
void type_print(struct type *type, const char *varstring, struct ui_file *stream, int show)
struct compunit_symtab *(* find_compunit_symtab_by_address)(struct objfile *objfile, CORE_ADDR address)
struct gdbarch * symbol_arch(const struct symbol *symbol)
union symbol_cache_slot::@169 value
const char multiple_symbols_ask[]
#define SYMBOL_LOOKUP_FAILED_P(SIB)
void initialize_objfile_symbol(struct symbol *sym)
static int file_matches(const char *file, const char *files[], int nfiles, int basenames)
int have_partial_symbols(void)
void collect_symbol_completion_matches(completion_tracker &tracker, complete_symbol_mode mode, symbol_name_match_type name_match_type, const char *text, const char *word)
enum language la_language
static void maintenance_print_symbol_cache_statistics(const char *args, int from_tty)
#define ALL_OBJFILE_OSECTIONS(objfile, osect)
struct filename_seen_cache * filename_seen_cache
CORE_ADDR skip_prologue_using_sal(struct gdbarch *gdbarch, CORE_ADDR func_addr)
#define BLOCKVECTOR_BLOCK(blocklist, n)
const struct block_symbol null_block_symbol
struct obj_section * section
struct block_symbol result
struct block_symbol lookup_symbol(const char *name, const struct block *block, domain_enum domain, struct field_of_this_result *is_a_field_of_this)
static void symtab_free_objfile_observer(struct objfile *objfile)
gdb::unique_xmalloc_ptr< char > gdb_realpath(const char *filename)
char * skip_spaces(char *chp)
const struct symbol_impl * symbol_impls
struct symtab_and_line find_function_start_sal(struct symbol *sym, int funfirstline)
const char * strip_leading_path_elements(const char *path, int n)
#define TYPE_FIELD(thistype, n)
static void symtab_observer_executable_changed(void)
const char * pascal_main_name(void)
static int compare_search_syms(const symbol_search &sym_a, const symbol_search &sym_b)
int producer_is_realview(const char *producer)
int register_symbol_computed_impl(enum address_class aclass, const struct symbol_computed_ops *ops)
int register_symbol_block_impl(enum address_class aclass, const struct symbol_block_ops *ops)
struct macro_scope * default_macro_scope(void)
void rbreak_command_wrapper(char *regexp, int from_tty)
struct objfile_per_bfd_storage * per_bfd
gdb_static_assert(MAX_SYMBOL_IMPLS<=(1<< SYMBOL_ACLASS_BITS))
struct bound_minimal_symbol lookup_minimal_symbol_text(const char *name, struct objfile *objf)
const struct symbol_block_ops * ops_block
struct cmd_list_element * maintenance_set_cmdlist
struct objfile * symbol_objfile(const struct symbol *symbol)
static const char * operator_chars(const char *p, const char **end)
static struct block_symbol lookup_symbol_in_objfile_from_linkage_name(struct objfile *objfile, const char *linkage_name, domain_enum domain)
const struct block * block_for_pc(CORE_ADDR pc)
static struct block_symbol lookup_symbol_in_objfile(struct objfile *objfile, int block_index, const char *name, const domain_enum domain)
void printf_filtered(const char *format,...)
const char * la_name_of_this
struct macro_table * macro_user_macros
const char * search_domain_name(enum search_domain e)
std::vector< CORE_ADDR > find_pcs_for_symtab_line(struct symtab *symtab, int line, struct linetable_entry **best_item)
const char * multiple_symbols_select_mode(void)
#define host_address_to_string(ADDR)
#define SYMBOL_OBJ_SECTION(objfile, symbol)
struct obj_section * find_pc_overlay(CORE_ADDR pc)
#define TYPE_IS_REFERENCE(t)
struct compunit_symtab *(* lookup_symbol)(struct objfile *objfile, int block_index, const char *name, domain_enum domain)
#define BLOCK_FUNCTION(bl)
const char * symtab_to_fullname(struct symtab *s)
struct compunit_symtab * find_pc_compunit_symtab(CORE_ADDR pc)
static void print_symbol_info(enum search_domain kind, struct symbol *sym, int block, const char *last)
symbol_name_match_type match_type() const
struct minimal_symbol * lookup_minimal_symbol_by_pc_name(CORE_ADDR pc, const char *name, struct objfile *objf)
static void initialize_ordinary_address_classes(void)
#define MSYMBOL_OBJ_SECTION(objfile, symbol)
void add_setshow_zuinteger_cmd(const char *name, enum command_class theclass, unsigned int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_const_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
int gdbarch_skip_main_prologue_p(struct gdbarch *gdbarch)
const char * demangle_for_lookup(const char *name, enum language lang, demangle_result_storage &storage)
#define MSYMBOL_PRINT_NAME(symbol)
static void info_sources_command(const char *ignore, int from_tty)
struct fn_fieldlist * fn_field
static void symtab_new_objfile_observer(struct objfile *objfile)
static void maybe_add_partial_symtab_filename(const char *filename, const char *fullname, void *user_data)
struct cmd_list_element * setlist
char * gdb_demangle(const char *name, int options)
#define DEFAULT_SYMBOL_CACHE_SIZE
#define TYPE_FN_FIELD_PHYSNAME(thisfn, n)
void(* find_frame_base_location)(struct symbol *framefunc, CORE_ADDR pc, const gdb_byte **start, size_t *length)
unsigned int created_by_gdb
void(* la_collect_symbol_completion_matches)(completion_tracker &tracker, complete_symbol_mode mode, symbol_name_match_type match_type, const char *text, const char *word, enum type_code code)
static const char * multiple_symbols_mode
void macro_for_each(struct macro_table *table, gdb::function_view< macro_callback_fn > fn)
static hashval_t hash_demangled_name_entry(const void *data)
char * ada_main_name(void)
struct type * check_typedef(struct type *type)
#define SYMBOL_VALUE_ADDRESS(symbol)
static struct block_symbol lookup_symbol_via_quick_fns(struct objfile *objfile, int block_index, const char *name, const domain_enum domain)
struct block_symbol basic_lookup_symbol_nonlocal(const struct language_defn *langdef, const char *name, const struct block *block, const domain_enum domain)
static void print_msymbol_info(struct bound_minimal_symbol msymbol)
static void symbol_cache_flush(struct program_space *pspace)
static void set_main_name(const char *name, enum language lang)
std::unique_ptr< T, xfree_deleter< T > > unique_xmalloc_ptr
struct type * lookup_transparent_type(const char *name)
void expand_symtab_containing_pc(CORE_ADDR pc, struct obj_section *section)
#define SYMBOL_DOMAIN(symbol)
struct symtab_and_line find_pc_line(CORE_ADDR pc, int notcurrent)
bool symbol_is_function_or_method(symbol *sym)
objfile(bfd *, const char *, objfile_flags)
void typedef_print(struct type *type, struct symbol *newobj, struct ui_file *stream)
#define SYMBOL_MATCHES_SEARCH_NAME(symbol, name)
enum ctor_kinds is_constructor_name(const char *name)
struct filename_seen_cache * filename_seen_cache
#define SYMTAB_OBJFILE(symtab)
static int eq_demangled_name_entry(const void *a, const void *b)
bool iterate_over_some_symtabs(const char *name, const char *real_path, struct compunit_symtab *first, struct compunit_symtab *after_last, gdb::function_view< bool(symtab *)> callback)
struct symbol * find_pc_function(CORE_ADDR pc)
const struct block * block
static int eq_symbol_entry(const struct symbol_cache_slot *slot, const struct objfile *objfile_context, const char *name, domain_enum domain)
const char * symbol_natural_name(const struct general_symbol_info *gsymbol)
struct symbol * find_symbol_at_address(CORE_ADDR address)
const char * symbol_get_demangled_name(const struct general_symbol_info *gsymbol)
static const lookup_name_info & match_any()
struct value *(* read_variable)(struct symbol *symbol, struct frame_info *frame)
void fprintf_unfiltered(struct ui_file *stream, const char *format,...)
symbol * find_function_alias_target(bound_minimal_symbol msymbol)
std::vector< gdb::unique_xmalloc_ptr< char > > completion_list
struct symtab * compunit_primary_filetab(const struct compunit_symtab *cust)
const char * symbol_demangled_name(const struct general_symbol_info *gsymbol)
void(* tracepoint_var_ref)(struct symbol *symbol, struct agent_expr *ax, struct axs_value *value)
struct cmd_list_element * showlist
static void maintenance_flush_symbol_cache(const char *args, int from_tty)
void fputs_filtered(const char *linebuffer, struct ui_file *stream)
#define gdb_assert_not_reached(message)
static void output_source_filename(const char *name, struct output_source_filename_data *data)
static void create_demangled_names_hash(struct objfile *objfile)
const struct sym_fns * sf
static void symbol_cache_cleanup(struct program_space *pspace, void *data)
struct type * basic_lookup_transparent_type(const char *name)
struct block_symbol(* la_lookup_symbol_nonlocal)(const struct language_defn *, const char *, const struct block *, const domain_enum)
#define ANOFFSET(secoff, whichone)
struct gdbarch * get_objfile_arch(const struct objfile *objfile)
#define ALL_COMPUNITS(objfile, cu)
struct obj_section * sections
const char * language_str(enum language lang)
int find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr)
static bool completion_skip_symbol(complete_symbol_mode mode, Symbol *sym)
enum dtor_kinds is_destructor_name(const char *name)
demangle_for_lookup_info(const lookup_name_info &lookup_name, language lang)
#define BLOCK_SUPERBLOCK(bl)
static struct symbol_cache * make_symbol_cache(unsigned int size)
const bool ignore_parameters() const
union general_symbol_info::@172 language_specific
htab * demangled_names_hash
struct objfile * separate_debug_objfile
#define MSYMBOL_NATURAL_NAME(symbol)
static void completion_list_add_fields(completion_tracker &tracker, struct symbol *sym, const lookup_name_info &lookup_name, const char *text, const char *word)
#define SYMBOL_ACLASS_BITS
const struct objfile * objfile_context
#define SYMBOL_LINE(symbol)
#define SYMBOL_LINKAGE_NAME(symbol)
struct compunit_symtab * compunit_symtabs
static CORE_ADDR skip_prologue_using_lineinfo(CORE_ADDR func_addr, struct symtab *symtab)
static int startswith(const char *string, const char *pattern)
struct compunit_symtab * find_pc_sect_compunit_symtab(CORE_ADDR pc, struct obj_section *section)
int is_operator_name(const char *name)
void gdbarch_iterate_over_objfiles_in_search_order(struct gdbarch *gdbarch, iterate_over_objfiles_in_search_order_cb_ftype *cb, void *cb_data, struct objfile *current_objfile)
int gdbarch_addr_bit(struct gdbarch *gdbarch)
struct compunit_symtab * next
const char * domain_name(domain_enum e)
int block_find_non_opaque_type(struct symbol *sym, void *data)
#define TYPE_BASECLASS(thistype, index)
static void main_info_cleanup(struct program_space *pspace, void *data)
static struct block_symbol lookup_symbol_aux(const char *name, symbol_name_match_type match_type, const struct block *block, const domain_enum domain, enum language language, struct field_of_this_result *)
int section_is_mapped(struct obj_section *osect)
struct cmd_list_element * setdebuglist
struct block_symbol lookup_global_symbol(const char *name, const struct block *block, const domain_enum domain)
const char * swap_string(std::string &str)
static struct block_symbol lookup_symbol_in_objfile_symtabs(struct objfile *objfile, int block_index, const char *name, const domain_enum domain)
const char * objfile_name(const struct objfile *objfile)
static struct symbol_cache * get_symbol_cache(struct program_space *pspace)
completion_match_for_lcd match_for_lcd
void skip_prologue_sal(struct symtab_and_line *sal)
#define ALL_FILETABS(objfile, ps, s)
bool symbol_matches_search_name(const struct general_symbol_info *gsymbol, const lookup_name_info &name)
void symbol_set_demangled_name(struct general_symbol_info *gsymbol, const char *name, struct obstack *obstack)
struct block_symbol found
struct cmd_list_element * maintenanceprintlist
const struct block * block_for_pc_sect(CORE_ADDR pc, struct obj_section *section)
#define ALL_OBJFILE_COMPUNITS(objfile, cu)
static int next_aclass_value
static const struct program_space_data * main_progspace_key
unsigned long hash(const void *addr, int length)
int find_line_pc(struct symtab *symtab, int line, CORE_ADDR *pc)
void wrap_here(const char *indent)
static void ATTRIBUTE_NORETURN error_in_psymtab_expansion(int block_index, const char *name, struct compunit_symtab *cust)
#define SYMBOL_OBJFILE_OWNED(symbol)
PTR xrealloc(PTR ptr, size_t size)
void default_collect_symbol_completion_matches(completion_tracker &tracker, complete_symbol_mode mode, symbol_name_match_type name_match_type, const char *text, const char *word, enum type_code code)
#define COMPUNIT_BLOCKVECTOR(cust)
struct symbol * fixup_symbol_section(struct symbol *sym, struct objfile *objfile)
int block_inlined_p(const struct block *bl)
int find_line_pc_range(struct symtab_and_line sal, CORE_ADDR *startptr, CORE_ADDR *endptr)
#define MSYMBOL_TYPE(msymbol)
char * hex_string_custom(LONGEST num, int width)
T & emplace(Args &&... args)
struct symbol * block_find_symbol(const struct block *block, const char *name, const domain_enum domain, block_symbol_matcher_ftype *matcher, void *data)
#define ALL_MSYMBOLS(objfile, m)
const struct language_defn * current_language
struct obj_section * find_pc_mapped_section(CORE_ADDR pc)
#define TYPE_TARGET_TYPE(thistype)
void default_collect_symbol_completion_matches_break_on(completion_tracker &tracker, complete_symbol_mode mode, symbol_name_match_type name_match_type, const char *text, const char *word, const char *break_on, enum type_code code)
struct symbol_cache_slot symbols[1]
CORE_ADDR overlay_unmapped_address(CORE_ADDR pc, struct obj_section *section)
struct bound_minimal_symbol lookup_minimal_symbol_by_pc(CORE_ADDR pc)
struct symbol * allocate_symbol(struct objfile *objfile)
static void info_functions_command(const char *regexp, int from_tty)
#define ALL_PSPACES(pspace)
struct block_symbol lookup_global_symbol_from_objfile(struct objfile *main_objfile, const char *name, const domain_enum domain)
void iterate_over_symtabs(const char *name, gdb::function_view< bool(symtab *)> callback)
const char * name_of_main
static int lookup_symbol_global_iterator_cb(struct objfile *objfile, void *cb_data)
const std::string & name() const
int xsnprintf(char *str, size_t size, const char *format,...)
#define SYMBOL_BLOCK_VALUE(symbol)
gdb::unique_xmalloc_ptr< char > make_completion_match_str(const char *match_name, const char *text, const char *word)
const struct block * block_static_block(const struct block *block)
#define TYPE_CODE(thistype)
char * d_demangle(const char *symbol, int options)
static int find_line_common(struct linetable *, int, int *, int)
static struct main_info * get_main_info(void)
struct minimal_symbol * minsym
__extension__ enum language language
#define MSYMBOL_SECTION(symbol)
struct gdbarch * block_gdbarch(const struct block *block)
struct symbol_cache_slot::@169::@170 not_found
struct block_symbol lookup_static_symbol(const char *name, const domain_enum domain)
static void symbol_cache_mark_not_found(struct block_symbol_cache *bsc, struct symbol_cache_slot *slot, struct objfile *objfile_context, const char *name, domain_enum domain)
enum symbol_cache_slot_state state
gdb::unique_xmalloc_ptr< char > cp_remove_params_if_any(const char *demangled_name, bool completion_mode)
#define obj_section_addr(s)
unsigned int search_name_hash(enum language language, const char *search_name)
struct program_space * pspace
struct objfile * objfile_separate_debug_iterate(const struct objfile *parent, const struct objfile *objfile)
void _initialize_symtab(void)
static unsigned int symbol_cache_size
void add_setshow_boolean_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_const_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static unsigned int new_symbol_cache_size
const char * objfile_debug_name(const struct objfile *objfile)
int register_symbol_register_impl(enum address_class aclass, const struct symbol_register_ops *ops)
static void info_types_command(const char *regexp, int from_tty)
static void resize_symbol_cache(struct symbol_cache *cache, unsigned int new_size)
#define TYPE_NFIELDS(thistype)
struct general_symbol_info ginfo
enum language language_of_main
bool msymbol_is_function(struct objfile *objfile, minimal_symbol *minsym, CORE_ADDR *func_address_p)
void symbol_set_names(struct general_symbol_info *gsymbol, const char *linkage_name, int len, int copy_name, struct objfile *objfile)
enum language compunit_language(const struct compunit_symtab *cust)
#define SYMBOL_LANGUAGE(symbol)
struct symbol * lookup_symbol_in_block(const char *name, symbol_name_match_type match_type, const struct block *block, const domain_enum domain)
void add_completion(gdb::unique_xmalloc_ptr< char > name, completion_match_for_lcd *match_for_lcd=NULL, const char *text=NULL, const char *word=NULL)
#define COMPUNIT_FILETABS(cust)
std::string cp_canonicalize_string(const char *string)
#define SYMBOL_LOOKUP_FAILED
struct block_symbol_cache * global_symbols
bool seen(const char *file)
int symbol_matches_domain(enum language symbol_language, domain_enum symbol_domain, domain_enum domain)
void break_command(const char *arg, int from_tty)
std::string string_printf(const char *fmt,...)
int gdb_filename_fnmatch(const char *pattern, const char *string, int flags)
int have_full_symbols(void)
struct block_symbol solib_global_lookup(struct objfile *objfile, const char *name, const domain_enum domain)
#define COMPUNIT_LOCATIONS_VALID(cust)
struct block_symbol lookup_language_this(const struct language_defn *lang, const struct block *block)
static void symbol_cache_clear_slot(struct symbol_cache_slot *slot)
void completion_list_add_name(completion_tracker &tracker, language symbol_language, const char *symname, const lookup_name_info &lookup_name, const char *text, const char *word)
static int not_interesting_fname(const char *fname)
const struct block * get_selected_block(CORE_ADDR *addr_in_block)
void fixup_section(struct general_symbol_info *ginfo, CORE_ADDR addr, struct objfile *objfile)
const char * ada_decode_symbol(const struct general_symbol_info *arg)
#define SYMBOL_NATURAL_NAME(symbol)
static void output_partial_symbol_filename(const char *filename, const char *fullname, void *data)
struct program_space * current_program_space
unsigned int symtab_create_debug
static void rbreak_command(const char *, int)
const char * d_main_name(void)
static int ignore(struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
static PyObject * field_name(struct type *type, int field)
#define SYMBOL_SEARCH_NAME(symbol)
struct symtab_and_line find_pc_sect_line(CORE_ADDR pc, struct obj_section *section, int notcurrent)
void macro_for_each_in_scope(struct macro_source_file *file, int line, gdb::function_view< macro_callback_fn > fn)
struct block_symbol cp_lookup_symbol_imports_or_template(const char *scope, const char *name, const struct block *block, const domain_enum domain)
static void info_variables_command(const char *regexp, int from_tty)
static void find_main_name(void)
struct objfile * lookup_objfile_from_block(const struct block *block)
struct observer * observer_attach_new_objfile(observer_new_objfile_ftype *f)
#define SYMBOL_TYPE(symbol)
int language_sniff_from_mangled_name(const struct language_defn *lang, const char *mangled, char **demangled)
enum macro_expansion la_macro_expansion
static const char * language_search_unquoted_string(const char *text, const char *p)
struct cmd_list_element * maintenancelist
struct cmd_list_element * showdebuglist
static void sort_search_symbols_remove_dups(std::vector< symbol_search > *result)
static void completion_list_add_symbol(completion_tracker &tracker, symbol *sym, const lookup_name_info &lookup_name, const char *text, const char *word)
int gdbarch_skip_entrypoint_p(struct gdbarch *gdbarch)
CORE_ADDR overlay_mapped_address(CORE_ADDR pc, struct obj_section *section)
#define ALL_COMPUNIT_FILETABS(cu, s)
static void add_symtab_completions(struct compunit_symtab *cust, completion_tracker &tracker, complete_symbol_mode mode, const lookup_name_info &lookup_name, const char *text, const char *word, enum type_code code)
CORE_ADDR gdbarch_skip_main_prologue(struct gdbarch *gdbarch, CORE_ADDR ip)
#define TYPE_FN_FIELDLIST_NAME(thistype, n)
#define OBSTACK_ZALLOC(OBSTACK, TYPE)
const char * type_name_no_tag(const struct type *type)
void iterate_over_symbols(const struct block *block, const lookup_name_info &name, const domain_enum domain, gdb::function_view< symbol_found_callback_ftype > callback)
struct block_symbol lookup_symbol_in_static_block(const char *name, const struct block *block, const domain_enum domain)
int matching_obj_sections(struct obj_section *obj_first, struct obj_section *obj_second)
auto_obstack storage_obstack
#define SYMBOL_SECTION(symbol)
CORE_ADDR gdbarch_skip_entrypoint(struct gdbarch *gdbarch, CORE_ADDR ip)
static void add_filename_to_list(const char *fname, const char *text, const char *word, completion_list *list)
#define ALL_BLOCK_SYMBOLS_WITH_NAME(block, name, iter, sym)
static const struct program_space_data * symbol_cache_key
struct section_offsets * section_offsets
enum symbol_needs_kind(* get_symbol_read_needs)(struct symbol *symbol)
unsigned int(* la_search_name_hash)(const char *name)
completion_match_result & reset_completion_match_result()
#define ALL_OBJFILES(obj)
struct symtab * find_pc_line_symtab(CORE_ADDR pc)
struct cmd_list_element * add_com(const char *name, enum command_class theclass, cmd_const_cfunc_ftype *fun, const char *doc)
const struct quick_symbol_functions * qf
void switch_to_program_space_and_thread(program_space *pspace)
const struct symbol_computed_ops * ops_computed
static void symbol_cache_mark_found(struct block_symbol_cache *bsc, struct symbol_cache_slot *slot, struct objfile *objfile_context, struct symbol *symbol, const struct block *block)
struct symbol * block_lookup_symbol(const struct block *block, const char *name, symbol_name_match_type match_type, const domain_enum domain)
PTR xcalloc(size_t number, size_t size)
CORE_ADDR gdbarch_skip_prologue_noexcept(gdbarch *gdbarch, CORE_ADDR pc) noexcept
struct symtab * symbol_symtab(const struct symbol *symbol)
CORE_ADDR pc_in_unmapped_range(CORE_ADDR pc, struct obj_section *section)
struct cmd_list_element * maintenance_show_cmdlist
static struct type * basic_lookup_transparent_type_1(struct objfile *objfile, int block_index, const char *name)
struct block_symbol lookup_symbol_in_language(const char *name, const struct block *block, const domain_enum domain, enum language lang, struct field_of_this_result *is_a_field_of_this)
#define SYMTAB_LINETABLE(symtab)
struct symtab * find_line_symtab(struct symtab *symtab, int line, int *index, int *exact_match)
static void completion_list_add_msymbol(completion_tracker &tracker, minimal_symbol *sym, const lookup_name_info &lookup_name, const char *text, const char *word)
enum language language_of_main
const char multiple_symbols_all[]
void error(const char *fmt,...)
static struct block_symbol lookup_local_symbol(const char *name, symbol_name_match_type match_type, const struct block *block, const domain_enum domain, enum language language)
const char * block_scope(const struct block *block)
#define ALL_BLOCK_SYMBOLS(block, iter, sym)
#define TYPE_FN_FIELDLIST1(thistype, n)
static int compare_symbol_name(const char *symbol_name, language symbol_language, const lookup_name_info &lookup_name, completion_match_result &match_res)
#define MSYMBOL_VALUE_ADDRESS(objfile, symbol)
char * go_demangle(const char *mangled_name, int options)
#define MAX_SYMBOL_CACHE_SIZE
int find_pc_line_pc_range(CORE_ADDR pc, CORE_ADDR *startptr, CORE_ADDR *endptr)
char * copy_name(struct stoken token)
static void maintenance_print_symbol_cache(const char *args, int from_tty)
const char * demangled_name
__extension__ enum domain_enum_tag domain
static struct block_symbol symbol_cache_lookup(struct symbol_cache *cache, struct objfile *objfile_context, int block, const char *name, domain_enum domain, struct block_symbol_cache **bsc_ptr, struct symbol_cache_slot **slot_ptr)
static size_t symbol_cache_byte_size(unsigned int size)
static unsigned int hash_symbol_entry(const struct objfile *objfile_context, const char *name, domain_enum domain)
int exec(const char *string, size_t nmatch, regmatch_t pmatch[], int eflags) const