31#include "gdbsupport/gdb_regex.h"
51#include "gdbsupport/gdb_obstack.h"
69#include "gdbsupport/gdb_optional.h"
73#include "gdbsupport/gdb_string_view.h"
74#include "gdbsupport/pathstuff.h"
75#include "gdbsupport/common-utils.h"
128#define DEFAULT_SYMBOL_CACHE_SIZE 1021
133#define MAX_SYMBOL_CACHE_SIZE (1024*1024)
137#define SYMBOL_LOOKUP_FAILED \
138 ((struct block_symbol) {(struct symbol *) 1, NULL})
139#define SYMBOL_LOOKUP_FAILED_P(SIB) (SIB.symbol == (struct symbol *) 1)
219 for (
unsigned int i = 0; i < bsc->
size; i++)
313 default: gdb_assert_not_reached (
"bad domain_enum");
329 default: gdb_assert_not_reached (
"bad search_domain");
350 unrelocated_addr unrelocated_pc = (unrelocated_addr) (pc - delta);
366 unrelocated_pc = (unrelocated_addr) (new_pc - delta);
367 call_site new_call_site_local (unrelocated_pc,
nullptr,
nullptr);
389 symtab *prev_filetab =
nullptr;
396 if (prev_filetab !=
nullptr)
406 prev_filetab = filetab;
492 size_t search_len = strlen (search_name);
494 if (len < search_len)
498 if (FILENAME_CMP (
filename + len - search_len, search_name) != 0)
514 return (len == search_len
515 || (!IS_ABSOLUTE_PATH (search_name)
516 && IS_DIR_SEPARATOR (
filename[len - search_len - 1]))
528 const char *search_name)
535 if (search_path_elements > file_path_elements)
538 if (IS_ABSOLUTE_PATH (search_name))
540 return (search_path_elements == file_path_elements
542 FNM_FILE_NAME | FNM_NOESCAPE) == 0);
546 const char *file_to_compare
548 file_path_elements - search_path_elements);
551 FNM_FILE_NAME | FNM_NOESCAPE) == 0;
571 const char *real_path,
574 gdb::function_view<
bool (
symtab *)> callback)
577 const char* base_name = lbasename (
name);
579 for (cust = first; cust != NULL && cust != after_last; cust = cust->
next)
582 if (cust->
user !=
nullptr)
597 && FILENAME_CMP (base_name, lbasename (s->filename)) != 0)
609 if (real_path != NULL)
613 gdb_assert (IS_ABSOLUTE_PATH (real_path));
614 gdb_assert (IS_ABSOLUTE_PATH (
name));
615 gdb::unique_xmalloc_ptr<char> fullname_real_path
616 = gdb_realpath (fullname);
617 fullname = fullname_real_path.get ();
618 if (FILENAME_CMP (real_path, fullname) == 0)
640 gdb::function_view<
bool (
symtab *)> callback)
642 gdb::unique_xmalloc_ptr<char> real_path;
646 if (IS_ABSOLUTE_PATH (
name))
648 real_path = gdb_realpath (
name);
649 gdb_assert (IS_ABSOLUTE_PATH (real_path.get ()));
677 struct symtab *result = NULL;
697 int mangled_name_len;
700 struct fn_field *method = &
f[signature_id];
703 const char *newname =
type->
name ();
707 int is_full_physname_constructor;
712 const char *const_prefix = method->
is_const ?
"C" :
"";
713 const char *volatile_prefix = method->
is_volatile ?
"V" :
"";
715 int len = (newname == NULL ? 0 : strlen (newname));
726 || (newname && strcmp (
field_name, newname) == 0);
729 is_destructor = (startswith (
physname,
"__dt"));
731 if (is_destructor || is_full_physname_constructor)
740 xsnprintf (buf,
sizeof (buf),
"__%s%s", const_prefix, volatile_prefix);
746 xsnprintf (buf,
sizeof (buf),
"__%s%s", const_prefix, volatile_prefix);
752 xsnprintf (buf,
sizeof (buf),
"__%s%s%d", const_prefix,
753 volatile_prefix, len);
756 + strlen (buf) + len + strlen (
physname) + 1);
758 mangled_name = (
char *)
xmalloc (mangled_name_len);
760 mangled_name[0] =
'\0';
764 strcat (mangled_name, buf);
769 strcat (mangled_name, newname);
772 return (mangled_name);
779 struct obstack *obstack)
804 struct obstack *obstack)
847 return gdb::string_view_hash () (e->
mangled);
869 e->~demangled_name_entry();
901gdb::unique_xmalloc_ptr<char>
946 gdb::optional<hashval_t> hash)
969 if (!hash.has_value ())
973 &entry, *hash, INSERT));
994 gdb::string_view linkage_name_copy;
997 char *alloc_name = (
char *) alloca (
linkage_name.length () + 1);
1001 linkage_name_copy = gdb::string_view (alloc_name,
1037 char *mangled_ptr =
reinterpret_cast<char *
> (*slot + 1);
1041 (gdb::string_view (mangled_ptr,
linkage_name.length ()));
1049 m_name = (*slot)->mangled.data ();
1082 const char *dem_name = NULL;
1149 if (first == second)
1153 if (first == NULL || second == NULL)
1157 if (first->owner == NULL || second->owner == NULL)
1161 if (first->owner == second->owner)
1168 if (bfd_section_size (first) != bfd_section_size (second))
1172 if (bfd_section_vma (first) - bfd_get_start_address (first->owner)
1173 != bfd_section_vma (second) - bfd_get_start_address (second->owner))
1176 if (bfd_section_name (first) == NULL
1177 || bfd_section_name (second) == NULL
1178 || strcmp (bfd_section_name (first), bfd_section_name (second)) != 0)
1190 gdb_assert (obj != NULL);
1208 unsigned int hash = (uintptr_t) objfile_context;
1211 hash += htab_hash_string (
name);
1227 const struct objfile *objfile_context,
1230 const char *slot_name;
1251 if (slot_name == NULL &&
name == NULL)
1255 if (slot_domain != domain)
1258 else if (slot_name != NULL &&
name != NULL)
1272 if (strcmp (slot_name,
name) != 0)
1274 if (slot_domain != domain)
1387 error (_(
"Symbol cache size is too large, max is %u."),
1415 bsc = cache->global_symbols;
1417 bsc = cache->static_symbols;
1436 ?
" (not found)" :
"",
name,
1528 for (pass = 0; pass < 2; ++pass)
1534 for (i = 0; i < bsc->
size; ++i)
1559 for (pass = 0; pass < 2; ++pass)
1570 for (i = 0; i < bsc->
size; ++i)
1576 switch (slot->
state)
1581 gdb_printf (
" [%4u] = %s, %s %s (not found)\n", i,
1592 host_address_to_string (context),
1611 gdb_printf (_(
"Symbol cache for pspace %d\n%s:\n"),
1613 pspace->symfile_object_file != NULL
1615 :
"(no object file)");
1650 for (pass = 0; pass < 2; ++pass)
1678 gdb_printf (_(
"Symbol cache statistics for pspace %d\n%s:\n"),
1680 pspace->symfile_object_file != NULL
1682 :
"(no object file)");
1725 gdb_assert (sym !=
nullptr);
1727 gdb_assert (
objfile !=
nullptr);
1803 if ((bfd_section_flags (s->the_bfd_section) & SEC_ALLOC) == 0)
1812 if (s->addr () - offset <= addr && addr < s->endaddr () - offset)
1838 gdb::unique_xmalloc_ptr<char> without_params
1842 if (without_params != NULL)
1905 if (canon !=
nullptr)
1957 block, domain, lang,
1958 is_a_field_of_this);
1970 is_a_field_of_this);
1989 if (lang->name_of_this () == NULL ||
block == NULL)
1993 lang->name (), host_address_to_string (
block),
2006 (
"lookup_language_this (...) = %s (%s, block %s)",
2007 sym->
print_name (), host_address_to_string (sym),
2008 host_address_to_string (
block));
2085 (
"demangled symbol name = \"%s\", block @ %s (objfile %s)",
2089 (
"domain name = \"%s\", language = \"%s\")",
2097 if (is_a_field_of_this != NULL)
2098 memset (is_a_field_of_this, 0,
sizeof (*is_a_field_of_this));
2104 if (result.
symbol != NULL)
2107 (
"found symbol @ %s (using lookup_local_symbol)",
2108 host_address_to_string (result.
symbol));
2134 if (t->
code () != TYPE_CODE_STRUCT
2135 && t->
code () != TYPE_CODE_UNION)
2136 error (_(
"Internal error: `%s' is not an aggregate"),
2151 if (result.
symbol != NULL)
2154 (
"found symbol @ %s (using language lookup_symbol_nonlocal)",
2155 host_address_to_string (result.
symbol));
2164 (
"found symbol @ %s (using lookup_static_symbol)",
2165 result.
symbol != NULL ? host_address_to_string (result.
symbol) :
"NULL");
2179 if (
block ==
nullptr)
2202 if (blocksym.
symbol != NULL)
2231 (
"lookup_symbol_in_block (%s, %s (objfile %s), %s)",
2241 host_address_to_string (sym));
2259 for (
objfile *
objfile : main_objfile->separate_debug_objfiles ())
2264 if (result.
symbol !=
nullptr)
2284 (
"lookup_symbol_in_objfile_symtabs (%s, %s, %s, %s)",
2286 block_index ==
GLOBAL_BLOCK ?
"GLOBAL_BLOCK" :
"STATIC_BLOCK",
2297 bv = cust->blockvector ();
2301 if (result.
symbol == NULL)
2312 if (better != other.
symbol)
2320 if (other.
symbol != NULL)
2323 (
"lookup_symbol_in_objfile_symtabs (...) = %s (block %s)",
2324 host_address_to_string (other.
symbol),
2325 host_address_to_string (other.
block));
2330 (
"lookup_symbol_in_objfile_symtabs (...) = NULL");
2345 const char *linkage_name,
2364 modified_name, domain);
2365 if (result.
symbol == NULL)
2367 modified_name, domain);
2368 if (result.
symbol != NULL)
2378static void ATTRIBUTE_NORETURN
2383Internal: %s symbol `%s' found in %s psymtab but not in symtab.\n\
2384%s may be an inlined function, or may be a template function\n \
2385(if a template, try specifying an instantiation: %s<type>)."),
2406 (
"lookup_symbol_via_quick_fns (%s, %s, %s, %s)",
2408 block_index ==
GLOBAL_BLOCK ?
"GLOBAL_BLOCK" :
"STATIC_BLOCK",
2415 (
"lookup_symbol_via_quick_fns (...) = NULL");
2423 if (result.
symbol == NULL)
2427 (
"lookup_symbol_via_quick_fns (...) = %s (block %s)",
2428 host_address_to_string (result.
symbol),
2429 host_address_to_string (
block));
2439 const struct block *block,
2440 const domain_enum domain) const
2449 if (result.
symbol != NULL)
2468 result.
block = NULL;
2469 if (result.
symbol != NULL)
2483 if (
block ==
nullptr)
2489 if (static_block == NULL)
2498 (
"lookup_symbol_in_static_block (%s, %s (objfile %s), %s)",
2506 static_block, domain);
2509 ? host_address_to_string (sym) :
"NULL");
2529 ?
"GLOBAL_BLOCK" :
"STATIC_BLOCK",
2534 if (result.
symbol != NULL)
2537 (
"lookup_symbol_in_objfile (...) = %s (in symtabs)",
2538 host_address_to_string (result.
symbol));
2546 ? host_address_to_string (result.
symbol)
2548 result.
symbol != NULL ?
" (via quick fns)"
2575 if (result.
symbol != NULL)
2583 if (result.
symbol == NULL)
2590 return result.
symbol !=
nullptr;
2594 if (result.
symbol != NULL)
2633 if (
block !=
nullptr)
2665 return (symbol_domain == domain);
2701 return sym->
type ();
2715 const struct symbol *sym;
2720 bv = cust->blockvector ();
2726 return sym->
type ();
2784 return (
struct type *) 0;
2793 gdb::function_view<symbol_found_callback_ftype> callback)
2797 if (sym->matches (domain))
2801 if (!callback (&block_sym))
2815 gdb::function_view<symbol_found_callback_ftype> callback)
2820 return callback (&block_sym);
2830 CORE_ADDR best_cust_range = 0;
2861 const struct blockvector *bv = cust->blockvector ();
2865 bool in_range_p =
start <= pc && pc <
end;
2869 if (bv->
map () !=
nullptr)
2871 if (bv->
map ()->
find (pc) ==
nullptr)
2878 if (best_cust !=
nullptr
2879 &&
range >= best_cust_range)
2890 = obj_file->find_pc_sect_compunit_symtab (msymbol, pc,
2892 if (result !=
nullptr)
2897 struct symbol *found_sym =
nullptr;
2914 if (found_sym ==
nullptr)
2921 best_cust_range =
range;
2925 if (best_cust != NULL)
2933 = objf->find_pc_sect_compunit_symtab (msymbol, pc, section, 1);
2969 && sym->value_address () == addr)
3035 CORE_ADDR best_end = 0;
3036 struct symtab *best_symtab = 0;
3110 if (msymbol.
minsym != NULL)
3117 if (mfunsym.
minsym == NULL)
3145 internal_error (_(
"Infinite recursion detected in find_pc_sect_line;"
3146 "please file a bug report"));
3175 l = iter_s->linetable ();
3197 auto pc_compare = [] (
const unrelocated_addr &comp_pc,
3205 item = (std::upper_bound
3222 if (prev && prev->
line
3226 best_symtab = iter_s;
3254 if (best && item < last
3256 && (best_end == 0 || best_end > item->
pc (
objfile)))
3268 else if (best->line == 0)
3278 val.
symtab = best_symtab;
3279 val.
line = best->line;
3281 if (best_end && (!alt || best_end < alt->
pc (
objfile)))
3339 int *index,
bool *exact_match)
3348 struct symtab *best_symtab;
3352 best_symtab = sym_tab;
3354 if (best_index < 0 || !exact)
3368 if (best_index >= 0)
3369 best = best_linetable->
item[best_index].
line;
3380 for (
symtab *s : cu->filetabs ())
3385 if (FILENAME_CMP (sym_tab->
filename, s->filename) != 0)
3390 l = s->linetable ();
3401 if (best == 0 || l->
item[ind].
line < best)
3418 *index = best_index;
3420 *exact_match = (exact != 0);
3429std::vector<CORE_ADDR>
3434 std::vector<CORE_ADDR> result;
3452 if (*best_item == NULL
3453 || (item->
line < (*best_item)->line && item->
is_stmt))
3502 CORE_ADDR startaddr;
3520 *startptr = found_sal.
pc;
3521 *endptr = found_sal.
pc;
3525 *startptr = found_sal.
pc;
3526 *endptr = found_sal.
end;
3540 int *exact_match,
int start)
3549 int best_index = -1;
3560 for (i = start; i < len; i++)
3568 if (item->
line == lineno)
3575 if (item->
line > lineno && (best == 0 || item->
line < best))
3606 if (funfirstline && sal.
symtab != NULL
3622 if (sal.
pc < func_addr)
3675 CORE_ADDR func_start, func_end;
3695 for (i = 0; i < l->
nitems; i++)
3703 if (item->
line > 0 && func_start <= item_pc && item_pc < func_end)
3717static gdb::optional<CORE_ADDR>
3720 CORE_ADDR start_pc, end_pc;
3726 if (prologue_sal.
symtab !=
nullptr
3733 unrelocated_addr unrel_start
3735 unrelocated_addr unrel_end
3738 auto it = std::lower_bound
3742 return lte.unrelocated_pc () < pc;
3747 && it->unrelocated_pc () < unrel_end);
3749 if (it->prologue_end)
3768 CORE_ADDR
pc, saved_pc;
3774 int force_skip, skip;
3784 if (sal->
symtab !=
nullptr
3806 if (msymbol.
minsym == NULL)
3841 gdb::optional<CORE_ADDR> linetable_pc
3872 if (skip && start_sal.
pc != pc
3897 while (!force_skip && skip--);
3907 if (!force_skip && sym && start_sal.
symtab == NULL)
3923 sal->
end = start_sal.
end;
3928 function_block = NULL;
3937 if (function_block != NULL
3968 const struct block *bl;
3975 if (prologue_sal.
line != 0)
4006 if (prologue_sal.
end >= end_pc)
4009 while (prologue_sal.
end < end_pc)
4054 if (prologue_sal.
end < end_pc)
4057 return prologue_sal.
end;
4060 return prologue_sal.
pc;
4068 CORE_ADDR func_addr;
4097 if (isalpha (*p) || *p ==
'_' || *p ==
'$' || *p ==
'\0')
4101 while (*p ==
' ' || *p ==
'\t')
4106 if (isalpha (*p) || *p ==
'_' || *p ==
'$')
4108 const char *q = p + 1;
4110 while (isalnum (*q) || *q ==
'_' || *q ==
'$')
4128 else if (p[1] ==
'[')
4131 error (_(
"mismatched quoting on brackets, "
4132 "try 'operator\\[\\]'"));
4133 else if (p[2] ==
'\\' && p[3] ==
']')
4139 error (_(
"nothing is allowed between '[' and ']'"));
4165 if (p[0] ==
'-' && p[1] ==
'>')
4173 else if (p[2] ==
'\\')
4184 if (p[1] ==
'=' || p[1] == p[0])
4195 error (_(
"`operator ()' must be specified "
4196 "without whitespace in `()'"));
4201 error (_(
"`operator ?:' must be specified "
4202 "without whitespace in `?:'"));
4207 error (_(
"`operator []' must be specified "
4208 "without whitespace in `[]'"));
4212 error (_(
"`operator %s' not supported"), p);
4225 : m_match_type (match_type),
4233 int cflags = REG_NOSUB;
4234#ifdef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
4235 cflags |= REG_ICASE;
4249 const char *to_match;
4250 std::string dirname;
4256 to_match = dirname.c_str ();
4259 to_match = lbasename (fullname);
4262 to_match = fullname;
4265 gdb_assert_not_reached (
"bad m_match_type");
4268 if (
m_c_regexp->exec (to_match, 0, NULL, 0) != 0)
4306 void output (
const char *disp_name,
const char *fullname,
bool expanded_p);
4314 output (filename, fullname,
false);
4344 const char *fullname,
4375 if (fullname !=
nullptr)
4379 (expanded_p ?
"true" :
"false"));
4383 if (fullname ==
nullptr)
4384 fullname = disp_name;
4410 N_(
"Show only the files having a dirname matching REGEXP."),
4416 N_(
"Show only the files having a basename matching REGEXP."),
4435 const char *text,
const char *word)
4447 bool group_by_objfile,
4453 gdb::optional<ui_out_emit_tuple> output_tuple;
4454 gdb::optional<ui_out_emit_list> sources_list;
4456 gdb_assert (group_by_objfile || uiout->
is_mi_like_p ());
4460 if (group_by_objfile)
4462 output_tuple.emplace (uiout,
nullptr);
4465 uiout->
text (
":\n");
4469 const char *debug_info_state;
4472 if (debug_fully_readin)
4473 debug_info_state =
"fully-read";
4475 debug_info_state =
"partially-read";
4478 debug_info_state =
"none";
4479 current_uiout->field_string (
"debug-info", debug_info_state);
4483 if (!debug_fully_readin)
4484 uiout->
text (
"(Full debug information has not yet been read "
4485 "for this file.)\n");
4487 uiout->
text (
"(Objfile has no debug information.)\n");
4490 sources_list.emplace (uiout,
"sources");
4495 for (
symtab *s : cu->filetabs ())
4499 data.output (file, fullname,
true);
4503 if (group_by_objfile)
4506 if (data.printed_filename_p ())
4507 uiout->
text (
"\n\n");
4508 data.reset_output ();
4509 sources_list.reset ();
4510 output_tuple.reset ();
4514 if (!group_by_objfile)
4516 data.reset_output ();
4527 error (_(
"No symbol table is loaded. Use the \"file\" command."));
4535 error (_(
"You cannot give both -basename and -dirname to 'info sources'."));
4537 const char *regex =
nullptr;
4538 if (args != NULL && *args !=
'\000')
4542 error (_(
"Missing REGEXP for 'info sources'."));
4560file_matches (
const char *file,
const std::vector<const char *> &filenames,
4563 if (filenames.empty ())
4566 for (
const char *
name : filenames)
4601 const struct symbol *sym)
4603 struct type *sym_type;
4604 std::string printed_sym_type_name;
4609 sym_type = sym->
type ();
4610 if (sym_type == NULL)
4620 printed_sym_type_name.c_str ());
4622 if (printed_sym_type_name.empty ())
4625 return treg.exec (printed_sym_type_name.c_str (), 0, NULL, 0) == 0;
4634 switch (msymbol->
type ())
4655 (
objfile *
objfile,
const gdb::optional<compiled_regex> &preg)
const
4658 bool found_msymbol =
false;
4660 auto do_file_match = [&] (
const char *filename,
bool basenames)
4664 gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher =
nullptr;
4666 file_matcher = do_file_match;
4671 [&] (
const char *symname)
4673 return (!preg.has_value ()
4674 || preg->exec (symname, 0, NULL, 0) == 0);
4702 if (msymbol->created_by_gdb)
4707 if (!preg.has_value ()
4708 || preg->exec (msymbol->natural_name (), 0,
4718 (msymbol->value_address (
objfile)) == NULL)
4720 (
objfile, msymbol->linkage_name (),
4723 found_msymbol =
true;
4729 return found_msymbol;
4737 const gdb::optional<compiled_regex> &preg,
4738 const gdb::optional<compiled_regex> &treg,
4739 std::set<symbol_search> *result_set)
const
4746 const struct blockvector *bv = cust->blockvector ();
4754 struct symtab *real_symtab = sym->symtab ();
4767 && ((!preg.has_value ()
4768 || preg->exec (sym->natural_name (), 0,
4779 && (sym->type ()->code ()
4781 && (!treg.has_value ()
4785 && (!treg.has_value ()
4793 && sym->line () != 0))))
4799 if (result_set->find (ss) == result_set->end ())
4800 result_set->insert (ss);
4817 std::vector<symbol_search> *results)
const
4825 if (msymbol->created_by_gdb)
4830 if (!preg.has_value ()
4831 || preg->exec (msymbol->natural_name (), 0,
4838 (msymbol->value_address (
objfile)) == NULL))
4841 (
objfile, msymbol->linkage_name (),
4860std::vector<symbol_search>
4863 gdb::optional<compiled_regex> preg;
4864 gdb::optional<compiled_regex> treg;
4871 std::string symbol_name_regexp_holder;
4878 const char *opname =
operator_chars (symbol_name_regexp, &opend);
4885 if (isalpha (*opname) || *opname ==
'_' || *opname ==
'$')
4888 if (opname[-1] !=
' ' || opname[-2] ==
' ')
4894 if (opname[-1] ==
' ')
4900 symbol_name_regexp_holder
4901 = string_printf (
"operator%.*s%s", fix,
" ", opname);
4902 symbol_name_regexp = symbol_name_regexp_holder.c_str ();
4908 preg.emplace (symbol_name_regexp, cflags,
4909 _(
"Invalid regexp"));
4917 _(
"Invalid regexp"));
4920 bool found_msymbol =
false;
4921 std::set<symbol_search> result_set;
4938 std::vector<symbol_search> result (result_set.begin (), result_set.end ());
4946 && !treg.has_value ())
4984 if (sym->
type ()->
code () == TYPE_CODE_TYPEDEF)
4988 str += tmp_stream.
string ();
5002 str += tmp_stream.
string ();
5024 int block,
const char *last)
5033 if (filename_cmp (last, s_filename) != 0)
5040 if (sym->
line () != 0)
5061 & (CORE_ADDR) 0xffffffff,
5084 const char *t_regexp,
int from_tty)
5086 static const char *
const classnames[] =
5087 {
"variable",
"function",
"type",
"module"};
5088 const char *last_filename =
"";
5093 if (regexp !=
nullptr && *regexp ==
'\0')
5099 std::vector<symbol_search> symbols = spec.
search ();
5105 if (t_regexp != NULL)
5107 (_(
"All %ss matching regular expression \"%s\""
5108 " with type matching regular expression \"%s\":\n"),
5109 classnames[kind], regexp, t_regexp);
5111 gdb_printf (_(
"All %ss matching regular expression \"%s\":\n"),
5112 classnames[kind], regexp);
5116 if (t_regexp != NULL)
5118 (_(
"All defined %ss"
5119 " with type matching regular expression \"%s\" :\n"),
5120 classnames[kind], t_regexp);
5122 gdb_printf (_(
"All defined %ss:\n"), classnames[kind]);
5130 if (p.msymbol.minsym != NULL)
5135 gdb_printf (_(
"\nNon-debugging symbols:\n"));
5203 const char *text,
const char * )
5224 if (args !=
nullptr && *args ==
'\0')
5229 opts.type_regexp.empty () ?
nullptr : opts.type_regexp.c_str (),
5243 if (args !=
nullptr && *args ==
'\0')
5248 opts.type_regexp.empty () ?
nullptr : opts.type_regexp.c_str (),
5288 if (args !=
nullptr && *args ==
'\0')
5298 const char *text,
const char * )
5320 if (args !=
nullptr && *args ==
'\0')
5338 const char *file_name =
nullptr;
5340 if (regexp !=
nullptr)
5342 const char *colon = strchr (regexp,
':');
5345 if (HAS_DRIVE_SPEC (regexp)
5346 && (regexp[2] ==
'/' || regexp[2] ==
'\\'))
5347 colon = strchr (STRIP_DRIVE_SPEC (regexp),
':');
5349 if (colon && *(colon + 1) !=
':')
5354 colon_index = colon - regexp;
5355 local_name = (
char *) alloca (colon_index + 1);
5356 memcpy (local_name, regexp, colon_index);
5357 local_name[colon_index--] = 0;
5358 while (isspace (local_name[colon_index]))
5359 local_name[colon_index--] = 0;
5360 file_name = local_name;
5361 regexp = skip_spaces (colon + 1);
5366 if (file_name !=
nullptr)
5368 std::vector<symbol_search> symbols = spec.
search ();
5373 if (p.msymbol.minsym == NULL)
5378 string = string_printf (
"%s:'%s'",
fullname,
5379 p.symbol->linkage_name ());
5385 string = string_printf (
"'%s'",
5386 p.msymbol.minsym->linkage_name ());
5389 gdb_printf (
"<function, no debug info> %s;\n",
5390 p.msymbol.minsym->print_name ());
5408 return name_match (symbol_name, lookup_name, &match_res);
5416 const char *symname,
5418 const char *text,
const char *word)
5431 gdb_assert (symname != NULL);
5437 gdb::unique_xmalloc_ptr<char> completion
5459 const char *text,
const char *word)
5463 lookup_name, text, word))
5481 gdb::unique_xmalloc_ptr<char> str
5494 const char *text,
const char *word)
5498 lookup_name, text, word);
5509 const char *text,
const char *word)
5511 static char *tmp = NULL;
5512 static unsigned int tmplen = 0;
5514 const char *method, *category, *
selector;
5520 if ((method[0] !=
'-') && (method[0] !=
'+'))
5530 while ((strlen (method) + 1) >= tmplen)
5536 tmp = (
char *)
xrealloc (tmp, tmplen);
5542 category = strchr (method,
'(');
5544 if ((category != NULL) && (
selector != NULL))
5546 memcpy (tmp, method, (category - method));
5547 tmp[category - method] =
' ';
5550 lookup_name, text, word);
5553 lookup_name, text, word);
5560 tmp2 = strchr (tmp,
']');
5565 lookup_name, text, word);
5575 for (; p > text; --p)
5577 if (isalnum (p[-1]) || p[-1] ==
'_' || p[-1] ==
'\0')
5585 else if (p[-1] ==
'[' && (p[-2] ==
'-' || p[-2] ==
'+'))
5587 else if (p[-1] ==
' ' || p[-1] ==
'(' || p[-1] ==
')')
5597 if (isalnum (t[-1]) || t[-1] ==
'_' ||
5598 t[-1] ==
' ' || t[-1] ==
':' ||
5599 t[-1] ==
'(' || t[-1] ==
')')
5604 if (t[-1] ==
'[' && (t[-2] ==
'-' || t[-2] ==
'+'))
5619 const char *text,
const char *word)
5627 if (c == TYPE_CODE_UNION || c == TYPE_CODE_STRUCT)
5632 lookup_name, text, word);
5643 case TYPE_CODE_FUNC:
5644 case TYPE_CODE_METHOD:
5656 switch (msymbol->
type ())
5689 CORE_ADDR msym_addr = minsym->value_address (objfile);
5690 if (minsym->type () == mst_data_gnu_ifunc)
5692 struct gdbarch *gdbarch = objfile->arch ();
5693 msym_addr = gdbarch_convert_from_func_ptr_addr
5694 (gdbarch, msym_addr, current_inferior ()->top_target ());
5696 if (msym_addr == address)
5717 const char *text,
const char *word,
5737 && sym->type ()->code () ==
code))
5749 const char *text,
const char *word,
5756 const struct block *b;
5757 const struct block *surrounding_static_block, *surrounding_global_block;
5759 const char *sym_text;
5768 const char *quote_pos = NULL;
5772 for (p = text; *p !=
'\0'; ++p)
5774 if (quote_found !=
'\0')
5776 if (*p == quote_found)
5779 else if (*p ==
'\\' && p[1] == quote_found)
5784 else if (*p ==
'\'' || *p ==
'"')
5790 if (quote_found ==
'\'')
5792 sym_text = quote_pos + 1;
5793 else if (quote_found ==
'"')
5805 if (isalnum (p[-1]) || p[-1] ==
'_' || p[-1] ==
'\0'
5806 || p[-1] ==
':' || strchr (break_on, p[-1]) != NULL)
5847 sym_text, word,
code);
5858 tracker, mode, lookup_name,
5859 sym_text, word,
code);
5873 if (surrounding_static_block != NULL)
5874 while (b != surrounding_static_block)
5888 && sym->type ()->code () ==
code)
5905 if (surrounding_static_block != NULL)
5910 if (surrounding_global_block != NULL)
5921 gdb::unique_xmalloc_ptr<struct macro_scope>
scope;
5924 auto add_macro_name = [&] (
const char *macro_name,
5930 lookup_name, sym_text, word);
5957 const char *text,
const char *word)
5970 const char *text,
const char *word,
5976 gdb_assert (
code == TYPE_CODE_UNION
5977 ||
code == TYPE_CODE_STRUCT
5978 ||
code == TYPE_CODE_ENUM);
5991 const char *text,
const char *word,
5992 const char *srcfile)
5995 const char *sym_text;
6005 const char *quote_pos = NULL;
6009 for (p = text; *p !=
'\0'; ++p)
6011 if (quote_found !=
'\0')
6013 if (*p == quote_found)
6016 else if (*p ==
'\\' && p[1] == quote_found)
6021 else if (*p ==
'\'' || *p ==
'"')
6027 if (quote_found ==
'\'')
6029 sym_text = quote_pos + 1;
6030 else if (quote_found ==
'"')
6050 tracker, mode, lookup_name,
6070 static const char *illegal_aliens[] = {
6076 for (i = 0; illegal_aliens[i]; i++)
6078 if (filename_cmp (fname, illegal_aliens[i]) == 0)
6094 void operator() (
const char *filename,
const char *fullname);
6101 const char *fullname)
6114 const char *base_name = lbasename (filename);
6116 if (base_name != filename
6130 size_t text_len = strlen (text);
6132 const char *base_name;
6144 for (
symtab *s : cu->filetabs ())
6148 if (!filenames_seen.
seen (s->filename)
6161 base_name = lbasename (s->filename);
6162 if (base_name != s->filename
6163 && !filenames_seen.
seen (base_name)
6211 if (!info->name_of_main.empty ())
6213 info->name_of_main.clear ();
6218 info->name_of_main =
name;
6219 info->language_of_main = lang;
6229 const char *new_main_name;
6266 if (new_main_name != NULL)
6273 if (new_main_name != NULL)
6280 if (new_main_name != NULL)
6287 if (new_main_name != NULL)
6297 bool symbol_found_p =
false;
6300 [&symbol_found_p, pspace] (
objfile *obj)
6327 if (info->name_of_main.empty ())
6330 return info->name_of_main.c_str ();
6341 if (info->name_of_main.empty ())
6344 return info->language_of_main;
6353 static const char *
const arm_idents[] = {
6354 "ARM C Compiler, ADS",
6355 "Thumb C Compiler, ADS",
6356 "ARM C++ Compiler, ADS",
6357 "Thumb C++ Compiler, ADS",
6358 "ARM/Thumb C/C++ Compiler, RVCT",
6359 "ARM C/C++ Compiler, RVCT"
6362 if (producer == NULL)
6365 for (
const char *ident : arm_idents)
6366 if (startswith (producer, ident))
6380#define MAX_SYMBOL_IMPLS (LOC_FINAL_VALUE + 11)
6414 gdb_assert (ops != NULL);
6440 gdb_assert (ops != NULL);
6486 return owner.symtab->compunit ()->objfile ();
6496 return owner.symtab->compunit ()->objfile ()->arch ();
6505 return owner.symtab;
6528 if (minsym.
minsym !=
nullptr)
6544 if (found.
minsym !=
nullptr)
6558std::vector<module_symbol_search>
6562 std::vector<module_symbol_search> results;
6567 std::vector<symbol_search> modules = spec1.
search ();
6575 std::vector<symbol_search> symbols = spec2.
search ();
6584 gdb_assert (p.symbol !=
nullptr);
6586 std::string
prefix = p.symbol->print_name ();
6591 if (q.symbol ==
nullptr)
6594 if (strncmp (q.symbol->print_name (),
prefix.c_str (),
6598 results.push_back ({p, q});
6610 const char *regexp,
const char *type_regexp,
6617 if (module_regexp ==
nullptr)
6619 if (type_regexp ==
nullptr)
6621 if (regexp ==
nullptr)
6623 ? _(
"All variables in all modules:")
6624 : _(
"All functions in all modules:")));
6628 ? _(
"All variables matching regular expression"
6629 " \"%s\" in all modules:")
6630 : _(
"All functions matching regular expression"
6631 " \"%s\" in all modules:")),
6636 if (regexp ==
nullptr)
6639 ? _(
"All variables with type matching regular "
6640 "expression \"%s\" in all modules:")
6641 : _(
"All functions with type matching regular "
6642 "expression \"%s\" in all modules:")),
6647 ? _(
"All variables matching regular expression "
6648 "\"%s\",\n\twith type matching regular "
6649 "expression \"%s\" in all modules:")
6650 : _(
"All functions matching regular expression "
6651 "\"%s\",\n\twith type matching regular "
6652 "expression \"%s\" in all modules:")),
6653 regexp, type_regexp);
6658 if (type_regexp ==
nullptr)
6660 if (regexp ==
nullptr)
6663 ? _(
"All variables in all modules matching regular "
6664 "expression \"%s\":")
6665 : _(
"All functions in all modules matching regular "
6666 "expression \"%s\":")),
6671 ? _(
"All variables matching regular expression "
6672 "\"%s\",\n\tin all modules matching regular "
6673 "expression \"%s\":")
6674 : _(
"All functions matching regular expression "
6675 "\"%s\",\n\tin all modules matching regular "
6676 "expression \"%s\":")),
6677 regexp, module_regexp);
6681 if (regexp ==
nullptr)
6684 ? _(
"All variables with type matching regular "
6685 "expression \"%s\"\n\tin all modules matching "
6686 "regular expression \"%s\":")
6687 : _(
"All functions with type matching regular "
6688 "expression \"%s\"\n\tin all modules matching "
6689 "regular expression \"%s\":")),
6690 type_regexp, module_regexp);
6694 ? _(
"All variables matching regular expression "
6695 "\"%s\",\n\twith type matching regular expression "
6696 "\"%s\",\n\tin all modules matching regular "
6697 "expression \"%s\":")
6698 : _(
"All functions matching regular expression "
6699 "\"%s\",\n\twith type matching regular expression "
6700 "\"%s\",\n\tin all modules matching regular "
6701 "expression \"%s\":")),
6702 regexp, type_regexp, module_regexp);
6711 std::vector<module_symbol_search> module_symbols
6714 std::sort (module_symbols.begin (), module_symbols.end (),
6717 if (a.first < b.first)
6719 else if (a.first == b.first)
6720 return a.second < b.second;
6725 const char *last_filename =
"";
6726 const symbol *last_module_symbol =
nullptr;
6732 gdb_assert (q.
symbol !=
nullptr);
6734 if (last_module_symbol != p.
symbol)
6738 last_module_symbol = p.
symbol;
6802 if (args !=
nullptr && *args ==
'\0')
6807 opts.module_regexp.empty () ?
nullptr : opts.module_regexp.c_str (), args,
6808 opts.type_regexp.empty () ?
nullptr : opts.type_regexp.c_str (),
6821 if (args !=
nullptr && *args ==
'\0')
6826 opts.module_regexp.empty () ?
nullptr : opts.module_regexp.c_str (), args,
6827 opts.type_regexp.empty () ?
nullptr : opts.type_regexp.c_str (),
6861All global and static variable names or those matching REGEXPs.\n\
6862Usage: info variables [-q] [-n] [-t TYPEREGEXP] [NAMEREGEXP]\n\
6863Prints the global and static variables.\n"),
6864 _(
"global and static variables"),
6870All function names or those matching REGEXPs.\n\
6871Usage: info functions [-q] [-n] [-t TYPEREGEXP] [NAMEREGEXP]\n\
6872Prints the functions.\n"),
6878All type names, or those matching REGEXP.\n\
6879Usage: info types [-q] [REGEXP]\n\
6880Print information about all types matching REGEXP, or all types if no\n\
6881REGEXP is given. The optional flag -q disables printing of headers."));
6884 const auto info_sources_opts
6887 static std::string info_sources_help
6889All source files in the program or those matching REGEXP.\n\
6890Usage: info sources [OPTION]... [REGEXP]\n\
6891By default, REGEXP is used to match anywhere in the filename.\n\
6901 _(
"All module names, or those matching REGEXP."));
6905 _(
"Get main symbol to identify entry point into program."));
6908Print information about modules."),
6912Display functions arranged by modules.\n\
6913Usage: info module functions [-q] [-m MODREGEXP] [-t TYPEREGEXP] [REGEXP]\n\
6914Print a summary of all functions within each Fortran module, grouped by\n\
6915module and file. For each function the line on which the function is\n\
6916defined is given along with the type signature and name of the function.\n\
6918If REGEXP is provided then only functions whose name matches REGEXP are\n\
6919listed. If MODREGEXP is provided then only functions in modules matching\n\
6920MODREGEXP are listed. If TYPEREGEXP is given then only functions whose\n\
6921type signature matches TYPEREGEXP are listed.\n\
6923The -q flag suppresses printing some header information."),
6929Display variables arranged by modules.\n\
6930Usage: info module variables [-q] [-m MODREGEXP] [-t TYPEREGEXP] [REGEXP]\n\
6931Print a summary of all variables within each Fortran module, grouped by\n\
6932module and file. For each variable the line on which the variable is\n\
6933defined is given along with the type and name of the variable.\n\
6935If REGEXP is provided then only variables whose name matches REGEXP are\n\
6936listed. If MODREGEXP is provided then only variables in modules matching\n\
6937MODREGEXP are listed. If TYPEREGEXP is given then only variables whose\n\
6938type matches TYPEREGEXP are listed.\n\
6940The -q flag suppresses printing some header information."),
6946 _(
"Set a breakpoint for all functions matching REGEXP."));
6951Set how the debugger handles ambiguities in expressions."), _(
"\
6952Show how the debugger handles ambiguities in expressions."), _(
"\
6953Valid values are \"ask\", \"all\", \"cancel\", and the default is \"all\"."),
6958Set whether a source file may have multiple base names."), _(
"\
6959Show whether a source file may have multiple base names."), _(
"\
6960(A \"base name\" is the name of a file with the directory part removed.\n\
6961Example: The base name of \"/home/user/hello.c\" is \"hello.c\".)\n\
6962If set, GDB will canonicalize file names (e.g., expand symlinks)\n\
6963before comparing them. Canonicalization is an expensive operation,\n\
6964but it allows the same file be known by more than one base name.\n\
6965If not set (the default), all source files are assumed to have just\n\
6966one base name, and gdb will do file name comparisons more efficiently."),
6971 _(
"Set debugging of symbol table creation."),
6972 _(
"Show debugging of symbol table creation."), _(
"\
6973When enabled (non-zero), debugging messages are printed when building\n\
6974symbol tables. A value of 1 (one) normally provides enough information.\n\
6975A value greater than 1 provides more verbose information."),
6982Set debugging of symbol lookup."), _(
"\
6983Show debugging of symbol lookup."), _(
"\
6984When enabled (non-zero), symbol lookups are logged."),
6990 _(
"Set the size of the symbol cache."),
6991 _(
"Show the size of the symbol cache."), _(
"\
6992The size of the symbol cache.\n\
6993If zero then the symbol cache is disabled."),
7000 _(
"Set if the PROLOGUE-END flag is ignored."),
7001 _(
"Show if the PROLOGUE-END flag is ignored."),
7003The PROLOGUE-END flag from the line-table entries is used to place \
7004breakpoints past the prologue of functions. Disabling its use forces \
7005the use of prologue scanners."),
7012 _(
"Dump the symbol cache for each program space."),
7017 _(
"Print symbol cache statistics for each program space."),
7023 _(
"Flush the symbol cache for each program space."),
7025 c =
add_alias_cmd (
"flush-symbol-cache", maintenance_flush_symbol_cache_cmd,
const char * ada_main_name()
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)
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)
struct symbol * block_find_symbol(const struct block *block, const lookup_name_info &name, const domain_enum domain, struct symbol **stub)
iterator_range< block_iterator_wrapper > block_iterator_range
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)
CORE_ADDR gdbarch_update_call_site_pc(struct gdbarch *gdbarch, CORE_ADDR pc)
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
static const char * range
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< struct objfile * > new_objfile
observable< program_space * > all_objfiles_removed
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)
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
const void * find(CORE_ADDR addr) const
struct symbol_cache_slot symbols[1]
const struct block * block
const block * superblock() const
const struct block * global_block() const
struct gdbarch * gdbarch() const
CORE_ADDR entry_pc() const
const struct block * function_block() const
const struct block * static_block() const
symbol * function() const
struct objfile * objfile() const
const char * scope() 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()
struct compunit_symtab * user
void set_call_site_htab(htab_t call_site_htab)
struct objfile * objfile() 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
void set_section_index(short idx)
void set_demangled_name(const char *name, struct obstack *obstack)
const char * natural_name() const
union general_symbol_info::@183 language_specific
const char * demangled_name
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
union general_symbol_info::@182 m_value
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
CORE_ADDR pc(const struct objfile *objfile) const
unrelocated_addr unrelocated_pc() const
struct linetable_entry item[1]
enum language language_of_main
bool maybe_copied(objfile *objfile) const
CORE_ADDR value_address() const =delete
__extension__ enum minimal_symbol_type m_type
minimal_symbol_type type() const
unrelocated_addr unrelocated_address() 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 obj_section * sections_start
iterator_range< section_iterator > sections()
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 object_format_has_copy_relocs
objfile(gdb_bfd_ref_ptr, const char *, objfile_flags)
bool map_symtabs_matching_filename(const char *name, const char *real_path, gdb::function_view< bool(symtab *)> callback)
CORE_ADDR text_section_offset() const
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)
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()
const block *(* get_block_value)(const struct symbol *sym)
void(* find_frame_base_location)(struct symbol *framefunc, CORE_ADDR pc, const gdb_byte **start, size_t *length)
enum symbol_cache_slot_state state
const struct objfile * objfile_context
union symbol_cache_slot::@180 value
struct symbol_cache_slot::@180::@181 not_found
struct block_symbol found
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
unsigned int line() const
bool matches(domain_enum d) const
CORE_ADDR value_address() const
struct objfile * objfile() 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
const struct linetable * linetable() const
struct type * target_type() const
struct field & field(int idx) const
unsigned int num_fields() 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)
bool pc_in_unmapped_range(CORE_ADDR pc, struct obj_section *section)
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)
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)
void fixup_symbol_section(struct symbol *sym, struct objfile *objfile)
#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)
static main_info * get_main_info(program_space *pspace)
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)
std::vector< CORE_ADDR > find_pcs_for_symtab_line(struct symtab *symtab, int line, const linetable_entry **best_item)
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 int find_line_common(const linetable *, int, int *, int)
static void set_main_name(program_space *pspace, const char *name, language lang)
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 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)
static gdb::option::option_def_group make_info_sources_options_def_group(filename_partial_match_opts *isrc_opts)
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 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 symtab_all_objfiles_removed(program_space *pspace)
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)
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 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)
static void info_main_command(const char *args, int from_tty)
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)
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
bool symbol_name_matcher_ftype(const char *symbol_search_name, const lookup_name_info &lookup_name, completion_match_result *comp_match_res)
#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)