30#include "gdbsupport/gdb_regex.h"
50#include "gdbsupport/gdb_obstack.h"
68#include "gdbsupport/gdb_optional.h"
72#include "gdbsupport/gdb_string_view.h"
73#include "gdbsupport/pathstuff.h"
74#include "gdbsupport/common-utils.h"
131#define DEFAULT_SYMBOL_CACHE_SIZE 1021
136#define MAX_SYMBOL_CACHE_SIZE (1024*1024)
140#define SYMBOL_LOOKUP_FAILED \
141 ((struct block_symbol) {(struct symbol *) 1, NULL})
142#define SYMBOL_LOOKUP_FAILED_P(SIB) (SIB.symbol == (struct symbol *) 1)
222 for (
unsigned int i = 0; i < bsc->
size; i++)
316 default: gdb_assert_not_reached (
"bad domain_enum");
332 default: gdb_assert_not_reached (
"bad search_domain");
346 CORE_ADDR unrelocated_pc = pc - delta;
348 struct call_site call_site_local (unrelocated_pc, nullptr, nullptr);
371 symtab *prev_filetab =
nullptr;
378 if (prev_filetab !=
nullptr)
388 prev_filetab = filetab;
464 size_t search_len = strlen (search_name);
466 if (len < search_len)
470 if (FILENAME_CMP (
filename + len - search_len, search_name) != 0)
486 return (len == search_len
487 || (!IS_ABSOLUTE_PATH (search_name)
488 && IS_DIR_SEPARATOR (
filename[len - search_len - 1]))
500 const char *search_name)
507 if (search_path_elements > file_path_elements)
510 if (IS_ABSOLUTE_PATH (search_name))
512 return (search_path_elements == file_path_elements
514 FNM_FILE_NAME | FNM_NOESCAPE) == 0);
518 const char *file_to_compare
520 file_path_elements - search_path_elements);
523 FNM_FILE_NAME | FNM_NOESCAPE) == 0;
543 const char *real_path,
546 gdb::function_view<
bool (
symtab *)> callback)
549 const char* base_name = lbasename (
name);
551 for (cust = first; cust != NULL && cust != after_last; cust = cust->
next)
565 && FILENAME_CMP (base_name, lbasename (s->filename)) != 0)
577 if (real_path != NULL)
581 gdb_assert (IS_ABSOLUTE_PATH (real_path));
582 gdb_assert (IS_ABSOLUTE_PATH (
name));
583 gdb::unique_xmalloc_ptr<char> fullname_real_path
584 = gdb_realpath (fullname);
585 fullname = fullname_real_path.get ();
586 if (FILENAME_CMP (real_path, fullname) == 0)
608 gdb::function_view<
bool (
symtab *)> callback)
610 gdb::unique_xmalloc_ptr<char> real_path;
614 if (IS_ABSOLUTE_PATH (
name))
616 real_path = gdb_realpath (
name);
617 gdb_assert (IS_ABSOLUTE_PATH (real_path.get ()));
645 struct symtab *result = NULL;
665 int mangled_name_len;
668 struct fn_field *method = &
f[signature_id];
671 const char *newname =
type->
name ();
675 int is_full_physname_constructor;
680 const char *const_prefix = method->
is_const ?
"C" :
"";
681 const char *volatile_prefix = method->
is_volatile ?
"V" :
"";
683 int len = (newname == NULL ? 0 : strlen (newname));
694 || (newname && strcmp (
field_name, newname) == 0);
697 is_destructor = (startswith (
physname,
"__dt"));
699 if (is_destructor || is_full_physname_constructor)
708 xsnprintf (buf,
sizeof (buf),
"__%s%s", const_prefix, volatile_prefix);
714 xsnprintf (buf,
sizeof (buf),
"__%s%s", const_prefix, volatile_prefix);
720 xsnprintf (buf,
sizeof (buf),
"__%s%s%d", const_prefix,
721 volatile_prefix, len);
724 + strlen (buf) + len + strlen (
physname) + 1);
726 mangled_name = (
char *)
xmalloc (mangled_name_len);
728 mangled_name[0] =
'\0';
732 strcat (mangled_name, buf);
737 strcat (mangled_name, newname);
740 return (mangled_name);
747 struct obstack *obstack)
772 struct obstack *obstack)
837 e->~demangled_name_entry();
869gdb::unique_xmalloc_ptr<char>
917 gdb::optional<hashval_t> hash)
940 if (!hash.has_value ())
944 &entry, *hash, INSERT));
965 gdb::string_view linkage_name_copy;
968 char *alloc_name = (
char *) alloca (
linkage_name.length () + 1);
972 linkage_name_copy = gdb::string_view (alloc_name,
1008 char *mangled_ptr =
reinterpret_cast<char *
> (*slot + 1);
1012 (gdb::string_view (mangled_ptr,
linkage_name.length ()));
1020 m_name = (*slot)->mangled.data ();
1053 const char *dem_name = NULL;
1120 if (first == second)
1124 if (first == NULL || second == NULL)
1128 if (first->owner == NULL || second->owner == NULL)
1132 if (first->owner == second->owner)
1139 if (bfd_section_size (first) != bfd_section_size (second))
1143 if (bfd_section_vma (first) - bfd_get_start_address (first->owner)
1144 != bfd_section_vma (second) - bfd_get_start_address (second->owner))
1147 if (bfd_section_name (first) == NULL
1148 || bfd_section_name (second) == NULL
1149 || strcmp (bfd_section_name (first), bfd_section_name (second)) != 0)
1161 gdb_assert (obj != NULL);
1202 unsigned int hash = (uintptr_t) objfile_context;
1205 hash += htab_hash_string (
name);
1221 const struct objfile *objfile_context,
1224 const char *slot_name;
1245 if (slot_name == NULL &&
name == NULL)
1249 if (slot_domain != domain)
1252 else if (slot_name != NULL &&
name != NULL)
1266 if (strcmp (slot_name,
name) != 0)
1268 if (slot_domain != domain)
1381 error (_(
"Symbol cache size is too large, max is %u."),
1409 bsc = cache->global_symbols;
1411 bsc = cache->static_symbols;
1430 ?
" (not found)" :
"",
name,
1522 for (pass = 0; pass < 2; ++pass)
1528 for (i = 0; i < bsc->
size; ++i)
1553 for (pass = 0; pass < 2; ++pass)
1564 for (i = 0; i < bsc->
size; ++i)
1570 switch (slot->
state)
1575 gdb_printf (
" [%4u] = %s, %s %s (not found)\n", i,
1586 host_address_to_string (context),
1605 gdb_printf (_(
"Symbol cache for pspace %d\n%s:\n"),
1607 pspace->symfile_object_file != NULL
1609 :
"(no object file)");
1644 for (pass = 0; pass < 2; ++pass)
1672 gdb_printf (_(
"Symbol cache statistics for pspace %d\n%s:\n"),
1674 pspace->symfile_object_file != NULL
1676 :
"(no object file)");
1841 gdb::unique_xmalloc_ptr<char> without_params
1845 if (without_params != NULL)
1847 if (
lookup_name.match_type () != symbol_name_match_type::SEARCH_NAME)
1854 if (
lookup_name.match_type () == symbol_name_match_type::SEARCH_NAME)
1868 static const lookup_name_info lookup_name (
"", symbol_name_match_type::FULL,
1908 if (canon !=
nullptr)
1960 block, domain, lang,
1961 is_a_field_of_this);
1973 is_a_field_of_this);
1992 if (lang->name_of_this () == NULL ||
block == NULL)
1996 lang->name (), host_address_to_string (
block),
2009 (
"lookup_language_this (...) = %s (%s, block %s)",
2010 sym->
print_name (), host_address_to_string (sym),
2011 host_address_to_string (
block));
2088 (
"demangled symbol name = \"%s\", block @ %s (objfile %s)",
2092 (
"domain name = \"%s\", language = \"%s\")",
2100 if (is_a_field_of_this != NULL)
2101 memset (is_a_field_of_this, 0,
sizeof (*is_a_field_of_this));
2107 if (result.
symbol != NULL)
2110 (
"found symbol @ %s (using lookup_local_symbol)",
2111 host_address_to_string (result.
symbol));
2137 if (t->
code () != TYPE_CODE_STRUCT
2138 && t->
code () != TYPE_CODE_UNION)
2139 error (_(
"Internal error: `%s' is not an aggregate"),
2154 if (result.
symbol != NULL)
2157 (
"found symbol @ %s (using language lookup_symbol_nonlocal)",
2158 host_address_to_string (result.
symbol));
2167 (
"found symbol @ %s (using lookup_static_symbol)",
2168 result.
symbol != NULL ? host_address_to_string (result.
symbol) :
"NULL");
2188 if (static_block == NULL)
2191 while (
block != static_block)
2203 if (blocksym.
symbol != NULL)
2232 (
"lookup_symbol_in_block (%s, %s (objfile %s), %s)",
2242 host_address_to_string (sym));
2260 for (
objfile *
objfile : main_objfile->separate_debug_objfiles ())
2265 if (result.
symbol !=
nullptr)
2285 (
"lookup_symbol_in_objfile_symtabs (%s, %s, %s, %s)",
2287 block_index ==
GLOBAL_BLOCK ?
"GLOBAL_BLOCK" :
"STATIC_BLOCK",
2298 bv = cust->blockvector ();
2302 if (result.
symbol == NULL)
2314 if (better != other.
symbol)
2322 if (other.
symbol != NULL)
2325 (
"lookup_symbol_in_objfile_symtabs (...) = %s (block %s)",
2326 host_address_to_string (other.
symbol),
2327 host_address_to_string (other.
block));
2333 (
"lookup_symbol_in_objfile_symtabs (...) = NULL");
2348 const char *linkage_name,
2367 modified_name, domain);
2368 if (result.
symbol == NULL)
2370 modified_name, domain);
2371 if (result.
symbol != NULL)
2381static void ATTRIBUTE_NORETURN
2386Internal: %s symbol `%s' found in %s psymtab but not in symtab.\n\
2387%s may be an inlined function, or may be a template function\n \
2388(if a template, try specifying an instantiation: %s<type>)."),
2409 (
"lookup_symbol_via_quick_fns (%s, %s, %s, %s)",
2411 block_index ==
GLOBAL_BLOCK ?
"GLOBAL_BLOCK" :
"STATIC_BLOCK",
2418 (
"lookup_symbol_via_quick_fns (...) = NULL");
2426 if (result.
symbol == NULL)
2430 (
"lookup_symbol_via_quick_fns (...) = %s (block %s)",
2431 host_address_to_string (result.
symbol),
2432 host_address_to_string (
block));
2443 const struct block *block,
2444 const domain_enum domain) const
2453 if (result.
symbol != NULL)
2472 result.
block = NULL;
2473 if (result.
symbol != NULL)
2490 if (static_block == NULL)
2499 (
"lookup_symbol_in_static_block (%s, %s (objfile %s), %s)",
2507 static_block, domain);
2510 ? host_address_to_string (sym) :
"NULL");
2530 ?
"GLOBAL_BLOCK" :
"STATIC_BLOCK",
2535 if (result.
symbol != NULL)
2538 (
"lookup_symbol_in_objfile (...) = %s (in symtabs)",
2539 host_address_to_string (result.
symbol));
2547 ? host_address_to_string (result.
symbol)
2549 result.
symbol != NULL ?
" (via quick fns)"
2576 if (result.
symbol != NULL)
2584 if (result.
symbol == NULL)
2591 return result.
symbol !=
nullptr;
2595 if (result.
symbol != NULL)
2633 if (
block !=
nullptr)
2665 return (symbol_domain == domain);
2700 return sym->
type ();
2714 const struct symbol *sym;
2718 bv = cust->blockvector ();
2725 return sym->
type ();
2783 return (
struct type *) 0;
2792 gdb::function_view<symbol_found_callback_ftype> callback)
2803 if (!callback (&block_sym))
2817 gdb::function_view<symbol_found_callback_ftype> callback)
2822 return callback (&block_sym);
2832 CORE_ADDR best_cust_range = 0;
2863 const struct blockvector *bv = cust->blockvector ();
2867 bool in_range_p =
start <= pc && pc <
end;
2871 if (bv->
map () !=
nullptr)
2873 if (bv->
map ()->
find (pc) ==
nullptr)
2880 if (best_cust !=
nullptr
2881 &&
range >= best_cust_range)
2896 = obj_file->find_pc_sect_compunit_symtab (msymbol,
2906 struct symbol *sym = NULL;
2929 best_cust_range =
range;
2933 if (best_cust != NULL)
2941 = objf->find_pc_sect_compunit_symtab (msymbol, pc, section, 1);
3045 CORE_ADDR best_end = 0;
3046 struct symtab *best_symtab = 0;
3120 if (msymbol.
minsym != NULL)
3127 if (mfunsym.
minsym == NULL)
3155 internal_error (_(
"Infinite recursion detected in find_pc_sect_line;"
3156 "please file a bug report"));
3184 l = iter_s->linetable ();
3202 if (item->
pc > pc && (!alt || item->
pc < alt->
pc))
3205 auto pc_compare = [](
const CORE_ADDR & comp_pc,
3208 return comp_pc < lhs.
pc;
3213 item = std::upper_bound (first, last,
pc, pc_compare);
3227 if (prev && prev->
line && (!best || prev->
pc > best->
pc))
3230 best_symtab = iter_s;
3242 while (tmp > first && (tmp - 1)->
pc == tmp->
pc
3243 && (tmp - 1)->line != 0 && !tmp->
is_stmt)
3250 if (best_end <= best->
pc)
3257 if (best && item < last && item->
pc > best->
pc
3258 && (best_end == 0 || best_end > item->
pc))
3259 best_end = item->
pc;
3270 else if (best->
line == 0)
3280 val.
symtab = best_symtab;
3283 if (best_end && (!alt || best_end < alt->
pc))
3341 int *index,
bool *exact_match)
3350 struct symtab *best_symtab;
3354 best_symtab = sym_tab;
3356 if (best_index < 0 || !exact)
3370 if (best_index >= 0)
3371 best = best_linetable->
item[best_index].
line;
3382 for (
symtab *s : cu->filetabs ())
3387 if (FILENAME_CMP (sym_tab->
filename, s->filename) != 0)
3392 l = s->linetable ();
3403 if (best == 0 || l->
item[ind].
line < best)
3420 *index = best_index;
3422 *exact_match = (exact != 0);
3431std::vector<CORE_ADDR>
3436 std::vector<CORE_ADDR> result;
3453 if (*best_item == NULL
3454 || (item->
line < (*best_item)->line && item->
is_stmt))
3503 CORE_ADDR startaddr;
3521 *startptr = found_sal.
pc;
3522 *endptr = found_sal.
pc;
3526 *startptr = found_sal.
pc;
3527 *endptr = found_sal.
end;
3541 int *exact_match,
int start)
3550 int best_index = -1;
3561 for (i = start; i < len; i++)
3569 if (item->
line == lineno)
3576 if (item->
line > lineno && (best == 0 || item->
line < best))
3607 if (funfirstline && sal.
symtab != NULL
3623 if (sal.
pc < func_addr)
3677 CORE_ADDR func_start, func_end;
3695 for (i = 0; i < l->
nitems; i++)
3702 if (item->
line > 0 && func_start <= item->
pc && item->
pc < func_end)
3716static gdb::optional<CORE_ADDR>
3719 CORE_ADDR start_pc, end_pc;
3725 if (prologue_sal.
symtab !=
nullptr
3730 auto it = std::lower_bound
3740 if (it->prologue_end)
3759 CORE_ADDR
pc, saved_pc;
3764 const struct block *b, *function_block;
3765 int force_skip, skip;
3775 if (sal->
symtab !=
nullptr
3799 if (msymbol.
minsym == NULL)
3834 gdb::optional<CORE_ADDR> linetable_pc
3865 if (skip && start_sal.
pc != pc
3890 while (!force_skip && skip--);
3900 if (!force_skip && sym && start_sal.
symtab == NULL)
3916 sal->
end = start_sal.
end;
3921 function_block = NULL;
3930 if (function_block != NULL
3961 const struct block *bl;
3968 if (prologue_sal.
line != 0)
3995 if (prologue_sal.
end >= end_pc)
3998 while (prologue_sal.
end < end_pc)
4043 if (prologue_sal.
end < end_pc)
4046 return prologue_sal.
end;
4049 return prologue_sal.
pc;
4057 CORE_ADDR func_addr;
4086 if (isalpha (*p) || *p ==
'_' || *p ==
'$' || *p ==
'\0')
4090 while (*p ==
' ' || *p ==
'\t')
4095 if (isalpha (*p) || *p ==
'_' || *p ==
'$')
4097 const char *q = p + 1;
4099 while (isalnum (*q) || *q ==
'_' || *q ==
'$')
4117 else if (p[1] ==
'[')
4120 error (_(
"mismatched quoting on brackets, "
4121 "try 'operator\\[\\]'"));
4122 else if (p[2] ==
'\\' && p[3] ==
']')
4128 error (_(
"nothing is allowed between '[' and ']'"));
4154 if (p[0] ==
'-' && p[1] ==
'>')
4162 else if (p[2] ==
'\\')
4173 if (p[1] ==
'=' || p[1] == p[0])
4184 error (_(
"`operator ()' must be specified "
4185 "without whitespace in `()'"));
4190 error (_(
"`operator ?:' must be specified "
4191 "without whitespace in `?:'"));
4196 error (_(
"`operator []' must be specified "
4197 "without whitespace in `[]'"));
4201 error (_(
"`operator %s' not supported"), p);
4214 : m_match_type (match_type),
4222 int cflags = REG_NOSUB;
4223#ifdef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
4224 cflags |= REG_ICASE;
4238 const char *to_match;
4239 std::string dirname;
4245 to_match = dirname.c_str ();
4248 to_match = lbasename (fullname);
4251 to_match = fullname;
4254 gdb_assert_not_reached (
"bad m_match_type");
4257 if (
m_c_regexp->exec (to_match, 0, NULL, 0) != 0)
4295 void output (
const char *disp_name,
const char *fullname,
bool expanded_p);
4303 output (filename, fullname,
false);
4333 const char *fullname,
4364 if (fullname !=
nullptr)
4368 (expanded_p ?
"true" :
"false"));
4372 if (fullname ==
nullptr)
4373 fullname = disp_name;
4399 N_(
"Show only the files having a dirname matching REGEXP."),
4405 N_(
"Show only the files having a basename matching REGEXP."),
4424 const char *text,
const char *word)
4436 bool group_by_objfile,
4442 gdb::optional<ui_out_emit_tuple> output_tuple;
4443 gdb::optional<ui_out_emit_list> sources_list;
4445 gdb_assert (group_by_objfile || uiout->
is_mi_like_p ());
4449 if (group_by_objfile)
4451 output_tuple.emplace (uiout,
nullptr);
4454 uiout->
text (
":\n");
4458 const char *debug_info_state;
4461 if (debug_fully_readin)
4462 debug_info_state =
"fully-read";
4464 debug_info_state =
"partially-read";
4467 debug_info_state =
"none";
4468 current_uiout->field_string (
"debug-info", debug_info_state);
4472 if (!debug_fully_readin)
4473 uiout->
text (
"(Full debug information has not yet been read "
4474 "for this file.)\n");
4476 uiout->
text (
"(Objfile has no debug information.)\n");
4479 sources_list.emplace (uiout,
"sources");
4484 for (
symtab *s : cu->filetabs ())
4488 data.output (file, fullname,
true);
4492 if (group_by_objfile)
4495 if (data.printed_filename_p ())
4496 uiout->
text (
"\n\n");
4497 data.reset_output ();
4498 sources_list.reset ();
4499 output_tuple.reset ();
4503 if (!group_by_objfile)
4505 data.reset_output ();
4516 error (_(
"No symbol table is loaded. Use the \"file\" command."));
4524 error (_(
"You cannot give both -basename and -dirname to 'info sources'."));
4526 const char *regex =
nullptr;
4527 if (args != NULL && *args !=
'\000')
4531 error (_(
"Missing REGEXP for 'info sources'."));
4552 if (filenames.empty ())
4555 for (
const char *
name : filenames)
4590 const struct symbol *sym)
4592 struct type *sym_type;
4593 std::string printed_sym_type_name;
4598 sym_type = sym->
type ();
4599 if (sym_type == NULL)
4609 printed_sym_type_name.c_str ());
4611 if (printed_sym_type_name.empty ())
4614 return treg.exec (printed_sym_type_name.c_str (), 0, NULL, 0) == 0;
4623 switch (msymbol->
type ())
4644 (
objfile *
objfile,
const gdb::optional<compiled_regex> &preg)
const
4647 bool found_msymbol =
false;
4649 auto do_file_match = [&] (
const char *filename,
bool basenames)
4653 gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher =
nullptr;
4655 file_matcher = do_file_match;
4660 [&] (
const char *symname)
4662 return (!preg.has_value ()
4663 || preg->exec (symname, 0, NULL, 0) == 0);
4691 if (msymbol->created_by_gdb)
4696 if (!preg.has_value ()
4697 || preg->exec (msymbol->natural_name (), 0,
4707 (msymbol->value_address (
objfile)) == NULL)
4709 (
objfile, msymbol->linkage_name (),
4712 found_msymbol =
true;
4718 return found_msymbol;
4726 const gdb::optional<compiled_regex> &preg,
4727 const gdb::optional<compiled_regex> &treg,
4728 std::set<symbol_search> *result_set)
const
4735 const struct blockvector *bv = cust->blockvector ();
4758 && ((!preg.has_value ()
4772 && (!treg.has_value ()
4776 && (!treg.has_value ()
4784 && sym->
line () != 0))))
4790 if (result_set->find (ss) == result_set->end ())
4791 result_set->insert (ss);
4808 std::vector<symbol_search> *results)
const
4816 if (msymbol->created_by_gdb)
4821 if (!preg.has_value ()
4822 || preg->exec (msymbol->natural_name (), 0,
4829 (msymbol->value_address (
objfile)) == NULL))
4832 (
objfile, msymbol->linkage_name (),
4851std::vector<symbol_search>
4854 gdb::optional<compiled_regex> preg;
4855 gdb::optional<compiled_regex> treg;
4862 std::string symbol_name_regexp_holder;
4869 const char *opname =
operator_chars (symbol_name_regexp, &opend);
4876 if (isalpha (*opname) || *opname ==
'_' || *opname ==
'$')
4879 if (opname[-1] !=
' ' || opname[-2] ==
' ')
4885 if (opname[-1] ==
' ')
4891 symbol_name_regexp_holder
4892 = string_printf (
"operator%.*s%s", fix,
" ", opname);
4893 symbol_name_regexp = symbol_name_regexp_holder.c_str ();
4899 preg.emplace (symbol_name_regexp, cflags,
4900 _(
"Invalid regexp"));
4908 _(
"Invalid regexp"));
4911 bool found_msymbol =
false;
4912 std::set<symbol_search> result_set;
4929 std::vector<symbol_search> result (result_set.begin (), result_set.end ());
4937 && !treg.has_value ())
4975 if (sym->
type ()->
code () == TYPE_CODE_TYPEDEF)
4979 str += tmp_stream.
string ();
4993 str += tmp_stream.
string ();
5015 int block,
const char *last)
5024 if (filename_cmp (last, s_filename) != 0)
5031 if (sym->
line () != 0)
5052 & (CORE_ADDR) 0xffffffff,
5075 const char *t_regexp,
int from_tty)
5077 static const char *
const classnames[] =
5078 {
"variable",
"function",
"type",
"module"};
5079 const char *last_filename =
"";
5084 if (regexp !=
nullptr && *regexp ==
'\0')
5090 std::vector<symbol_search> symbols = spec.
search ();
5096 if (t_regexp != NULL)
5098 (_(
"All %ss matching regular expression \"%s\""
5099 " with type matching regular expression \"%s\":\n"),
5100 classnames[kind], regexp, t_regexp);
5102 gdb_printf (_(
"All %ss matching regular expression \"%s\":\n"),
5103 classnames[kind], regexp);
5107 if (t_regexp != NULL)
5109 (_(
"All defined %ss"
5110 " with type matching regular expression \"%s\" :\n"),
5111 classnames[kind], t_regexp);
5113 gdb_printf (_(
"All defined %ss:\n"), classnames[kind]);
5121 if (p.msymbol.minsym != NULL)
5126 gdb_printf (_(
"\nNon-debugging symbols:\n"));
5194 const char *text,
const char * )
5215 if (args !=
nullptr && *args ==
'\0')
5220 opts.type_regexp.empty () ?
nullptr : opts.type_regexp.c_str (),
5234 if (args !=
nullptr && *args ==
'\0')
5239 opts.type_regexp.empty () ?
nullptr : opts.type_regexp.c_str (),
5279 if (args !=
nullptr && *args ==
'\0')
5289 const char *text,
const char * )
5311 if (args !=
nullptr && *args ==
'\0')
5321 const char *file_name =
nullptr;
5323 if (regexp !=
nullptr)
5325 const char *colon = strchr (regexp,
':');
5328 if (HAS_DRIVE_SPEC (regexp)
5329 && (regexp[2] ==
'/' || regexp[2] ==
'\\'))
5330 colon = strchr (STRIP_DRIVE_SPEC (regexp),
':');
5332 if (colon && *(colon + 1) !=
':')
5337 colon_index = colon - regexp;
5338 local_name = (
char *) alloca (colon_index + 1);
5339 memcpy (local_name, regexp, colon_index);
5340 local_name[colon_index--] = 0;
5341 while (isspace (local_name[colon_index]))
5342 local_name[colon_index--] = 0;
5343 file_name = local_name;
5344 regexp = skip_spaces (colon + 1);
5349 if (file_name !=
nullptr)
5351 std::vector<symbol_search> symbols = spec.
search ();
5356 if (p.msymbol.minsym == NULL)
5361 string = string_printf (
"%s:'%s'",
fullname,
5362 p.symbol->linkage_name ());
5368 string = string_printf (
"'%s'",
5369 p.msymbol.minsym->linkage_name ());
5372 gdb_printf (
"<function, no debug info> %s;\n",
5373 p.msymbol.minsym->print_name ());
5391 return name_match (symbol_name, lookup_name, &match_res);
5399 const char *symname,
5401 const char *text,
const char *word)
5414 gdb_assert (symname != NULL);
5420 gdb::unique_xmalloc_ptr<char> completion
5442 const char *text,
const char *word)
5446 lookup_name, text, word))
5464 gdb::unique_xmalloc_ptr<char> str
5477 const char *text,
const char *word)
5481 lookup_name, text, word);
5492 const char *text,
const char *word)
5494 static char *tmp = NULL;
5495 static unsigned int tmplen = 0;
5497 const char *method, *category, *
selector;
5503 if ((method[0] !=
'-') && (method[0] !=
'+'))
5513 while ((strlen (method) + 1) >= tmplen)
5519 tmp = (
char *)
xrealloc (tmp, tmplen);
5525 category = strchr (method,
'(');
5527 if ((category != NULL) && (
selector != NULL))
5529 memcpy (tmp, method, (category - method));
5530 tmp[category - method] =
' ';
5533 lookup_name, text, word);
5536 lookup_name, text, word);
5543 tmp2 = strchr (tmp,
']');
5548 lookup_name, text, word);
5558 for (; p > text; --p)
5560 if (isalnum (p[-1]) || p[-1] ==
'_' || p[-1] ==
'\0')
5568 else if (p[-1] ==
'[' && (p[-2] ==
'-' || p[-2] ==
'+'))
5570 else if (p[-1] ==
' ' || p[-1] ==
'(' || p[-1] ==
')')
5580 if (isalnum (t[-1]) || t[-1] ==
'_' ||
5581 t[-1] ==
' ' || t[-1] ==
':' ||
5582 t[-1] ==
'(' || t[-1] ==
')')
5587 if (t[-1] ==
'[' && (t[-2] ==
'-' || t[-2] ==
'+'))
5602 const char *text,
const char *word)
5610 if (c == TYPE_CODE_UNION || c == TYPE_CODE_STRUCT)
5615 lookup_name, text, word);
5626 case TYPE_CODE_FUNC:
5627 case TYPE_CODE_METHOD:
5639 switch (msymbol->
type ())
5672 CORE_ADDR msym_addr = minsym->value_address (objfile);
5673 if (minsym->type () == mst_data_gnu_ifunc)
5675 struct gdbarch *gdbarch = objfile->arch ();
5676 msym_addr = gdbarch_convert_from_func_ptr_addr
5677 (gdbarch, msym_addr, current_inferior ()->top_target ());
5679 if (msym_addr == address)
5700 const char *text,
const char *word,
5734 const char *text,
const char *word,
5742 const struct block *b;
5743 const struct block *surrounding_static_block, *surrounding_global_block;
5746 const char *sym_text;
5755 const char *quote_pos = NULL;
5759 for (p = text; *p !=
'\0'; ++p)
5761 if (quote_found !=
'\0')
5763 if (*p == quote_found)
5766 else if (*p ==
'\\' && p[1] == quote_found)
5771 else if (*p ==
'\'' || *p ==
'"')
5777 if (quote_found ==
'\'')
5779 sym_text = quote_pos + 1;
5780 else if (quote_found ==
'"')
5792 if (isalnum (p[-1]) || p[-1] ==
'_' || p[-1] ==
'\0'
5793 || p[-1] ==
':' || strchr (break_on, p[-1]) != NULL)
5834 sym_text, word,
code);
5845 tracker, mode, lookup_name,
5846 sym_text, word,
code);
5860 if (surrounding_static_block != NULL)
5861 while (b != surrounding_static_block)
5892 if (surrounding_static_block != NULL)
5897 if (surrounding_global_block != NULL)
5908 gdb::unique_xmalloc_ptr<struct macro_scope> scope;
5911 auto add_macro_name = [&] (
const char *macro_name,
5917 lookup_name, sym_text, word);
5944 const char *text,
const char *word)
5957 const char *text,
const char *word,
5963 gdb_assert (
code == TYPE_CODE_UNION
5964 ||
code == TYPE_CODE_STRUCT
5965 ||
code == TYPE_CODE_ENUM);
5978 const char *text,
const char *word,
5979 const char *srcfile)
5982 const char *sym_text;
5992 const char *quote_pos = NULL;
5996 for (p = text; *p !=
'\0'; ++p)
5998 if (quote_found !=
'\0')
6000 if (*p == quote_found)
6003 else if (*p ==
'\\' && p[1] == quote_found)
6008 else if (*p ==
'\'' || *p ==
'"')
6014 if (quote_found ==
'\'')
6016 sym_text = quote_pos + 1;
6017 else if (quote_found ==
'"')
6037 tracker, mode, lookup_name,
6057 static const char *illegal_aliens[] = {
6063 for (i = 0; illegal_aliens[i]; i++)
6065 if (filename_cmp (fname, illegal_aliens[i]) == 0)
6081 void operator() (
const char *filename,
const char *fullname);
6088 const char *fullname)
6101 const char *base_name = lbasename (filename);
6103 if (base_name != filename
6117 size_t text_len = strlen (text);
6119 const char *base_name;
6131 for (
symtab *s : cu->filetabs ())
6135 if (!filenames_seen.
seen (s->filename)
6148 base_name = lbasename (s->filename);
6149 if (base_name != s->filename
6150 && !filenames_seen.
seen (base_name)
6198 if (info->name_of_main != NULL)
6200 xfree (info->name_of_main);
6201 info->name_of_main = NULL;
6206 info->name_of_main = xstrdup (
name);
6207 info->language_of_main = lang;
6217 const char *new_main_name;
6252 if (new_main_name != NULL)
6259 if (new_main_name != NULL)
6266 if (new_main_name != NULL)
6273 if (new_main_name != NULL)
6283 bool symbol_found_p =
false;
6286 [&symbol_found_p] (
objfile *obj)
6313 if (info->name_of_main == NULL)
6316 return info->name_of_main;
6327 if (info->name_of_main == NULL)
6330 return info->language_of_main;
6348 static const char *
const arm_idents[] = {
6349 "ARM C Compiler, ADS",
6350 "Thumb C Compiler, ADS",
6351 "ARM C++ Compiler, ADS",
6352 "Thumb C++ Compiler, ADS",
6353 "ARM/Thumb C/C++ Compiler, RVCT",
6354 "ARM C/C++ Compiler, RVCT"
6357 if (producer == NULL)
6360 for (
const char *ident : arm_idents)
6361 if (startswith (producer, ident))
6375#define MAX_SYMBOL_IMPLS (LOC_FINAL_VALUE + 10)
6409 gdb_assert (ops != NULL);
6435 gdb_assert (ops != NULL);
6480 return owner.symtab->compunit ()->objfile ();
6490 return owner.symtab->compunit ()->objfile ()->arch ();
6499 return owner.symtab;
6528 if (minsym.
minsym !=
nullptr)
6551 if (found.
minsym !=
nullptr)
6567std::vector<module_symbol_search>
6571 std::vector<module_symbol_search> results;
6576 std::vector<symbol_search> modules = spec1.
search ();
6584 std::vector<symbol_search> symbols = spec2.
search ();
6593 gdb_assert (p.symbol !=
nullptr);
6595 std::string
prefix = p.symbol->print_name ();
6600 if (q.symbol ==
nullptr)
6603 if (strncmp (q.symbol->print_name (),
prefix.c_str (),
6607 results.push_back ({p, q});
6619 const char *regexp,
const char *type_regexp,
6626 if (module_regexp ==
nullptr)
6628 if (type_regexp ==
nullptr)
6630 if (regexp ==
nullptr)
6632 ? _(
"All variables in all modules:")
6633 : _(
"All functions in all modules:")));
6637 ? _(
"All variables matching regular expression"
6638 " \"%s\" in all modules:")
6639 : _(
"All functions matching regular expression"
6640 " \"%s\" in all modules:")),
6645 if (regexp ==
nullptr)
6648 ? _(
"All variables with type matching regular "
6649 "expression \"%s\" in all modules:")
6650 : _(
"All functions with type matching regular "
6651 "expression \"%s\" in all modules:")),
6656 ? _(
"All variables matching regular expression "
6657 "\"%s\",\n\twith type matching regular "
6658 "expression \"%s\" in all modules:")
6659 : _(
"All functions matching regular expression "
6660 "\"%s\",\n\twith type matching regular "
6661 "expression \"%s\" in all modules:")),
6662 regexp, type_regexp);
6667 if (type_regexp ==
nullptr)
6669 if (regexp ==
nullptr)
6672 ? _(
"All variables in all modules matching regular "
6673 "expression \"%s\":")
6674 : _(
"All functions in all modules matching regular "
6675 "expression \"%s\":")),
6680 ? _(
"All variables matching regular expression "
6681 "\"%s\",\n\tin all modules matching regular "
6682 "expression \"%s\":")
6683 : _(
"All functions matching regular expression "
6684 "\"%s\",\n\tin all modules matching regular "
6685 "expression \"%s\":")),
6686 regexp, module_regexp);
6690 if (regexp ==
nullptr)
6693 ? _(
"All variables with type matching regular "
6694 "expression \"%s\"\n\tin all modules matching "
6695 "regular expression \"%s\":")
6696 : _(
"All functions with type matching regular "
6697 "expression \"%s\"\n\tin all modules matching "
6698 "regular expression \"%s\":")),
6699 type_regexp, module_regexp);
6703 ? _(
"All variables matching regular expression "
6704 "\"%s\",\n\twith type matching regular expression "
6705 "\"%s\",\n\tin all modules matching regular "
6706 "expression \"%s\":")
6707 : _(
"All functions matching regular expression "
6708 "\"%s\",\n\twith type matching regular expression "
6709 "\"%s\",\n\tin all modules matching regular "
6710 "expression \"%s\":")),
6711 regexp, type_regexp, module_regexp);
6720 std::vector<module_symbol_search> module_symbols
6723 std::sort (module_symbols.begin (), module_symbols.end (),
6726 if (a.first < b.first)
6728 else if (a.first == b.first)
6729 return a.second < b.second;
6734 const char *last_filename =
"";
6735 const symbol *last_module_symbol =
nullptr;
6741 gdb_assert (q.
symbol !=
nullptr);
6743 if (last_module_symbol != p.
symbol)
6747 last_module_symbol = p.
symbol;
6811 if (args !=
nullptr && *args ==
'\0')
6816 opts.module_regexp.empty () ?
nullptr : opts.module_regexp.c_str (), args,
6817 opts.type_regexp.empty () ?
nullptr : opts.type_regexp.c_str (),
6830 if (args !=
nullptr && *args ==
'\0')
6835 opts.module_regexp.empty () ?
nullptr : opts.module_regexp.c_str (), args,
6836 opts.type_regexp.empty () ?
nullptr : opts.type_regexp.c_str (),
6870All global and static variable names or those matching REGEXPs.\n\
6871Usage: info variables [-q] [-n] [-t TYPEREGEXP] [NAMEREGEXP]\n\
6872Prints the global and static variables.\n"),
6873 _(
"global and static variables"),
6879All function names or those matching REGEXPs.\n\
6880Usage: info functions [-q] [-n] [-t TYPEREGEXP] [NAMEREGEXP]\n\
6881Prints the functions.\n"),
6887All type names, or those matching REGEXP.\n\
6888Usage: info types [-q] [REGEXP]\n\
6889Print information about all types matching REGEXP, or all types if no\n\
6890REGEXP is given. The optional flag -q disables printing of headers."));
6893 const auto info_sources_opts
6896 static std::string info_sources_help
6898All source files in the program or those matching REGEXP.\n\
6899Usage: info sources [OPTION]... [REGEXP]\n\
6900By default, REGEXP is used to match anywhere in the filename.\n\
6910 _(
"All module names, or those matching REGEXP."));
6914Print information about modules."),
6918Display functions arranged by modules.\n\
6919Usage: info module functions [-q] [-m MODREGEXP] [-t TYPEREGEXP] [REGEXP]\n\
6920Print a summary of all functions within each Fortran module, grouped by\n\
6921module and file. For each function the line on which the function is\n\
6922defined is given along with the type signature and name of the function.\n\
6924If REGEXP is provided then only functions whose name matches REGEXP are\n\
6925listed. If MODREGEXP is provided then only functions in modules matching\n\
6926MODREGEXP are listed. If TYPEREGEXP is given then only functions whose\n\
6927type signature matches TYPEREGEXP are listed.\n\
6929The -q flag suppresses printing some header information."),
6935Display variables arranged by modules.\n\
6936Usage: info module variables [-q] [-m MODREGEXP] [-t TYPEREGEXP] [REGEXP]\n\
6937Print a summary of all variables within each Fortran module, grouped by\n\
6938module and file. For each variable the line on which the variable is\n\
6939defined is given along with the type and name of the variable.\n\
6941If REGEXP is provided then only variables whose name matches REGEXP are\n\
6942listed. If MODREGEXP is provided then only variables in modules matching\n\
6943MODREGEXP are listed. If TYPEREGEXP is given then only variables whose\n\
6944type matches TYPEREGEXP are listed.\n\
6946The -q flag suppresses printing some header information."),
6952 _(
"Set a breakpoint for all functions matching REGEXP."));
6957Set how the debugger handles ambiguities in expressions."), _(
"\
6958Show how the debugger handles ambiguities in expressions."), _(
"\
6959Valid values are \"ask\", \"all\", \"cancel\", and the default is \"all\"."),
6964Set whether a source file may have multiple base names."), _(
"\
6965Show whether a source file may have multiple base names."), _(
"\
6966(A \"base name\" is the name of a file with the directory part removed.\n\
6967Example: The base name of \"/home/user/hello.c\" is \"hello.c\".)\n\
6968If set, GDB will canonicalize file names (e.g., expand symlinks)\n\
6969before comparing them. Canonicalization is an expensive operation,\n\
6970but it allows the same file be known by more than one base name.\n\
6971If not set (the default), all source files are assumed to have just\n\
6972one base name, and gdb will do file name comparisons more efficiently."),
6977 _(
"Set debugging of symbol table creation."),
6978 _(
"Show debugging of symbol table creation."), _(
"\
6979When enabled (non-zero), debugging messages are printed when building\n\
6980symbol tables. A value of 1 (one) normally provides enough information.\n\
6981A value greater than 1 provides more verbose information."),
6988Set debugging of symbol lookup."), _(
"\
6989Show debugging of symbol lookup."), _(
"\
6990When enabled (non-zero), symbol lookups are logged."),
6996 _(
"Set the size of the symbol cache."),
6997 _(
"Show the size of the symbol cache."), _(
"\
6998The size of the symbol cache.\n\
6999If zero then the symbol cache is disabled."),
7006 _(
"Set if the PROLOGUE-END flag is ignored."),
7007 _(
"Show if the PROLOGUE-END flag is ignored."),
7009The PROLOGUE-END flag from the line-table entries is used to place \
7010breakpoints past the prologue of functions. Disabeling its use use forces \
7011the use of prologue scanners."),
7018 _(
"Dump the symbol cache for each program space."),
7023 _(
"Print symbol cache statistics for each program space."),
7029 _(
"Flush the symbol cache for each program space."),
7031 c =
add_alias_cmd (
"flush-symbol-cache", maintenance_flush_symbol_cache_cmd,
char * ada_main_name(void)
const char * ada_decode_symbol(const struct general_symbol_info *arg)
void * xcalloc(size_t number, size_t size)
void * xrealloc(void *ptr, size_t size)
struct gdbarch * target_gdbarch(void)
CORE_ADDR gdbarch_skip_prologue_noexcept(gdbarch *gdbarch, CORE_ADDR pc) noexcept
bool best_symbol(struct symbol *a, const domain_enum domain)
struct symbol * better_symbol(struct symbol *a, struct symbol *b, const domain_enum domain)
struct symbol * block_lookup_symbol_primary(const struct block *block, const char *name, const domain_enum domain)
const struct block * block_global_block(const struct block *block)
struct objfile * block_objfile(const struct block *block)
int block_inlined_p(const struct block *bl)
struct symbol * block_find_symbol(const struct block *block, const char *name, const domain_enum domain, block_symbol_matcher_ftype *matcher, void *data)
struct gdbarch * block_gdbarch(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)
const struct block * block_for_pc(CORE_ADDR pc)
const struct block * block_for_pc_sect(CORE_ADDR pc, struct obj_section *section)
const struct block * block_static_block(const struct block *block)
const char * block_scope(const struct block *block)
int block_find_non_opaque_type(struct symbol *sym, void *data)
#define ALL_BLOCK_SYMBOLS(block, iter, sym)
#define ALL_BLOCK_SYMBOLS_WITH_NAME(block, name, iter, sym)
struct symbol * find_pc_function(CORE_ADDR pc)
bool find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr, const struct block **block)
struct symbol * find_pc_sect_containing_function(CORE_ADDR pc, struct obj_section *section)
struct symbol * find_pc_sect_function(CORE_ADDR pc, struct obj_section *section)
void break_command(const char *arg, int from_tty)
ui_file_style style() const
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)
completion_match_result & reset_completion_match_result()
void remove_completion(const char *name)
const char * set_malloc_ptr(gdb::unique_xmalloc_ptr< char > &&str)
bool seen(const char *file)
const char * m_symbol_name_regexp
std::vector< symbol_search > search() const
void set_exclude_minsyms(bool exclude_minsyms)
const char * m_symbol_type_regexp
static bool is_suitable_msymbol(const enum search_domain kind, const minimal_symbol *msymbol)
enum search_domain m_kind
void set_symbol_type_regexp(const char *regexp)
bool add_matching_msymbols(objfile *objfile, const gdb::optional< compiled_regex > &preg, std::vector< symbol_search > *results) const
bool add_matching_symbols(objfile *objfile, const gdb::optional< compiled_regex > &preg, const gdb::optional< compiled_regex > &treg, std::set< symbol_search > *result_set) const
bool expand_symtabs(objfile *objfile, const gdb::optional< compiled_regex > &preg) const
std::vector< const char * > filenames
size_t m_max_search_results
static const lookup_name_info & match_any()
const std::string & string()
void field_string(const char *fldname, const char *string, const ui_file_style &style=ui_file_style())
void text(const char *string)
bool is_mi_like_p() const
void void void wrap_hint(int indent)
struct cmd_list_element * showlist
struct cmd_list_element * infolist
struct cmd_list_element * maintenanceprintlist
struct cmd_list_element * setlist
struct cmd_list_element * showdebuglist
struct cmd_list_element * maintenanceflushlist
struct cmd_list_element * maintenancelist
struct cmd_list_element * setdebuglist
struct cmd_list_element * maintenance_show_cmdlist
struct cmd_list_element * maintenance_set_cmdlist
struct cmd_list_element * add_alias_cmd(const char *name, cmd_list_element *target, enum command_class theclass, int abbrev_flag, struct cmd_list_element **list)
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **list)
void set_cmd_completer_handle_brkchars(struct cmd_list_element *cmd, completer_handle_brkchars_ftype *func)
struct cmd_list_element * add_com(const char *name, enum command_class theclass, cmd_simple_func_ftype *fun, const char *doc)
set_show_commands 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_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
struct cmd_list_element * deprecate_cmd(struct cmd_list_element *cmd, const char *replacement)
set_show_commands add_setshow_boolean_cmd(const char *name, enum command_class theclass, bool *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
struct cmd_list_element * add_basic_prefix_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **subcommands, int allow_unknown, struct cmd_list_element **list)
struct cmd_list_element * add_info(const char *name, cmd_simple_func_ftype *fun, const char *doc)
set_show_commands 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_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
cli_style_option address_style
cli_style_option function_name_style
cli_style_option file_name_style
const char * info_print_args_help(const char *prefix, const char *entity_kind, bool document_n_flag)
gdb::unique_xmalloc_ptr< char > make_completion_match_str(const char *match_name, const char *text, const char *word)
const char * advance_to_expression_complete_word_point(completion_tracker &tracker, const char *text)
void symbol_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
std::vector< gdb::unique_xmalloc_ptr< char > > completion_list
int is_operator_name(const char *name)
enum dtor_kinds is_destructor_name(const char *name)
enum ctor_kinds is_constructor_name(const char *name)
struct block_symbol cp_lookup_symbol_imports_or_template(const char *scope, const char *name, const struct block *block, const domain_enum domain)
gdb::unique_xmalloc_ptr< char > gdb_demangle(const char *name, int options)
gdb::unique_xmalloc_ptr< char > cp_canonicalize_string_no_typedefs(const char *string)
gdb::unique_xmalloc_ptr< char > cp_canonicalize_string(const char *string)
gdb::unique_xmalloc_ptr< char > cp_remove_params_if_any(const char *demangled_name, bool completion_mode)
const char * d_main_name(void)
gdb::unique_xmalloc_ptr< char > d_demangle(const char *symbol, int options)
const struct block * get_selected_block(CORE_ADDR *addr_in_block)
void gdbarch_iterate_over_objfiles_in_search_order(struct gdbarch *gdbarch, iterate_over_objfiles_in_search_order_cb_ftype cb, struct objfile *current_objfile)
bool gdbarch_skip_main_prologue_p(struct gdbarch *gdbarch)
int gdbarch_addr_bit(struct gdbarch *gdbarch)
CORE_ADDR gdbarch_deprecated_function_start_offset(struct gdbarch *gdbarch)
bool gdbarch_skip_entrypoint_p(struct gdbarch *gdbarch)
CORE_ADDR gdbarch_skip_entrypoint(struct gdbarch *gdbarch, CORE_ADDR ip)
CORE_ADDR gdbarch_skip_main_prologue(struct gdbarch *gdbarch, CORE_ADDR ip)
struct type * check_typedef(struct type *type)
#define TYPE_FN_FIELD_PHYSNAME(thisfn, n)
#define TYPE_NFN_FIELDS(thistype)
#define TYPE_FN_FIELDLIST(thistype, n)
#define TYPE_FN_FIELDLIST1(thistype, n)
#define TYPE_IS_OPAQUE(thistype)
#define TYPE_BASECLASS(thistype, index)
#define TYPE_FN_FIELDLIST_NAME(thistype, n)
#define TYPE_N_BASECLASSES(thistype)
const char * go_main_name(void)
const char * language_str(enum language lang)
const struct language_defn * language_def(enum language lang)
const struct language_defn * current_language
struct symbol * language_lookup_primitive_type_as_symbol(const struct language_defn *la, struct gdbarch *gdbarch, const char *name)
gdb::unique_xmalloc_ptr< struct macro_scope > default_macro_scope(void)
struct macro_table * macro_user_macros
void macro_for_each(struct macro_table *table, gdb::function_view< macro_callback_fn > fn)
void macro_for_each_in_scope(struct macro_source_file *file, int line, gdb::function_view< macro_callback_fn > fn)
bound_minimal_symbol lookup_minimal_symbol_by_pc_section(CORE_ADDR pc_in, struct obj_section *section, lookup_msym_prefer prefer, bound_minimal_symbol *previous)
bound_minimal_symbol lookup_minimal_symbol_linkage(const char *name, struct objfile *objf)
void iterate_over_minimal_symbols(struct objfile *objf, const lookup_name_info &lookup_name, gdb::function_view< bool(struct minimal_symbol *)> callback)
struct bound_minimal_symbol lookup_minimal_symbol_by_pc(CORE_ADDR pc)
struct minimal_symbol * lookup_minimal_symbol_by_pc_name(CORE_ADDR pc, const char *name, struct objfile *objf)
struct bound_minimal_symbol lookup_minimal_symbol_text(const char *name, struct objfile *objf)
bool msymbol_is_function(struct objfile *objfile, minimal_symbol *minsym, CORE_ADDR *func_address_p)
observable< struct objfile * > free_objfile
observable executable_changed
observable< struct objfile * > new_objfile
bool process_options(const char **args, process_options_mode mode, gdb::array_view< const option_def_group > options_group)
@ PROCESS_OPTIONS_UNKNOWN_IS_ERROR
@ PROCESS_OPTIONS_UNKNOWN_IS_OPERAND
std::string build_help(const char *help_tmpl, gdb::array_view< const option_def_group > options_group)
bool complete_options(completion_tracker &tracker, const char **args, process_options_mode mode, gdb::array_view< const option_def_group > options_group)
const char * objfile_debug_name(const struct objfile *objfile)
int objfile_has_symbols(struct objfile *objfile)
int have_partial_symbols(void)
const char * objfile_name(const struct objfile *objfile)
int have_full_symbols(void)
#define ALL_OBJFILE_OSECTIONS(objfile, osect)
const char * pascal_main_name(void)
std::string copy_name(struct stoken token)
#define prefix(a, b, R, do)
void switch_to_program_space_and_thread(program_space *pspace)
struct program_space * current_program_space
std::vector< struct program_space * > program_spaces
static gdbpy_ref field_name(struct type *type, int field)
const char * symtab_to_fullname(struct symtab *s)
const char * symtab_to_filename_for_display(struct symtab *symtab)
void operator()(const char *filename, const char *fullname)
struct filename_seen_cache * filename_seen_cache
virtual void * find(CORE_ADDR addr) const =0
struct symbol_cache_slot symbols[1]
const struct block * block
const block * superblock() const
CORE_ADDR entry_pc() const
symbol * function() const
struct block * block(size_t i)
struct block * global_block()
CORE_ADDR value_address() const
struct minimal_symbol * minsym
completion_match_for_lcd match_for_lcd
symtab * primary_filetab() const
bool locations_valid() const
enum language language() const
call_site * find_call_site(CORE_ADDR pc) const
struct compunit_symtab * next
struct blockvector * blockvector()
void set_call_site_htab(htab_t call_site_htab)
struct objfile * objfile() const
int block_line_section() const
symtab_range filetabs() const
void set_primary_filetab(symtab *primary_filetab)
demangle_for_lookup_info(const lookup_name_info &lookup_name, language lang)
std::string m_demangled_name
const std::string & lookup_name() const
demangled_name_entry(gdb::string_view mangled_name)
gdb::unique_xmalloc_ptr< char > demangled
struct fn_fieldlist * fn_field
const char * name() const
unsigned int is_constructor
union general_symbol_info::@177 m_value
void set_section_index(short idx)
CORE_ADDR value_address() const
void set_demangled_name(const char *name, struct obstack *obstack)
const char * natural_name() const
const char * demangled_name
union general_symbol_info::@178 language_specific
const char * print_name() const
void compute_and_set_names(gdb::string_view linkage_name, bool copy_name, struct objfile_per_bfd_storage *per_bfd, gdb::optional< hashval_t > hash=gdb::optional< hashval_t >())
const char * search_name() const
enum language language() const
const struct block * block
void set_language(enum language language, struct obstack *obstack)
short section_index() const
__extension__ enum language m_language
struct obj_section * obj_section(const struct objfile *objfile) const
const char * linkage_name() const
std::string module_regexp
bool matches(const char *fullname) const
info_sources_filter(match_on match_type, const char *regexp)
gdb::optional< compiled_regex > m_c_regexp
enum language la_language
virtual const char * name_of_this() const
virtual bool sniff_from_mangled_name(const char *mangled, gdb::unique_xmalloc_ptr< char > *demangled) const
symbol_name_matcher_ftype * get_symbol_name_matcher(const lookup_name_info &lookup_name) const
virtual struct block_symbol lookup_symbol_nonlocal(const char *name, const struct block *block, const domain_enum domain) const
virtual struct type * lookup_transparent_type(const char *name) const
virtual 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 type_code code) const
virtual gdb::unique_xmalloc_ptr< char > demangle_symbol(const char *mangled, int options) const
virtual unsigned int search_name_hash(const char *name) const
virtual enum macro_expansion macro_expansion() const
struct linetable_entry item[1]
enum language language_of_main
__extension__ enum minimal_symbol_type m_type
CORE_ADDR value_raw_address() const
minimal_symbol_type type() const
CORE_ADDR endaddr() const
struct bfd_section * the_bfd_section
htab_up demangled_names_hash
enum language language_of_main
auto_obstack storage_obstack
const char * name_of_main
struct compunit_symtab * compunit_symtabs
struct compunit_symtab * lookup_symbol(block_enum kind, const char *name, domain_enum domain)
struct objfile * separate_debug_objfile_backlink
struct program_space * pspace
struct objfile * separate_debug_objfile
void expand_symtabs_with_fullname(const char *fullname)
struct gdbarch * arch() const
struct objfile_per_bfd_storage * per_bfd
bool 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, block_search_flags search_flags, domain_enum domain, enum search_domain kind)
bool map_symtabs_matching_filename(const char *name, const char *real_path, gdb::function_view< bool(symtab *)> callback)
struct obj_section * sections
compunit_symtab_range compunits()
bool has_unexpanded_symtabs()
separate_debug_range separate_debug_objfiles()
enum language lookup_global_symbol_language(const char *name, domain_enum domain, bool *symbol_found_p)
::section_offsets section_offsets
void map_symbol_filenames(gdb::function_view< symbol_filename_ftype > fun, bool need_fullname)
struct compunit_symtab * find_compunit_symtab_by_address(CORE_ADDR address)
struct compunit_symtab * find_pc_sect_compunit_symtab(struct bound_minimal_symbol msymbol, CORE_ADDR pc, struct obj_section *section, int warn_if_readin)
msymbols_range msymbols()
filename_seen_cache m_filename_seen_cache
output_source_filename_data(struct ui_out *uiout, const info_sources_filter &filter)
const info_sources_filter & m_filter
bool printed_filename_p() const
void operator()(const char *filename, const char *fullname)
void output(const char *disp_name, const char *fullname, bool expanded_p)
DISABLE_COPY_AND_ASSIGN(output_source_filename_data)
objfiles_range objfiles()
void(* find_frame_base_location)(struct symbol *framefunc, CORE_ADDR pc, const gdb_byte **start, size_t *length)
enum symbol_cache_slot_state state
struct symbol_cache_slot::@175::@176 not_found
const struct objfile * objfile_context
struct block_symbol found
union symbol_cache_slot::@175 value
struct block_symbol_cache * global_symbols
struct block_symbol_cache * static_symbols
enum symbol_needs_kind(* get_symbol_read_needs)(struct symbol *symbol)
struct value *(* read_variable)(struct symbol *symbol, frame_info_ptr frame)
void(* describe_location)(struct symbol *symbol, CORE_ADDR addr, struct ui_file *stream)
void(* tracepoint_var_ref)(struct symbol *symbol, struct agent_expr *ax, struct axs_value *value)
enum address_class aclass
const struct symbol_computed_ops * ops_computed
const struct symbol_block_ops * ops_block
const struct symbol_register_ops * ops_register
static int compare_search_syms(const symbol_search &sym_a, const symbol_search &sym_b)
const block * value_block() const
address_class aclass() const
struct type * type() const
domain_enum domain() const
bool is_objfile_owned() const
CORE_ADDR value_address() const
struct objfile * objfile() const
unsigned short line() const
void set_symtab(struct symtab *symtab)
struct obj_section * section
struct program_space * pspace
struct minimal_symbol * msymbol
enum language language() const
struct compunit_symtab * compunit() const
struct linetable * linetable() const
struct type * target_type() const
struct field & field(int idx) const
bool is_pointer_or_reference() const
const char * name() const
struct obj_section * find_pc_overlay(CORE_ADDR pc)
CORE_ADDR overlay_unmapped_address(CORE_ADDR pc, struct obj_section *section)
int section_is_mapped(struct obj_section *osect)
CORE_ADDR overlay_mapped_address(CORE_ADDR pc, struct obj_section *section)
struct obj_section * find_pc_mapped_section(CORE_ADDR pc)
bool 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, block_search_flags search_flags, enum search_domain kind)
CORE_ADDR pc_in_unmapped_range(CORE_ADDR pc, struct obj_section *section)
void map_symbol_filenames(gdb::function_view< symbol_filename_ftype > fun, bool need_fullname)
int section_is_overlay(struct obj_section *section)
static const gdb::option::option_def info_sources_option_defs[]
const char * domain_name(domain_enum e)
struct block_symbol lookup_static_symbol(const char *name, const domain_enum domain)
static gdb::option::option_def_group make_info_vars_funcs_options_def_group(info_vars_funcs_options *opts)
struct compunit_symtab * find_pc_sect_compunit_symtab(CORE_ADDR pc, struct obj_section *section)
#define SYMBOL_LOOKUP_FAILED_P(SIB)
static void print_msymbol_info(struct bound_minimal_symbol msymbol)
static void info_types_command(const char *args, int from_tty)
bool find_line_pc(struct symtab *symtab, int line, CORE_ADDR *pc)
int register_symbol_register_impl(enum address_class aclass, const struct symbol_register_ops *ops)
bool symbol_is_function_or_method(symbol *sym)
gdb_static_assert(MAX_SYMBOL_IMPLS<=(1<< SYMBOL_ACLASS_BITS))
void collect_symbol_completion_matches_type(completion_tracker &tracker, const char *text, const char *word, enum type_code code)
struct compunit_symtab * find_pc_compunit_symtab(CORE_ADDR pc)
symbol * find_function_alias_target(bound_minimal_symbol msymbol)
static void symtab_new_objfile_observer(struct objfile *objfile)
static struct symbol_cache * get_symbol_cache(struct program_space *pspace)
const char multiple_symbols_all[]
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)
int register_symbol_block_impl(enum address_class aclass, const struct symbol_block_ops *ops)
struct symtab * lookup_symtab(const char *name)
const char multiple_symbols_ask[]
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)
void fixup_section(struct general_symbol_info *ginfo, CORE_ADDR addr, struct objfile *objfile)
bound_minimal_symbol find_gnu_ifunc(const symbol *sym)
static int check_field(struct type *type, const char *name, struct field_of_this_result *is_a_field_of_this)
struct type * lookup_transparent_type(const char *name)
#define MAX_SYMBOL_CACHE_SIZE
static void maintenance_print_symbol_cache(const char *args, int from_tty)
int register_symbol_computed_impl(enum address_class aclass, const struct symbol_computed_ops *ops)
static int next_aclass_value
static int eq_symbol_entry(const struct symbol_cache_slot *slot, const struct objfile *objfile_context, const char *name, domain_enum domain)
static void completion_list_add_symbol(completion_tracker &tracker, symbol *sym, 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 unsigned int hash_symbol_entry(const struct objfile *objfile_context, const char *name, domain_enum domain)
static hashval_t hash_demangled_name_entry(const void *data)
static void resize_symbol_cache(struct symbol_cache *cache, unsigned int new_size)
static unsigned int new_symbol_cache_size
static int not_interesting_fname(const char *fname)
bool find_pc_line_pc_range(CORE_ADDR pc, CORE_ADDR *startptr, CORE_ADDR *endptr)
static void create_demangled_names_hash(struct objfile_per_bfd_storage *per_bfd)
bool compare_glob_filenames_for_search(const char *filename, const char *search_name)
struct block_symbol lookup_global_symbol(const char *name, const struct block *block, const domain_enum domain)
static void free_demangled_name_entry(void *data)
static void print_symbol_info(enum search_domain kind, struct symbol *sym, int block, const char *last)
static void info_module_variables_command(const char *args, int from_tty)
void iterate_over_symtabs(const char *name, gdb::function_view< bool(symtab *)> callback)
static void symtab_observer_executable_changed(void)
static void info_types_command_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *)
static gdb::option::option_def_group make_info_types_options_def_group(info_types_options *opts)
static symtab_and_line find_function_start_sal_1(CORE_ADDR func_addr, obj_section *section, bool funfirstline)
static struct block_symbol lookup_symbol_via_quick_fns(struct objfile *objfile, enum block_enum block_index, const char *name, const domain_enum domain)
bool producer_is_realview(const char *producer)
const char multiple_symbols_cancel[]
static void find_main_name(void)
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)
char * gdb_mangle_name(struct type *type, int method_id, int signature_id)
CORE_ADDR skip_prologue_using_sal(struct gdbarch *gdbarch, CORE_ADDR func_addr)
bool iterate_over_symbols_terminated(const struct block *block, const lookup_name_info &name, const domain_enum domain, gdb::function_view< symbol_found_callback_ftype > callback)
bool symbol_matches_search_name(const struct general_symbol_info *gsymbol, const lookup_name_info &name)
struct symtab * find_pc_line_symtab(CORE_ADDR pc)
static void info_functions_command(const char *args, int from_tty)
bool find_line_pc_range(struct symtab_and_line sal, CORE_ADDR *startptr, CORE_ADDR *endptr)
static struct block_symbol lookup_symbol_in_objfile(struct objfile *objfile, enum block_enum block_index, const char *name, const domain_enum domain)
struct block_symbol lookup_global_symbol_from_objfile(struct objfile *main_objfile, enum block_enum block_index, const char *name, const domain_enum domain)
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 *)
void skip_prologue_sal(struct symtab_and_line *sal)
symtab_and_line find_function_start_sal(CORE_ADDR func_addr, obj_section *section, bool funfirstline)
CORE_ADDR get_symbol_address(const struct symbol *sym)
struct symbol * fixup_symbol_section(struct symbol *sym, struct objfile *objfile)
static gdb::option::option_def_group make_info_sources_options_def_group(filename_partial_match_opts *isrc_opts)
static struct main_info * get_main_info(void)
static gdb::option::option_def_group make_info_modules_var_func_options_def_group(info_modules_var_func_options *opts)
struct symtab_and_line find_pc_sect_line(CORE_ADDR pc, struct obj_section *section, int notcurrent)
static void initialize_ordinary_address_classes(void)
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)
static struct type * basic_lookup_transparent_type_1(struct objfile *objfile, enum block_enum block_index, const char *name)
completion_list make_source_files_completion_list(const char *text, const char *word)
static void ATTRIBUTE_NORETURN error_in_psymtab_expansion(enum block_enum block_index, const char *name, struct compunit_symtab *cust)
struct symbol * find_symbol_at_address(CORE_ADDR address)
static void symbol_cache_stats(struct symbol_cache *cache)
struct type * basic_lookup_transparent_type(const char *name)
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)
static void info_modules_command(const char *args, int from_tty)
bool compare_filenames_for_search(const char *filename, const char *search_name)
static void set_main_name(const char *name, enum language lang)
static void completion_list_add_fields(completion_tracker &tracker, struct symbol *sym, const lookup_name_info &lookup_name, const char *text, const char *word)
static struct type * basic_lookup_transparent_type_quick(struct objfile *objfile, enum block_enum block_index, const char *name)
bool treg_matches_sym_type_name(const compiled_regex &treg, const struct symbol *sym)
struct symtab * find_line_symtab(struct symtab *sym_tab, int line, int *index, bool *exact_match)
static void info_vars_funcs_command_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *)
static void info_variables_command(const char *args, int from_tty)
static unsigned int symbol_cache_size
static gdb::optional< CORE_ADDR > skip_prologue_using_linetable(CORE_ADDR func_addr)
static const gdb::option::option_def info_vars_funcs_options_defs[]
static void info_sources_command(const char *args, int from_tty)
static const char * language_search_unquoted_string(const char *text, const char *p)
std::vector< module_symbol_search > search_module_symbols(const char *module_regexp, const char *regexp, const char *type_regexp, search_domain kind)
const char * multiple_symbols_select_mode(void)
static void info_module_subcommand(bool quiet, const char *module_regexp, const char *regexp, const char *type_regexp, search_domain kind)
bool basenames_may_differ
static void rbreak_command(const char *, int)
static void info_module_functions_command(const char *args, int from_tty)
gdb::unique_xmalloc_ptr< char > symbol_find_demangled_name(struct general_symbol_info *gsymbol, const char *mangled)
bool iterate_over_symbols(const struct block *block, const lookup_name_info &name, const domain_enum domain, gdb::function_view< symbol_found_callback_ftype > callback)
static void symtab_symbol_info(bool quiet, bool exclude_minsyms, const char *regexp, enum search_domain kind, const char *t_regexp, int from_tty)
static void symtab_free_objfile_observer(struct objfile *objfile)
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)
struct block_symbol lookup_symbol_search_name(const char *search_name, const struct block *block, domain_enum domain)
const char * search_domain_name(enum search_domain e)
#define SYMBOL_LOOKUP_FAILED
static bool ignore_prologue_end_flag
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)
void info_sources_worker(struct ui_out *uiout, bool group_by_objfile, const info_sources_filter &filter)
struct symbol * lookup_symbol_in_block(const char *name, symbol_name_match_type match_type, const struct block *block, const domain_enum domain)
static const char *const multiple_symbols_modes[]
struct block_symbol lookup_symbol_in_static_block(const char *name, const struct block *block, const domain_enum domain)
static const gdb::option::option_def info_types_options_defs[]
bool 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 const registry< program_space >::key< symbol_cache > symbol_cache_key
const char * demangle_for_lookup(const char *name, enum language lang, demangle_result_storage &storage)
static void info_sources_command_completer(cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
static int eq_demangled_name_entry(const void *a, const void *b)
static struct block_symbol symbol_cache_lookup(struct symbol_cache *cache, struct objfile *objfile_context, enum block_enum block, const char *name, domain_enum domain, struct block_symbol_cache **bsc_ptr, struct symbol_cache_slot **slot_ptr)
bool matching_obj_sections(struct obj_section *obj_first, struct obj_section *obj_second)
static struct block_symbol lookup_global_or_static_symbol(const char *name, enum block_enum block_index, struct objfile *objfile, const domain_enum domain)
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)
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)
void expand_symtab_containing_pc(CORE_ADDR pc, struct obj_section *section)
static void info_module_var_func_command_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *)
unsigned int symbol_lookup_debug
static void set_symbol_cache_size(unsigned int new_size)
static int find_line_common(struct linetable *, int, int *, int)
static bool file_matches(const char *file, const std::vector< const char * > &filenames, bool basenames)
bool symbol_matches_domain(enum language symbol_language, domain_enum symbol_domain, domain_enum domain)
struct symtab_and_line find_pc_line(CORE_ADDR pc, int notcurrent)
static const char * multiple_symbols_mode
static int compare_symbol_name(const char *symbol_name, language symbol_language, const lookup_name_info &lookup_name, completion_match_result &match_res)
#define DEFAULT_SYMBOL_CACHE_SIZE
struct block_symbol lookup_language_this(const struct language_defn *lang, const struct block *block)
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 maintenance_print_symbol_cache_statistics(const char *args, int from_tty)
static const gdb::option::option_def info_modules_var_func_options_defs[]
static const char * operator_chars(const char *p, const char **end)
std::string symbol_to_info_string(struct symbol *sym, int block, enum search_domain kind)
static void add_filename_to_list(const char *fname, const char *text, const char *word, completion_list *list)
static struct block_symbol lookup_symbol_in_objfile_symtabs(struct objfile *objfile, enum block_enum block_index, const char *name, const domain_enum domain)
static const registry< program_space >::key< main_info > main_progspace_key
static size_t symbol_cache_byte_size(unsigned int size)
static void symbol_cache_dump(const struct symbol_cache *cache)
static void completion_list_add_msymbol(completion_tracker &tracker, minimal_symbol *sym, const lookup_name_info &lookup_name, const char *text, const char *word)
std::vector< CORE_ADDR > find_pcs_for_symtab_line(struct symtab *symtab, int line, struct linetable_entry **best_item)
static struct cmd_list_element * info_module_cmdlist
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)
enum language main_language(void)
static void symbol_cache_flush(struct program_space *pspace)
static void symbol_cache_clear_slot(struct symbol_cache_slot *slot)
void _initialize_symtab()
CORE_ADDR get_msymbol_address(struct objfile *objf, const struct minimal_symbol *minsym)
static CORE_ADDR skip_prologue_using_lineinfo(CORE_ADDR func_addr, struct symtab *symtab)
unsigned int search_name_hash(enum language language, const char *search_name)
static struct block_symbol lookup_symbol_in_objfile_from_linkage_name(struct objfile *objfile, const char *linkage_name, domain_enum domain)
unsigned int symtab_create_debug
static void maintenance_flush_symbol_cache(const char *args, int from_tty)
static void destroy_block_symbol_cache(struct block_symbol_cache *bsc)
#define symbol_lookup_debug_printf_v(fmt,...)
struct compunit_symtab * find_pc_compunit_symtab(CORE_ADDR)
bool() symbol_name_matcher_ftype(const char *symbol_search_name, const lookup_name_info &lookup_name, completion_match_result *comp_match_res)
struct block_symbol lookup_global_symbol(const char *name, const struct block *block, const domain_enum domain)
#define symbol_lookup_debug_printf(fmt,...)
#define SYMBOL_ACLASS_BITS
#define SYMBOL_LOOKUP_SCOPED_DEBUG_ENTER_EXIT
gdb::array_view< const struct symbol_impl > symbol_impls
bool treg_matches_sym_type_name(const compiled_regex &treg, const struct symbol *sym)
std::pair< symbol_search, symbol_search > module_symbol_search
struct symtab_and_line find_pc_sect_line(CORE_ADDR, struct obj_section *, int)
bool basenames_may_differ
gdb::unique_xmalloc_ptr< char > symbol_find_demangled_name(struct general_symbol_info *gsymbol, const char *mangled)
static bool completion_skip_symbol(complete_symbol_mode mode, Symbol *sym)
struct block_symbol lookup_symbol_in_static_block(const char *name, const struct block *block, const domain_enum domain)
const char * demangle_for_lookup(const char *name, enum language lang, demangle_result_storage &storage)
CORE_ADDR get_msymbol_address(struct objfile *objf, const struct minimal_symbol *minsym)
std::string type_to_string(struct type *type)
void type_print(struct type *type, const char *varstring, struct ui_file *stream, int show)
void typedef_print(struct type *type, struct symbol *newobj, struct ui_file *stream)
static styled_string_s * styled_string(const ui_file_style &style, const char *str, styled_string_s &&tmp={})
std::string ldirname(const char *filename)
int gdb_filename_fnmatch(const char *pattern, const char *string, int flags)
void gdb_printf(struct ui_file *stream, const char *format,...)
int count_path_elements(const char *path)
const char * strip_leading_path_elements(const char *path, int n)
void gdb_puts(const char *linebuffer, struct ui_file *stream)
int strcmp_iw(const char *string1, const char *string2)
static unsigned int fast_hash(const void *ptr, size_t len, unsigned int start_value=0)