GDB (xrefs)
Loading...
Searching...
No Matches
symfile-debug.c
Go to the documentation of this file.
1/* Debug logging for the symbol file functions for the GNU debugger, GDB.
2
3 Copyright (C) 2013-2023 Free Software Foundation, Inc.
4
5 Contributed by Cygnus Support, using pieces from other GDB modules.
6
7 This file is part of GDB.
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21
22/* Note: Be careful with functions that can throw errors.
23 We want to see a logging message regardless of whether an error was thrown.
24 This typically means printing a message before calling the real function
25 and then if the function returns a result printing a message after it
26 returns. */
27
28#include "defs.h"
29#include "gdbcmd.h"
30#include "objfiles.h"
31#include "observable.h"
32#include "source.h"
33#include "symtab.h"
34#include "symfile.h"
35#include "block.h"
36#include "filenames.h"
37
38/* We need to save a pointer to the real symbol functions.
39 Plus, the debug versions are malloc'd because we have to NULL out the
40 ones that are NULL in the real copy. */
41
43{
44 const struct sym_fns *real_sf = nullptr;
45 struct sym_fns debug_sf {};
46};
47
48/* We need to record a pointer to the real set of functions for each
49 objfile. */
52
53/* If true all calls to the symfile functions are logged. */
54static bool debug_symfile = false;
55
56/* Return non-zero if symfile debug logging is installed. */
57
58static int
60{
61 return (objfile->sf != NULL
63}
64
65/* Utility return the name to print for SYMTAB. */
66
67static const char *
69{
71}
72
73
74/* See objfiles.h. */
75
76bool
78{
79 bool retval = false;
80
81 /* If we have not read psymbols, but we have a function capable of reading
82 them, then that is an indication that they are in fact available. Without
83 this function the symbols may have been already read in but they also may
84 not be present in this objfile. */
85 for (const auto &iter : qf)
86 {
87 if ((flags & OBJF_PSYMTABS_READ) == 0
88 && iter->can_lazily_read_symbols ())
89 retval = true;
90 else
91 retval = iter->has_symbols (this);
92 if (retval)
93 break;
94 }
95
96 if (debug_symfile)
97 gdb_printf (gdb_stdlog, "qf->has_symbols (%s) = %d\n",
98 objfile_debug_name (this), retval);
99
100 return retval;
101}
102
103/* See objfiles.h. */
104bool
106{
107 if (debug_symfile)
108 gdb_printf (gdb_stdlog, "qf->has_unexpanded_symtabs (%s)\n",
109 objfile_debug_name (this));
110
111 bool result = false;
112 for (const auto &iter : qf_require_partial_symbols ())
113 {
114 if (iter->has_unexpanded_symtabs (this))
115 {
116 result = true;
117 break;
118 }
119 }
120
121 if (debug_symfile)
122 gdb_printf (gdb_stdlog, "qf->has_unexpanded_symtabs (%s) = %d\n",
123 objfile_debug_name (this), (result ? 1 : 0));
124
125 return result;
126}
127
128struct symtab *
130{
131 struct symtab *retval = nullptr;
132
133 if (debug_symfile)
134 gdb_printf (gdb_stdlog, "qf->find_last_source_symtab (%s)\n",
135 objfile_debug_name (this));
136
137 for (const auto &iter : qf_require_partial_symbols ())
138 {
139 retval = iter->find_last_source_symtab (this);
140 if (retval != nullptr)
141 break;
142 }
143
144 if (debug_symfile)
145 gdb_printf (gdb_stdlog, "qf->find_last_source_symtab (...) = %s\n",
146 retval ? debug_symtab_name (retval) : "NULL");
147
148 return retval;
149}
150
151void
153{
154 if (debug_symfile)
155 gdb_printf (gdb_stdlog, "qf->forget_cached_source_info (%s)\n",
156 objfile_debug_name (this));
157
158 for (const auto &iter : qf_require_partial_symbols ())
159 iter->forget_cached_source_info (this);
160}
161
162bool
164 (const char *name, const char *real_path,
165 gdb::function_view<bool (symtab *)> callback)
166{
167 if (debug_symfile)
169 "qf->map_symtabs_matching_filename (%s, \"%s\", "
170 "\"%s\", %s)\n",
171 objfile_debug_name (this), name,
172 real_path ? real_path : NULL,
173 host_address_to_string (&callback));
174
175 bool retval = true;
176 const char *name_basename = lbasename (name);
177
178 auto match_one_filename = [&] (const char *filename, bool basenames)
179 {
180 if (compare_filenames_for_search (filename, name))
181 return true;
182 if (basenames && FILENAME_CMP (name_basename, filename) == 0)
183 return true;
184 if (real_path != nullptr && IS_ABSOLUTE_PATH (filename)
185 && IS_ABSOLUTE_PATH (real_path))
186 return filename_cmp (filename, real_path) == 0;
187 return false;
188 };
189
190 compunit_symtab *last_made = this->compunit_symtabs;
191
192 auto on_expansion = [&] (compunit_symtab *symtab)
193 {
194 /* The callback to iterate_over_some_symtabs returns false to keep
195 going and true to continue, so we have to invert the result
196 here, for expand_symtabs_matching. */
197 bool result = !iterate_over_some_symtabs (name, real_path,
198 this->compunit_symtabs,
199 last_made,
200 callback);
201 last_made = this->compunit_symtabs;
202 return result;
203 };
204
205 for (const auto &iter : qf_require_partial_symbols ())
206 {
207 if (!iter->expand_symtabs_matching (this,
208 match_one_filename,
209 nullptr,
210 nullptr,
211 on_expansion,
215 ALL_DOMAIN))
216 {
217 retval = false;
218 break;
219 }
220 }
221
222 if (debug_symfile)
224 "qf->map_symtabs_matching_filename (...) = %d\n",
225 retval);
226
227 /* We must re-invert the return value here to match the caller's
228 expectations. */
229 return !retval;
230}
231
232struct compunit_symtab *
234{
235 struct compunit_symtab *retval = nullptr;
236
237 if (debug_symfile)
239 "qf->lookup_symbol (%s, %d, \"%s\", %s)\n",
240 objfile_debug_name (this), kind, name,
241 domain_name (domain));
242
244
245 auto search_one_symtab = [&] (compunit_symtab *stab)
246 {
247 struct symbol *sym, *with_opaque = NULL;
248 const struct blockvector *bv = stab->blockvector ();
249 const struct block *block = bv->block (kind);
250
251 sym = block_find_symbol (block, name, domain,
253 &with_opaque);
254
255 /* Some caution must be observed with overloaded functions
256 and methods, since the index will not contain any overload
257 information (but NAME might contain it). */
258
259 if (sym != NULL
260 && symbol_matches_search_name (sym, lookup_name))
261 {
262 retval = stab;
263 /* Found it. */
264 return false;
265 }
266 if (with_opaque != NULL
267 && symbol_matches_search_name (with_opaque, lookup_name))
268 retval = stab;
269
270 /* Keep looking through other psymtabs. */
271 return true;
272 };
273
274 for (const auto &iter : qf_require_partial_symbols ())
275 {
276 if (!iter->expand_symtabs_matching (this,
277 nullptr,
278 &lookup_name,
279 nullptr,
280 search_one_symtab,
281 kind == GLOBAL_BLOCK
284 domain,
285 ALL_DOMAIN))
286 break;
287 }
288
289 if (debug_symfile)
290 gdb_printf (gdb_stdlog, "qf->lookup_symbol (...) = %s\n",
291 retval
293 : "NULL");
294
295 return retval;
296}
297
298void
299objfile::print_stats (bool print_bcache)
300{
301 if (debug_symfile)
302 gdb_printf (gdb_stdlog, "qf->print_stats (%s, %d)\n",
303 objfile_debug_name (this), print_bcache);
304
305 for (const auto &iter : qf_require_partial_symbols ())
306 iter->print_stats (this, print_bcache);
307}
308
309void
311{
312 if (debug_symfile)
313 gdb_printf (gdb_stdlog, "qf->dump (%s)\n",
314 objfile_debug_name (this));
315
316 for (const auto &iter : qf)
317 iter->dump (this);
318}
319
320void
322{
323 if (debug_symfile)
325 "qf->expand_symtabs_for_function (%s, \"%s\")\n",
326 objfile_debug_name (this), func_name);
327
328 lookup_name_info base_lookup (func_name, symbol_name_match_type::FULL);
329 lookup_name_info lookup_name = base_lookup.make_ignore_params ();
330
331 for (const auto &iter : qf_require_partial_symbols ())
332 iter->expand_symtabs_matching (this,
333 nullptr,
334 &lookup_name,
335 nullptr,
336 nullptr,
340 ALL_DOMAIN);
341}
342
343void
345{
346 if (debug_symfile)
347 gdb_printf (gdb_stdlog, "qf->expand_all_symtabs (%s)\n",
348 objfile_debug_name (this));
349
350 for (const auto &iter : qf_require_partial_symbols ())
351 iter->expand_all_symtabs (this);
352}
353
354void
356{
357 if (debug_symfile)
359 "qf->expand_symtabs_with_fullname (%s, \"%s\")\n",
360 objfile_debug_name (this), fullname);
361
362 const char *basename = lbasename (fullname);
363 auto file_matcher = [&] (const char *filename, bool basenames)
364 {
365 return filename_cmp (basenames ? basename : fullname, filename) == 0;
366 };
367
368 for (const auto &iter : qf_require_partial_symbols ())
369 iter->expand_symtabs_matching (this,
370 file_matcher,
371 nullptr,
372 nullptr,
373 nullptr,
377 ALL_DOMAIN);
378}
379
380void
382 (const lookup_name_info &name, domain_enum domain,
383 int global,
384 symbol_compare_ftype *ordered_compare)
385{
386 if (debug_symfile)
388 "qf->expand_matching_symbols (%s, %s, %d, %s)\n",
389 objfile_debug_name (this),
390 domain_name (domain), global,
391 host_address_to_string (ordered_compare));
392
393 for (const auto &iter : qf_require_partial_symbols ())
394 iter->expand_matching_symbols (this, name, domain, global,
395 ordered_compare);
396}
397
398bool
400 (gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
401 const lookup_name_info *lookup_name,
402 gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
403 gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
404 block_search_flags search_flags,
405 domain_enum domain,
406 enum search_domain kind)
407{
408 /* This invariant is documented in quick-functions.h. */
409 gdb_assert (lookup_name != nullptr || symbol_matcher == nullptr);
410
411 if (debug_symfile)
413 "qf->expand_symtabs_matching (%s, %s, %s, %s, %s)\n",
414 objfile_debug_name (this),
415 host_address_to_string (&file_matcher),
416 host_address_to_string (&symbol_matcher),
417 host_address_to_string (&expansion_notify),
418 search_domain_name (kind));
419
420 for (const auto &iter : qf_require_partial_symbols ())
421 if (!iter->expand_symtabs_matching (this, file_matcher, lookup_name,
422 symbol_matcher, expansion_notify,
423 search_flags, domain, kind))
424 return false;
425 return true;
426}
427
428struct compunit_symtab *
430 CORE_ADDR pc,
431 struct obj_section *section,
432 int warn_if_readin)
433{
434 struct compunit_symtab *retval = nullptr;
435
436 if (debug_symfile)
438 "qf->find_pc_sect_compunit_symtab (%s, %s, %s, %s, %d)\n",
439 objfile_debug_name (this),
440 host_address_to_string (msymbol.minsym),
441 hex_string (pc),
442 host_address_to_string (section),
443 warn_if_readin);
444
445 for (const auto &iter : qf_require_partial_symbols ())
446 {
447 retval = iter->find_pc_sect_compunit_symtab (this, msymbol, pc, section,
448 warn_if_readin);
449 if (retval != nullptr)
450 break;
451 }
452
453 if (debug_symfile)
455 "qf->find_pc_sect_compunit_symtab (...) = %s\n",
456 retval
458 : "NULL");
459
460 return retval;
461}
462
463void
464objfile::map_symbol_filenames (gdb::function_view<symbol_filename_ftype> fun,
465 bool need_fullname)
466{
467 if (debug_symfile)
469 "qf->map_symbol_filenames (%s, ..., %d)\n",
470 objfile_debug_name (this),
471 need_fullname);
472
473 for (const auto &iter : qf_require_partial_symbols ())
474 iter->map_symbol_filenames (this, fun, need_fullname);
475}
476
477struct compunit_symtab *
479{
480 if (debug_symfile)
482 "qf->find_compunit_symtab_by_address (%s, %s)\n",
483 objfile_debug_name (this),
484 hex_string (address));
485
486 struct compunit_symtab *result = NULL;
487 for (const auto &iter : qf_require_partial_symbols ())
488 {
489 result = iter->find_compunit_symtab_by_address (this, address);
490 if (result != nullptr)
491 break;
492 }
493
494 if (debug_symfile)
496 "qf->find_compunit_symtab_by_address (...) = %s\n",
497 result
499 : "NULL");
500
501 return result;
502}
503
504enum language
506 domain_enum domain,
507 bool *symbol_found_p)
508{
509 enum language result = language_unknown;
510 *symbol_found_p = false;
511
512 for (const auto &iter : qf_require_partial_symbols ())
513 {
514 result = iter->lookup_global_symbol_language (this, name, domain,
515 symbol_found_p);
516 if (*symbol_found_p)
517 break;
518 }
519
520 return result;
521}
522
523void
525{
526 if ((flags & OBJF_PSYMTABS_READ) == 0)
527 {
529
530 bool printed = false;
531 for (const auto &iter : qf)
532 {
533 if (iter->can_lazily_read_symbols ())
534 {
535 if (verbose && !printed)
536 {
537 gdb_printf (_("Reading symbols from %s...\n"),
538 objfile_name (this));
539 printed = true;
540 }
541 iter->read_partial_symbols (this);
542 }
543 }
544 if (printed && !objfile_has_symbols (this))
545 gdb_printf (_("(No debugging symbols found in %s)\n"),
546 objfile_name (this));
547 }
548}
549
550
551/* Debugging version of struct sym_probe_fns. */
552
553static const std::vector<std::unique_ptr<probe>> &
555{
556 const struct debug_sym_fns_data *debug_data
558
559 const std::vector<std::unique_ptr<probe>> &retval
561
563 "probes->sym_get_probes (%s) = %s\n",
565 host_address_to_string (retval.data ()));
566
567 return retval;
568}
569
571{
573};
574
575/* Debugging version of struct sym_fns. */
576
577static void
579{
580 const struct debug_sym_fns_data *debug_data
582
583 gdb_printf (gdb_stdlog, "sf->sym_new_init (%s)\n",
585
586 debug_data->real_sf->sym_new_init (objfile);
587}
588
589static void
591{
592 const struct debug_sym_fns_data *debug_data
594
595 gdb_printf (gdb_stdlog, "sf->sym_init (%s)\n",
597
598 debug_data->real_sf->sym_init (objfile);
599}
600
601static void
602debug_sym_read (struct objfile *objfile, symfile_add_flags symfile_flags)
603{
604 const struct debug_sym_fns_data *debug_data
606
607 gdb_printf (gdb_stdlog, "sf->sym_read (%s, 0x%x)\n",
608 objfile_debug_name (objfile), (unsigned) symfile_flags);
609
610 debug_data->real_sf->sym_read (objfile, symfile_flags);
611}
612
613static void
615{
616 const struct debug_sym_fns_data *debug_data
618
619 gdb_printf (gdb_stdlog, "sf->sym_finish (%s)\n",
621
622 debug_data->real_sf->sym_finish (objfile);
623}
624
625static void
627 const section_addr_info &info)
628{
629 const struct debug_sym_fns_data *debug_data
631
632 gdb_printf (gdb_stdlog, "sf->sym_offsets (%s, %s)\n",
634 host_address_to_string (&info));
635
636 debug_data->real_sf->sym_offsets (objfile, info);
637}
638
641{
642 /* This API function is annoying, it doesn't take a "this" pointer.
643 Fortunately it is only used in one place where we (re-)lookup the
644 sym_fns table to use. Thus we will never be called. */
645 gdb_assert_not_reached ("debug_sym_segments called");
646}
647
648static void
650{
651 const struct debug_sym_fns_data *debug_data
653
654 gdb_printf (gdb_stdlog, "sf->sym_read_linetable (%s)\n",
656
657 debug_data->real_sf->sym_read_linetable (objfile);
658}
659
660static bfd_byte *
661debug_sym_relocate (struct objfile *objfile, asection *sectp, bfd_byte *buf)
662{
663 const struct debug_sym_fns_data *debug_data
665 bfd_byte *retval;
666
667 retval = debug_data->real_sf->sym_relocate (objfile, sectp, buf);
668
670 "sf->sym_relocate (%s, %s, %s) = %s\n",
672 host_address_to_string (sectp),
673 host_address_to_string (buf),
674 host_address_to_string (retval));
675
676 return retval;
677}
678
679/* Template of debugging version of struct sym_fns.
680 A copy is made, with sym_flavour updated, and a pointer to the real table
681 installed in real_sf, and then a pointer to the copy is installed in the
682 objfile. */
683
684static const struct sym_fns debug_sym_fns =
685{
695};
696
697/* Install the debugging versions of the symfile functions for OBJFILE.
698 Do not call this if the debug versions are already installed. */
699
700static void
702{
703 const struct sym_fns *real_sf;
704 struct debug_sym_fns_data *debug_data;
705
706 /* The debug versions should not already be installed. */
707 gdb_assert (!symfile_debug_installed (objfile));
708
709 real_sf = objfile->sf;
710
711 /* Alas we have to preserve NULL entries in REAL_SF. */
712 debug_data = new struct debug_sym_fns_data;
713
714#define COPY_SF_PTR(from, to, name, func) \
715 do { \
716 if ((from)->name) \
717 (to)->debug_sf.name = func; \
718 } while (0)
719
720 COPY_SF_PTR (real_sf, debug_data, sym_new_init, debug_sym_new_init);
721 COPY_SF_PTR (real_sf, debug_data, sym_init, debug_sym_init);
722 COPY_SF_PTR (real_sf, debug_data, sym_read, debug_sym_read);
723 COPY_SF_PTR (real_sf, debug_data, sym_finish, debug_sym_finish);
724 COPY_SF_PTR (real_sf, debug_data, sym_offsets, debug_sym_offsets);
725 COPY_SF_PTR (real_sf, debug_data, sym_segments, debug_sym_segments);
726 COPY_SF_PTR (real_sf, debug_data, sym_read_linetable,
728 COPY_SF_PTR (real_sf, debug_data, sym_relocate, debug_sym_relocate);
730 debug_data->debug_sf.sym_probe_fns = &debug_sym_probe_fns;
731
732#undef COPY_SF_PTR
733
734 debug_data->real_sf = real_sf;
736 objfile->sf = &debug_data->debug_sf;
737}
738
739/* Uninstall the debugging versions of the symfile functions for OBJFILE.
740 Do not call this if the debug versions are not installed. */
741
742static void
744{
745 struct debug_sym_fns_data *debug_data;
746
747 /* The debug versions should be currently installed. */
748 gdb_assert (symfile_debug_installed (objfile));
749
751
752 objfile->sf = debug_data->real_sf;
754}
755
756/* Call this function to set OBJFILE->SF.
757 Do not set OBJFILE->SF directly. */
758
759void
760objfile_set_sym_fns (struct objfile *objfile, const struct sym_fns *sf)
761{
763 {
764 gdb_assert (debug_symfile);
765 /* Remove the current one, and reinstall a new one later. */
767 }
768
769 /* Assume debug logging is disabled. */
770 objfile->sf = sf;
771
772 /* Turn debug logging on if enabled. */
773 if (debug_symfile)
775}
776
777static void
778set_debug_symfile (const char *args, int from_tty, struct cmd_list_element *c)
779{
780 for (struct program_space *pspace : program_spaces)
781 for (objfile *objfile : pspace->objfiles ())
782 {
783 if (debug_symfile)
784 {
787 }
788 else
789 {
792 }
793 }
794}
795
796static void
797show_debug_symfile (struct ui_file *file, int from_tty,
798 struct cmd_list_element *c, const char *value)
799{
800 gdb_printf (file, _("Symfile debugging is %s.\n"), value);
801}
802
804void
806{
808Set debugging of the symfile functions."), _("\
809Show debugging of the symfile functions."), _("\
810When enabled, all calls to the symfile functions are logged."),
813
814 /* Note: We don't need a new-objfile observer because debug logging
815 will be installed when objfile init'n calls objfile_set_sym_fns. */
816}
const char *const name
struct symbol * block_find_symbol(const struct block *block, const char *name, const domain_enum domain, block_symbol_matcher_ftype *matcher, void *data)
Definition block.c:829
int block_find_non_opaque_type_preferred(struct symbol *sym, void *data)
Definition block.c:864
lookup_name_info make_ignore_params() const
Definition symtab.h:255
void set(unsigned key, void *datum)
Definition registry.h:204
void * get(unsigned key)
Definition registry.h:211
struct cmd_list_element * showdebuglist
Definition cli-cmds.c:165
struct cmd_list_element * setdebuglist
Definition cli-cmds.c:163
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)
Definition cli-decode.c:739
@ no_class
Definition command.h:53
block_enum
Definition defs.h:630
@ GLOBAL_BLOCK
Definition defs.h:631
language
Definition defs.h:211
@ language_unknown
Definition defs.h:212
@ OBJF_PSYMTABS_READ
const char * objfile_debug_name(const struct objfile *objfile)
Definition objfiles.c:1330
const char * objfile_debug_name(const struct objfile *objfile)
Definition objfiles.c:1330
int objfile_has_symbols(struct objfile *objfile)
Definition objfiles.c:789
const char * objfile_name(const struct objfile *objfile)
Definition objfiles.c:1308
std::vector< struct program_space * > program_spaces
Definition progspace.c:36
int() symbol_compare_ftype(const char *string1, const char *string2)
@ SEARCH_GLOBAL_BLOCK
@ SEARCH_STATIC_BLOCK
const char * symtab_to_filename_for_display(struct symtab *symtab)
Definition source.c:1287
Definition block.h:109
struct block * block(size_t i)
Definition block.h:271
struct minimal_symbol * minsym
Definition minsyms.h:49
symtab * primary_filetab() const
Definition symtab.c:397
const struct sym_fns * real_sf
void forget_cached_source_info()
const struct sym_fns * sf
Definition objfiles.h:681
struct compunit_symtab * compunit_symtabs
Definition objfiles.h:646
struct compunit_symtab * lookup_symbol(block_enum kind, const char *name, domain_enum domain)
void expand_symtabs_with_fullname(const char *fullname)
struct symtab * find_last_source_symtab()
void expand_symtabs_for_function(const char *func_name)
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)
void print_stats(bool print_bcache)
bool map_symtabs_matching_filename(const char *name, const char *real_path, gdb::function_view< bool(symtab *)> callback)
void expand_all_symtabs()
void require_partial_symbols(bool verbose)
objfile_flags flags
Definition objfiles.h:637
void dump()
bool has_unexpanded_symtabs()
std::forward_list< quick_symbol_functions_up > qf
Definition objfiles.h:685
enum language lookup_global_symbol_language(const char *name, domain_enum domain, bool *symbol_found_p)
void map_symbol_filenames(gdb::function_view< symbol_filename_ftype > fun, bool need_fullname)
void expand_matching_symbols(const lookup_name_info &name, domain_enum domain, int global, symbol_compare_ftype *ordered_compare)
const std::forward_list< quick_symbol_functions_up > & qf_require_partial_symbols()
Definition objfiles.h:617
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)
bool has_partial_symbols()
bfd_byte *(* sym_relocate)(struct objfile *, asection *sectp, bfd_byte *buf)
Definition symfile.h:171
void(* sym_read)(struct objfile *, symfile_add_flags)
Definition symfile.h:138
void(* sym_read_linetable)(struct objfile *)
Definition symfile.h:165
void(* sym_new_init)(struct objfile *)
Definition symfile.h:125
void(* sym_init)(struct objfile *)
Definition symfile.h:131
const struct sym_probe_fns * sym_probe_fns
Definition symfile.h:175
void(* sym_offsets)(struct objfile *, const section_addr_info &)
Definition symfile.h:153
void(* sym_finish)(struct objfile *)
Definition symfile.h:144
const std::vector< std::unique_ptr< probe > > &(* sym_get_probes)(struct objfile *)
Definition symfile.h:113
Definition value.c:181
static const std::vector< std::unique_ptr< probe > > & debug_sym_get_probes(struct objfile *objfile)
static void debug_sym_new_init(struct objfile *objfile)
void _initialize_symfile_debug()
static void debug_sym_read_linetable(struct objfile *objfile)
static void show_debug_symfile(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void set_debug_symfile(const char *args, int from_tty, struct cmd_list_element *c)
static void debug_sym_finish(struct objfile *objfile)
static const char * debug_symtab_name(struct symtab *symtab)
void objfile_set_sym_fns(struct objfile *objfile, const struct sym_fns *sf)
static const struct sym_probe_fns debug_sym_probe_fns
static void install_symfile_debug_logging(struct objfile *objfile)
static void debug_sym_offsets(struct objfile *objfile, const section_addr_info &info)
static void debug_sym_init(struct objfile *objfile)
static const registry< objfile >::key< debug_sym_fns_data > symfile_debug_objfile_data_key
static int symfile_debug_installed(struct objfile *objfile)
static bfd_byte * debug_sym_relocate(struct objfile *objfile, asection *sectp, bfd_byte *buf)
static void debug_sym_read(struct objfile *objfile, symfile_add_flags symfile_flags)
static bool debug_symfile
static symfile_segment_data_up debug_sym_segments(bfd *abfd)
#define COPY_SF_PTR(from, to, name, func)
static const struct sym_fns debug_sym_fns
static void uninstall_symfile_debug_logging(struct objfile *objfile)
std::unique_ptr< symfile_segment_data > symfile_segment_data_up
Definition symfile.h:104
std::vector< other_sections > section_addr_info
Definition symfile.h:74
const char * domain_name(domain_enum e)
Definition symtab.c:306
bool symbol_matches_search_name(const struct general_symbol_info *gsymbol, const lookup_name_info &name)
Definition symtab.c:1098
bool compare_filenames_for_search(const char *filename, const char *search_name)
Definition symtab.c:461
const char * search_domain_name(enum search_domain e)
Definition symtab.c:323
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)
Definition symtab.c:542
search_domain
Definition symtab.h:916
@ ALL_DOMAIN
Definition symtab.h:931
domain_enum
Definition symtab.h:871
@ VAR_DOMAIN
Definition symtab.h:881
@ UNDEF_DOMAIN
Definition symtab.h:876
void gdb_printf(struct ui_file *stream, const char *format,...)
Definition utils.c:1865
#define gdb_stdlog
Definition utils.h:196