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#include "cli/cli-style.h"
38
39/* We need to save a pointer to the real symbol functions.
40 Plus, the debug versions are malloc'd because we have to NULL out the
41 ones that are NULL in the real copy. */
42
44{
45 const struct sym_fns *real_sf = nullptr;
46 struct sym_fns debug_sf {};
47};
48
49/* We need to record a pointer to the real set of functions for each
50 objfile. */
53
54/* If true all calls to the symfile functions are logged. */
55static bool debug_symfile = false;
56
57/* Return non-zero if symfile debug logging is installed. */
58
59static int
61{
62 return (objfile->sf != NULL
64}
65
66/* Utility return the name to print for SYMTAB. */
67
68static const char *
73
74
75/* See objfiles.h. */
76
77bool
79{
80 bool retval = false;
81
82 /* If we have not read psymbols, but we have a function capable of reading
83 them, then that is an indication that they are in fact available. Without
84 this function the symbols may have been already read in but they also may
85 not be present in this objfile. */
86 for (const auto &iter : qf)
87 {
88 if ((flags & OBJF_PSYMTABS_READ) == 0
89 && iter->can_lazily_read_symbols ())
90 retval = true;
91 else
92 retval = iter->has_symbols (this);
93 if (retval)
94 break;
95 }
96
97 if (debug_symfile)
98 gdb_printf (gdb_stdlog, "qf->has_symbols (%s) = %d\n",
99 objfile_debug_name (this), retval);
100
101 return retval;
102}
103
104/* See objfiles.h. */
105bool
107{
108 if (debug_symfile)
109 gdb_printf (gdb_stdlog, "qf->has_unexpanded_symtabs (%s)\n",
110 objfile_debug_name (this));
111
112 bool result = false;
113 for (const auto &iter : qf_require_partial_symbols ())
114 {
115 if (iter->has_unexpanded_symtabs (this))
116 {
117 result = true;
118 break;
119 }
120 }
121
122 if (debug_symfile)
123 gdb_printf (gdb_stdlog, "qf->has_unexpanded_symtabs (%s) = %d\n",
124 objfile_debug_name (this), (result ? 1 : 0));
125
126 return result;
127}
128
129struct symtab *
131{
132 struct symtab *retval = nullptr;
133
134 if (debug_symfile)
135 gdb_printf (gdb_stdlog, "qf->find_last_source_symtab (%s)\n",
136 objfile_debug_name (this));
137
138 for (const auto &iter : qf_require_partial_symbols ())
139 {
140 retval = iter->find_last_source_symtab (this);
141 if (retval != nullptr)
142 break;
143 }
144
145 if (debug_symfile)
146 gdb_printf (gdb_stdlog, "qf->find_last_source_symtab (...) = %s\n",
147 retval ? debug_symtab_name (retval) : "NULL");
148
149 return retval;
150}
151
152void
154{
155 if (debug_symfile)
156 gdb_printf (gdb_stdlog, "qf->forget_cached_source_info (%s)\n",
157 objfile_debug_name (this));
158
159 for (compunit_symtab *cu : compunits ())
160 {
161 for (symtab *s : cu->filetabs ())
162 {
163 if (s->fullname != NULL)
164 {
165 xfree (s->fullname);
166 s->fullname = NULL;
167 }
168 }
169 }
170
171 for (const auto &iter : qf_require_partial_symbols ())
172 iter->forget_cached_source_info (this);
173}
174
175bool
177 (const char *name, const char *real_path,
178 gdb::function_view<bool (symtab *)> callback)
179{
180 if (debug_symfile)
182 "qf->map_symtabs_matching_filename (%s, \"%s\", "
183 "\"%s\", %s)\n",
184 objfile_debug_name (this), name,
185 real_path ? real_path : NULL,
186 host_address_to_string (&callback));
187
188 bool retval = true;
189 const char *name_basename = lbasename (name);
190
191 auto match_one_filename = [&] (const char *filename, bool basenames)
192 {
193 if (compare_filenames_for_search (filename, name))
194 return true;
195 if (basenames && FILENAME_CMP (name_basename, filename) == 0)
196 return true;
197 if (real_path != nullptr && IS_ABSOLUTE_PATH (filename)
198 && IS_ABSOLUTE_PATH (real_path))
199 return filename_cmp (filename, real_path) == 0;
200 return false;
201 };
202
203 compunit_symtab *last_made = this->compunit_symtabs;
204
205 auto on_expansion = [&] (compunit_symtab *symtab)
206 {
207 /* The callback to iterate_over_some_symtabs returns false to keep
208 going and true to continue, so we have to invert the result
209 here, for expand_symtabs_matching. */
210 bool result = !iterate_over_some_symtabs (name, real_path,
211 this->compunit_symtabs,
212 last_made,
213 callback);
214 last_made = this->compunit_symtabs;
215 return result;
216 };
217
218 for (const auto &iter : qf_require_partial_symbols ())
219 {
220 if (!iter->expand_symtabs_matching (this,
221 match_one_filename,
222 nullptr,
223 nullptr,
224 on_expansion,
228 ALL_DOMAIN))
229 {
230 retval = false;
231 break;
232 }
233 }
234
235 if (debug_symfile)
237 "qf->map_symtabs_matching_filename (...) = %d\n",
238 retval);
239
240 /* We must re-invert the return value here to match the caller's
241 expectations. */
242 return !retval;
243}
244
245struct compunit_symtab *
247{
248 struct compunit_symtab *retval = nullptr;
249
250 if (debug_symfile)
252 "qf->lookup_symbol (%s, %d, \"%s\", %s)\n",
253 objfile_debug_name (this), kind, name,
254 domain_name (domain));
255
257
258 auto search_one_symtab = [&] (compunit_symtab *stab)
259 {
260 struct symbol *sym, *with_opaque = NULL;
261 const struct blockvector *bv = stab->blockvector ();
262 const struct block *block = bv->block (kind);
263
264 sym = block_find_symbol (block, lookup_name, domain, &with_opaque);
265
266 /* Some caution must be observed with overloaded functions
267 and methods, since the index will not contain any overload
268 information (but NAME might contain it). */
269
270 if (sym != nullptr)
271 {
272 retval = stab;
273 /* Found it. */
274 return false;
275 }
276 if (with_opaque != nullptr)
277 retval = stab;
278
279 /* Keep looking through other psymtabs. */
280 return true;
281 };
282
283 for (const auto &iter : qf_require_partial_symbols ())
284 {
285 if (!iter->expand_symtabs_matching (this,
286 nullptr,
287 &lookup_name,
288 nullptr,
289 search_one_symtab,
290 kind == GLOBAL_BLOCK
293 domain,
294 ALL_DOMAIN))
295 break;
296 }
297
298 if (debug_symfile)
299 gdb_printf (gdb_stdlog, "qf->lookup_symbol (...) = %s\n",
300 retval
302 : "NULL");
303
304 return retval;
305}
306
307void
308objfile::print_stats (bool print_bcache)
309{
310 if (debug_symfile)
311 gdb_printf (gdb_stdlog, "qf->print_stats (%s, %d)\n",
312 objfile_debug_name (this), print_bcache);
313
314 for (const auto &iter : qf_require_partial_symbols ())
315 iter->print_stats (this, print_bcache);
316}
317
318void
320{
321 if (debug_symfile)
322 gdb_printf (gdb_stdlog, "qf->dump (%s)\n",
323 objfile_debug_name (this));
324
325 for (const auto &iter : qf)
326 iter->dump (this);
327}
328
329void
331{
332 if (debug_symfile)
334 "qf->expand_symtabs_for_function (%s, \"%s\")\n",
335 objfile_debug_name (this), func_name);
336
337 lookup_name_info base_lookup (func_name, symbol_name_match_type::FULL);
338 lookup_name_info lookup_name = base_lookup.make_ignore_params ();
339
340 for (const auto &iter : qf_require_partial_symbols ())
341 iter->expand_symtabs_matching (this,
342 nullptr,
343 &lookup_name,
344 nullptr,
345 nullptr,
349 ALL_DOMAIN);
350}
351
352void
354{
355 if (debug_symfile)
356 gdb_printf (gdb_stdlog, "qf->expand_all_symtabs (%s)\n",
357 objfile_debug_name (this));
358
359 for (const auto &iter : qf_require_partial_symbols ())
360 iter->expand_all_symtabs (this);
361}
362
363void
365{
366 if (debug_symfile)
368 "qf->expand_symtabs_with_fullname (%s, \"%s\")\n",
369 objfile_debug_name (this), fullname);
370
371 const char *basename = lbasename (fullname);
372 auto file_matcher = [&] (const char *filename, bool basenames)
373 {
374 return filename_cmp (basenames ? basename : fullname, filename) == 0;
375 };
376
377 for (const auto &iter : qf_require_partial_symbols ())
378 iter->expand_symtabs_matching (this,
379 file_matcher,
380 nullptr,
381 nullptr,
382 nullptr,
386 ALL_DOMAIN);
387}
388
389void
391 (const lookup_name_info &name, domain_enum domain,
392 int global,
393 symbol_compare_ftype *ordered_compare)
394{
395 if (debug_symfile)
397 "qf->expand_matching_symbols (%s, %s, %d, %s)\n",
398 objfile_debug_name (this),
399 domain_name (domain), global,
400 host_address_to_string (ordered_compare));
401
402 for (const auto &iter : qf_require_partial_symbols ())
403 iter->expand_matching_symbols (this, name, domain, global,
404 ordered_compare);
405}
406
407bool
409 (gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
410 const lookup_name_info *lookup_name,
411 gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
412 gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
413 block_search_flags search_flags,
414 domain_enum domain,
415 enum search_domain kind)
416{
417 /* This invariant is documented in quick-functions.h. */
418 gdb_assert (lookup_name != nullptr || symbol_matcher == nullptr);
419
420 if (debug_symfile)
422 "qf->expand_symtabs_matching (%s, %s, %s, %s, %s)\n",
423 objfile_debug_name (this),
424 host_address_to_string (&file_matcher),
425 host_address_to_string (&symbol_matcher),
426 host_address_to_string (&expansion_notify),
427 search_domain_name (kind));
428
429 for (const auto &iter : qf_require_partial_symbols ())
430 if (!iter->expand_symtabs_matching (this, file_matcher, lookup_name,
431 symbol_matcher, expansion_notify,
432 search_flags, domain, kind))
433 return false;
434 return true;
435}
436
437struct compunit_symtab *
439 CORE_ADDR pc,
440 struct obj_section *section,
441 int warn_if_readin)
442{
443 struct compunit_symtab *retval = nullptr;
444
445 if (debug_symfile)
447 "qf->find_pc_sect_compunit_symtab (%s, %s, %s, %s, %d)\n",
448 objfile_debug_name (this),
449 host_address_to_string (msymbol.minsym),
450 hex_string (pc),
451 host_address_to_string (section),
452 warn_if_readin);
453
454 for (const auto &iter : qf_require_partial_symbols ())
455 {
456 retval = iter->find_pc_sect_compunit_symtab (this, msymbol, pc, section,
457 warn_if_readin);
458 if (retval != nullptr)
459 break;
460 }
461
462 if (debug_symfile)
464 "qf->find_pc_sect_compunit_symtab (...) = %s\n",
465 retval
467 : "NULL");
468
469 return retval;
470}
471
472void
473objfile::map_symbol_filenames (gdb::function_view<symbol_filename_ftype> fun,
474 bool need_fullname)
475{
476 if (debug_symfile)
478 "qf->map_symbol_filenames (%s, ..., %d)\n",
479 objfile_debug_name (this),
480 need_fullname);
481
482 for (const auto &iter : qf_require_partial_symbols ())
483 iter->map_symbol_filenames (this, fun, need_fullname);
484}
485
486struct compunit_symtab *
488{
489 if (debug_symfile)
491 "qf->find_compunit_symtab_by_address (%s, %s)\n",
492 objfile_debug_name (this),
493 hex_string (address));
494
495 struct compunit_symtab *result = NULL;
496 for (const auto &iter : qf_require_partial_symbols ())
497 {
498 result = iter->find_compunit_symtab_by_address (this, address);
499 if (result != nullptr)
500 break;
501 }
502
503 if (debug_symfile)
505 "qf->find_compunit_symtab_by_address (...) = %s\n",
506 result
508 : "NULL");
509
510 return result;
511}
512
513enum language
515 domain_enum domain,
516 bool *symbol_found_p)
517{
518 enum language result = language_unknown;
519 *symbol_found_p = false;
520
521 for (const auto &iter : qf_require_partial_symbols ())
522 {
523 result = iter->lookup_global_symbol_language (this, name, domain,
524 symbol_found_p);
525 if (*symbol_found_p)
526 break;
527 }
528
529 return result;
530}
531
532void
534{
535 if ((flags & OBJF_PSYMTABS_READ) == 0)
536 {
538
539 bool printed = false;
540 for (const auto &iter : qf)
541 {
542 if (iter->can_lazily_read_symbols ())
543 {
544 if (verbose && !printed)
545 {
546 gdb_printf (_("Reading symbols from %ps...\n"),
548 objfile_name (this)));
549 printed = true;
550 }
551 iter->read_partial_symbols (this);
552 }
553 }
554 if (printed && !objfile_has_symbols (this))
555 gdb_printf (_("(No debugging symbols found in %ps)\n"),
557 objfile_name (this)));
558 }
559}
560
561
562/* Debugging version of struct sym_probe_fns. */
563
564static const std::vector<std::unique_ptr<probe>> &
566{
567 const struct debug_sym_fns_data *debug_data
569
570 const std::vector<std::unique_ptr<probe>> &retval
572
574 "probes->sym_get_probes (%s) = %s\n",
576 host_address_to_string (retval.data ()));
577
578 return retval;
579}
580
582{
584};
585
586/* Debugging version of struct sym_fns. */
587
588static void
590{
591 const struct debug_sym_fns_data *debug_data
593
594 gdb_printf (gdb_stdlog, "sf->sym_new_init (%s)\n",
596
597 debug_data->real_sf->sym_new_init (objfile);
598}
599
600static void
602{
603 const struct debug_sym_fns_data *debug_data
605
606 gdb_printf (gdb_stdlog, "sf->sym_init (%s)\n",
608
609 debug_data->real_sf->sym_init (objfile);
610}
611
612static void
613debug_sym_read (struct objfile *objfile, symfile_add_flags symfile_flags)
614{
615 const struct debug_sym_fns_data *debug_data
617
618 gdb_printf (gdb_stdlog, "sf->sym_read (%s, 0x%x)\n",
619 objfile_debug_name (objfile), (unsigned) symfile_flags);
620
621 debug_data->real_sf->sym_read (objfile, symfile_flags);
622}
623
624static void
626{
627 const struct debug_sym_fns_data *debug_data
629
630 gdb_printf (gdb_stdlog, "sf->sym_finish (%s)\n",
632
633 debug_data->real_sf->sym_finish (objfile);
634}
635
636static void
638 const section_addr_info &info)
639{
640 const struct debug_sym_fns_data *debug_data
642
643 gdb_printf (gdb_stdlog, "sf->sym_offsets (%s, %s)\n",
645 host_address_to_string (&info));
646
647 debug_data->real_sf->sym_offsets (objfile, info);
648}
649
652{
653 /* This API function is annoying, it doesn't take a "this" pointer.
654 Fortunately it is only used in one place where we (re-)lookup the
655 sym_fns table to use. Thus we will never be called. */
656 gdb_assert_not_reached ("debug_sym_segments called");
657}
658
659static void
661{
662 const struct debug_sym_fns_data *debug_data
664
665 gdb_printf (gdb_stdlog, "sf->sym_read_linetable (%s)\n",
667
668 debug_data->real_sf->sym_read_linetable (objfile);
669}
670
671static bfd_byte *
672debug_sym_relocate (struct objfile *objfile, asection *sectp, bfd_byte *buf)
673{
674 const struct debug_sym_fns_data *debug_data
676 bfd_byte *retval;
677
678 retval = debug_data->real_sf->sym_relocate (objfile, sectp, buf);
679
681 "sf->sym_relocate (%s, %s, %s) = %s\n",
683 host_address_to_string (sectp),
684 host_address_to_string (buf),
685 host_address_to_string (retval));
686
687 return retval;
688}
689
690/* Template of debugging version of struct sym_fns.
691 A copy is made, with sym_flavour updated, and a pointer to the real table
692 installed in real_sf, and then a pointer to the copy is installed in the
693 objfile. */
694
707
708/* Install the debugging versions of the symfile functions for OBJFILE.
709 Do not call this if the debug versions are already installed. */
710
711static void
713{
714 const struct sym_fns *real_sf;
715 struct debug_sym_fns_data *debug_data;
716
717 /* The debug versions should not already be installed. */
718 gdb_assert (!symfile_debug_installed (objfile));
719
720 real_sf = objfile->sf;
721
722 /* Alas we have to preserve NULL entries in REAL_SF. */
723 debug_data = new struct debug_sym_fns_data;
724
725#define COPY_SF_PTR(from, to, name, func) \
726 do { \
727 if ((from)->name) \
728 (to)->debug_sf.name = func; \
729 } while (0)
730
731 COPY_SF_PTR (real_sf, debug_data, sym_new_init, debug_sym_new_init);
732 COPY_SF_PTR (real_sf, debug_data, sym_init, debug_sym_init);
733 COPY_SF_PTR (real_sf, debug_data, sym_read, debug_sym_read);
734 COPY_SF_PTR (real_sf, debug_data, sym_finish, debug_sym_finish);
735 COPY_SF_PTR (real_sf, debug_data, sym_offsets, debug_sym_offsets);
736 COPY_SF_PTR (real_sf, debug_data, sym_segments, debug_sym_segments);
737 COPY_SF_PTR (real_sf, debug_data, sym_read_linetable,
739 COPY_SF_PTR (real_sf, debug_data, sym_relocate, debug_sym_relocate);
741 debug_data->debug_sf.sym_probe_fns = &debug_sym_probe_fns;
742
743#undef COPY_SF_PTR
744
745 debug_data->real_sf = real_sf;
747 objfile->sf = &debug_data->debug_sf;
748}
749
750/* Uninstall the debugging versions of the symfile functions for OBJFILE.
751 Do not call this if the debug versions are not installed. */
752
753static void
755{
756 struct debug_sym_fns_data *debug_data;
757
758 /* The debug versions should be currently installed. */
759 gdb_assert (symfile_debug_installed (objfile));
760
762
763 objfile->sf = debug_data->real_sf;
765}
766
767/* Call this function to set OBJFILE->SF.
768 Do not set OBJFILE->SF directly. */
769
770void
771objfile_set_sym_fns (struct objfile *objfile, const struct sym_fns *sf)
772{
774 {
775 gdb_assert (debug_symfile);
776 /* Remove the current one, and reinstall a new one later. */
778 }
779
780 /* Assume debug logging is disabled. */
781 objfile->sf = sf;
782
783 /* Turn debug logging on if enabled. */
784 if (debug_symfile)
786}
787
788static void
789set_debug_symfile (const char *args, int from_tty, struct cmd_list_element *c)
790{
791 for (struct program_space *pspace : program_spaces)
792 for (objfile *objfile : pspace->objfiles ())
793 {
794 if (debug_symfile)
795 {
798 }
799 else
800 {
803 }
804 }
805}
806
807static void
808show_debug_symfile (struct ui_file *file, int from_tty,
809 struct cmd_list_element *c, const char *value)
810{
811 gdb_printf (file, _("Symfile debugging is %s.\n"), value);
812}
813
815void
817{
819Set debugging of the symfile functions."), _("\
820Show debugging of the symfile functions."), _("\
821When enabled, all calls to the symfile functions are logged."),
824
825 /* Note: We don't need a new-objfile observer because debug logging
826 will be installed when objfile init'n calls objfile_set_sym_fns. */
827}
const char *const name
void xfree(void *)
struct symbol * block_find_symbol(const struct block *block, const lookup_name_info &name, const domain_enum domain, struct symbol **stub)
Definition block.c:794
ui_file_style style() const
Definition cli-style.c:169
lookup_name_info make_ignore_params() const
Definition symtab.h:256
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:167
struct cmd_list_element * setdebuglist
Definition cli-cmds.c:165
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:809
cli_style_option file_name_style
@ no_class
Definition command.h:53
block_enum
Definition defs.h:584
@ GLOBAL_BLOCK
Definition defs.h:585
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:1281
const char * objfile_debug_name(const struct objfile *objfile)
Definition objfiles.c:1281
int objfile_has_symbols(struct objfile *objfile)
Definition objfiles.c:749
const char * objfile_name(const struct objfile *objfile)
Definition objfiles.c:1259
std::vector< struct program_space * > program_spaces
Definition progspace.c:37
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:1269
Definition block.h:109
struct block * block(size_t i)
Definition block.h:374
struct minimal_symbol * minsym
Definition minsyms.h:49
symtab * primary_filetab() const
Definition symtab.c:415
const struct sym_fns * real_sf
void forget_cached_source_info()
const struct sym_fns * sf
Definition objfiles.h:768
struct compunit_symtab * compunit_symtabs
Definition objfiles.h:733
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)
compunit_symtab_range compunits()
Definition objfiles.h:451
objfile_flags flags
Definition objfiles.h:724
void dump()
bool has_unexpanded_symtabs()
std::forward_list< quick_symbol_functions_up > qf
Definition objfiles.h:772
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:704
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.h:130
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:303
bool compare_filenames_for_search(const char *filename, const char *search_name)
Definition symtab.c:489
const char * search_domain_name(enum search_domain e)
Definition symtab.c:320
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:570
search_domain
Definition symtab.h:945
@ ALL_DOMAIN
Definition symtab.h:960
domain_enum
Definition symtab.h:900
@ VAR_DOMAIN
Definition symtab.h:910
@ UNDEF_DOMAIN
Definition symtab.h:905
static styled_string_s * styled_string(const ui_file_style &style, const char *str, styled_string_s &&tmp={})
Definition ui-out.h:151
void gdb_printf(struct ui_file *stream, const char *format,...)
Definition utils.c:1886
#define gdb_stdlog
Definition utils.h:190