GDB (xrefs)
Loading...
Searching...
No Matches
psymtab.h
Go to the documentation of this file.
1/* Public partial symbol table definitions.
2
3 Copyright (C) 2009-2023 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20#ifndef PSYMTAB_H
21#define PSYMTAB_H
22
23#include "objfiles.h"
24#include "gdbsupport/gdb_string_view.h"
25#include "gdbsupport/gdb_obstack.h"
26#include "symfile.h"
27#include "gdbsupport/next-iterator.h"
28#include "bcache.h"
29
30/* Specialization of bcache to store partial symbols. */
31
33{
34 /* Calculate a hash code for the given partial symbol. The hash is
35 calculated using the symbol's value, language, domain, class
36 and name. These are the values which are set by
37 add_psymbol_to_bcache. */
38 unsigned long hash (const void *addr, int length) override;
39
40 /* Returns true if the symbol LEFT equals the symbol RIGHT.
41 For the comparison this function uses a symbols value,
42 language, domain, class and name. */
43 int compare (const void *left, const void *right, int length) override;
44};
45
46/* An instance of this class manages the partial symbol tables and
47 partial symbols for a given objfile.
48
49 The core psymtab functions -- those in psymtab.c -- arrange for
50 nearly all psymtab- and psymbol-related allocations to happen
51 either in the psymtab_storage object (either on its obstack or in
52 other memory managed by this class), or on the per-BFD object. The
53 only link from the psymtab storage object back to the objfile (or
54 objfile_obstack) that is made by the core psymtab code is the
55 compunit_symtab member in the standard_psymtab -- and a given
56 symbol reader can avoid this by implementing its own subclasses of
57 partial_symtab.
58
59 However, it is up to each symbol reader to maintain this invariant
60 in other ways, if it wants to reuse psymtabs across multiple
61 objfiles. The main issue here is ensuring that read_symtab_private
62 does not point into objfile_obstack. */
63
65{
66public:
67 psymtab_storage () = default;
69
71
72 /* Discard all partial symbol tables starting with "psymtabs" and
73 proceeding until "to" has been discarded. */
74
76 {
77 while (psymtabs != to)
79 }
80
81 /* Discard the partial symbol table. */
82
83 void discard_psymtab (struct partial_symtab *pst);
84
85 /* Return the obstack that is used for storage by this object. */
86
87 struct obstack *obstack ()
88 {
89 if (!m_obstack.has_value ())
90 m_obstack.emplace ();
91 return &*m_obstack;
92 }
93
94 /* Allocate storage for the "dependencies" field of a psymtab.
95 NUMBER says how many dependencies there are. */
96
98 {
99 return OBSTACK_CALLOC (obstack (), number, struct partial_symtab *);
100 }
101
102 /* Install a psymtab on the psymtab list. This transfers ownership
103 of PST to this object. */
104
106
107 using partial_symtab_range = next_range<partial_symtab>;
108
109 /* A range adapter that makes it possible to iterate over all
110 psymtabs in one objfile. */
111
116
117
118 /* Each objfile points to a linked list of partial symtabs derived from
119 this file, one partial symtab structure for each compilation unit
120 (source file). */
121
122 struct partial_symtab *psymtabs = nullptr;
123
124 /* A byte cache where we can stash arbitrary "chunks" of bytes that
125 will not change. */
126
128
129private:
130
131 /* The obstack where allocations are made. This is lazily allocated
132 so that we don't waste memory when there are no psymtabs. */
133
134 gdb::optional<auto_obstack> m_obstack;
135};
136
137/* A partial_symbol records the name, domain, and address class of
138 symbols whose types we have not parsed yet. For functions, it also
139 contains their memory address, so we can find them from a PC value.
140 Each partial_symbol sits in a partial_symtab, all of which are chained
141 on a partial symtab list and which points to the corresponding
142 normal symtab once the partial_symtab has been referenced. */
143
144/* This structure is space critical. See space comments at the top of
145 symtab.h. */
146
148{
149 /* Return the section for this partial symbol, or nullptr if no
150 section has been set. */
151 struct obj_section *obj_section (struct objfile *objfile) const
152 {
153 return ginfo.obj_section (objfile);
154 }
155
156 /* Return the unrelocated address of this partial symbol. */
157 unrelocated_addr unrelocated_address () const
158 {
159 return ginfo.unrelocated_address ();
160 }
161
162 /* Return the address of this partial symbol, relocated according to
163 the offsets provided in OBJFILE. */
164 CORE_ADDR address (const struct objfile *objfile) const
165 {
166 return (CORE_ADDR (ginfo.unrelocated_address ())
168 }
169
170 /* Set the address of this partial symbol. The address must be
171 unrelocated. */
172 void set_unrelocated_address (unrelocated_addr addr)
173 {
175 }
176
177 /* Note that partial_symbol does not derive from general_symbol_info
178 due to the bcache. See add_psymbol_to_bcache. */
179
181
182 /* Name space code. */
183
185
186 /* Address class (for info_symbols). Note that we don't allow
187 synthetic "aclass" values here at present, simply because there's
188 no need. */
189
191};
192
193/* A convenience enum to give names to some constants used when
194 searching psymtabs. This is internal to psymtab and should not be
195 used elsewhere. */
196
203
204/* Specify whether a partial psymbol should be allocated on the global
205 list or the static list. */
206
208{
209 STATIC,
210 GLOBAL
211};
212
213/* Each source file that has not been fully read in is represented by
214 a partial_symtab. This contains the information on where in the
215 executable the debugging symbols for a specific file are, and a
216 list of names of global symbols which are located in this file.
217 They are all chained on partial symtab lists.
218
219 Even after the source file has been read into a symtab, the
220 partial_symtab remains around. */
221
223{
224 /* Allocate a new partial symbol table.
225
226 FILENAME (which must be non-NULL) is the filename of this partial
227 symbol table; it is copied into the appropriate storage. The
228 partial symtab will also be installed using
229 psymtab_storage::install. */
230
231 partial_symtab (const char *filename,
232 psymtab_storage *partial_symtabs,
233 objfile_per_bfd_storage *objfile_per_bfd)
234 ATTRIBUTE_NONNULL (2) ATTRIBUTE_NONNULL (3);
235
236 /* Like the above, but also sets the initial text low and text high
237 from the ADDR argument, and sets the global- and
238 static-offsets. */
239
240 partial_symtab (const char *filename,
241 psymtab_storage *partial_symtabs,
242 objfile_per_bfd_storage *objfile_per_bfd,
243 unrelocated_addr addr)
244 ATTRIBUTE_NONNULL (2) ATTRIBUTE_NONNULL (3);
245
247 {
248 }
249
250 /* Psymtab expansion is done in two steps:
251 - a call to read_symtab
252 - while that call is in progress, calls to expand_psymtab can be made,
253 both for this psymtab, and its dependencies.
254 This makes a distinction between a toplevel psymtab (for which both
255 read_symtab and expand_psymtab will be called) and a non-toplevel
256 psymtab (for which only expand_psymtab will be called). The
257 distinction can be used f.i. to do things before and after all
258 dependencies of a top-level psymtab have been expanded.
259
260 Read the full symbol table corresponding to this partial symbol
261 table. Typically calls expand_psymtab. */
262 virtual void read_symtab (struct objfile *) = 0;
263
264 /* Expand the full symbol table for this partial symbol table. Typically
265 calls expand_dependencies. */
266 virtual void expand_psymtab (struct objfile *) = 0;
267
268 /* Ensure that all the dependencies are read in. Calls
269 expand_psymtab for each non-shared dependency. */
270 void expand_dependencies (struct objfile *);
271
272 /* Return true if the symtab corresponding to this psymtab has been
273 read in in the context of this objfile. */
274 virtual bool readin_p (struct objfile *) const = 0;
275
276 /* Return a pointer to the compunit allocated for this source file
277 in the context of this objfile.
278
279 Return nullptr if the compunit was not read in or if there was no
280 symtab. */
282 (struct objfile *) const = 0;
283
284 /* Return the unrelocated low text address of this
285 partial_symtab. */
286 unrelocated_addr unrelocated_text_low () const
287 {
288 return m_text_low;
289 }
290
291 /* Return the unrelocated_addr high text address of this
292 partial_symtab. */
293 unrelocated_addr unrelocated_text_high () const
294 {
295 return m_text_high;
296 }
297
298 /* Return the relocated low text address of this partial_symtab. */
299 CORE_ADDR text_low (struct objfile *objfile) const
300 {
301 return CORE_ADDR (m_text_low) + objfile->text_section_offset ();
302 }
303
304 /* Return the relocated high text address of this partial_symtab. */
305 CORE_ADDR text_high (struct objfile *objfile) const
306 {
307 return CORE_ADDR (m_text_high) + objfile->text_section_offset ();
308 }
309
310 /* Set the low text address of this partial_symtab. */
311 void set_text_low (unrelocated_addr addr)
312 {
313 m_text_low = addr;
314 text_low_valid = 1;
315 }
316
317 /* Set the high text address of this partial_symtab. */
318 void set_text_high (unrelocated_addr addr)
319 {
320 m_text_high = addr;
321 text_high_valid = 1;
322 }
323
324 /* Return true if this symtab is empty -- meaning that it contains
325 no symbols. It may still have dependencies. */
326 bool empty () const
327 {
328 return global_psymbols.empty () && static_psymbols.empty ();
329 }
330
331 /* Add a symbol to this partial symbol table of OBJFILE.
332
333 If COPY_NAME is true, make a copy of NAME, otherwise use the passed
334 reference.
335
336 THECLASS is the type of symbol.
337
338 SECTION is the index of the section of OBJFILE in which the symbol is found.
339
340 WHERE determines whether the symbol goes in the list of static or global
341 partial symbols.
342
343 COREADDR is the address of the symbol. For partial symbols that don't have
344 an address, zero is passed.
345
346 LANGUAGE is the language from which the symbol originates. This will
347 influence, amongst other things, how the symbol name is demangled. */
348
349 void add_psymbol (gdb::string_view name,
350 bool copy_name, domain_enum domain,
351 enum address_class theclass,
352 short section,
353 psymbol_placement where,
354 unrelocated_addr coreaddr,
355 enum language language,
356 psymtab_storage *partial_symtabs,
357 struct objfile *objfile);
358
359 /* Add a symbol to this partial symbol table of OBJFILE. The psymbol
360 must be fully constructed, and the names must be set and intern'd
361 as appropriate. */
362
363 void add_psymbol (const partial_symbol &psym,
364 psymbol_placement where,
365 psymtab_storage *partial_symtabs,
366 struct objfile *objfile);
367
368
369 /* Indicate that this partial symtab is complete. */
370
371 void end ();
372
373 /* Chain of all existing partial symtabs. */
374
375 struct partial_symtab *next = nullptr;
376
377 /* Name of the source file which this partial_symtab defines,
378 or if the psymtab is anonymous then a descriptive name for
379 debugging purposes, or "". It must not be NULL. */
380
381 const char *filename = nullptr;
382
383 /* Full path of the source file. NULL if not known. */
384
385 char *fullname = nullptr;
386
387 /* Directory in which it was compiled, or NULL if we don't know. */
388
389 const char *dirname = nullptr;
390
391 /* Range of text addresses covered by this file; texthigh is the
392 beginning of the next section. Do not refer directly to these
393 fields. Instead, use the accessors. The validity of these
394 fields is determined by the text_low_valid and text_high_valid
395 fields; these are located later in this structure for better
396 packing. */
397
398 unrelocated_addr m_text_low {};
399 unrelocated_addr m_text_high {};
400
401 /* If NULL, this is an ordinary partial symbol table.
402
403 If non-NULL, this holds a single includer of this partial symbol
404 table, and this partial symbol table is a shared one.
405
406 A shared psymtab is one that is referenced by multiple other
407 psymtabs, and which conceptually has its contents directly
408 included in those.
409
410 Shared psymtabs have special semantics. When a search finds a
411 symbol in a shared table, we instead return one of the non-shared
412 tables that include this one.
413
414 A shared psymtabs can be referred to by other shared ones.
415
416 The psymtabs that refer to a shared psymtab will list the shared
417 psymtab in their 'dependencies' array.
418
419 In DWARF terms, a shared psymtab is a DW_TAG_partial_unit; but
420 of course using a name based on that would be too confusing, so
421 "shared" was chosen instead.
422
423 Only a single user is needed because, when expanding a shared
424 psymtab, we only need to expand its "canonical" non-shared user.
425 The choice of which one should be canonical is left to the
426 debuginfo reader; it can be arbitrary. */
427
428 struct partial_symtab *user = nullptr;
429
430 /* Array of pointers to all of the partial_symtab's which this one
431 depends on. Since this array can only be set to previous or
432 the current (?) psymtab, this dependency tree is guaranteed not
433 to have any loops. "depends on" means that symbols must be read
434 for the dependencies before being read for this psymtab; this is
435 for type references in stabs, where if foo.c includes foo.h, declarations
436 in foo.h may use type numbers defined in foo.c. For other debugging
437 formats there may be no need to use dependencies. */
438
439 struct partial_symtab **dependencies = nullptr;
440
442
443 /* Global symbol list. This list will be sorted after readin to
444 improve access. Binary search will be the usual method of
445 finding a symbol within it. */
446
447 std::vector<partial_symbol *> global_psymbols;
448
449 /* Static symbol list. This list will *not* be sorted after readin;
450 to find a symbol in it, exhaustive search must be used. This is
451 reasonable because searches through this list will eventually
452 lead to either the read in of a files symbols for real (assumed
453 to take a *lot* of time; check) or an error (and we don't care
454 how long errors take). */
455
456 std::vector<partial_symbol *> static_psymbols;
457
458 /* True if the name of this partial symtab is not a source file name. */
459
460 bool anonymous = false;
461
462 /* A flag that is temporarily used when searching psymtabs. */
463
465
466 /* Validity of the m_text_low and m_text_high fields. */
467
468 unsigned int text_low_valid : 1;
469 unsigned int text_high_valid : 1;
470};
471
472/* A partial symtab that tracks the "readin" and "compunit_symtab"
473 information in the ordinary way -- by storing it directly in this
474 object. */
476{
478 psymtab_storage *partial_symtabs,
479 objfile_per_bfd_storage *objfile_per_bfd)
480 : partial_symtab (filename, partial_symtabs, objfile_per_bfd)
481 {
482 }
483
485 psymtab_storage *partial_symtabs,
486 objfile_per_bfd_storage *objfile_per_bfd,
487 unrelocated_addr addr)
488 : partial_symtab (filename, partial_symtabs, objfile_per_bfd, addr)
489 {
490 }
491
492 bool readin_p (struct objfile *) const override
493 {
494 return readin;
495 }
496
497 struct compunit_symtab *get_compunit_symtab (struct objfile *) const override
498 {
499 return compunit_symtab;
500 }
501
502 /* True if the symtab corresponding to this psymtab has been
503 readin. */
504
505 bool readin = false;
506
507 /* Pointer to compunit eventually allocated for this source file, 0 if
508 !readin or if we haven't looked for the symtab after it was readin. */
509
511};
512
513/* A partial_symtab that works in the historical db way. This should
514 not be used in new code, but exists to transition the somewhat
515 unmaintained "legacy" debug formats. */
516
518{
520 psymtab_storage *partial_symtabs,
521 objfile_per_bfd_storage *objfile_per_bfd)
522 : standard_psymtab (filename, partial_symtabs, objfile_per_bfd)
523 {
524 }
525
527 psymtab_storage *partial_symtabs,
528 objfile_per_bfd_storage *objfile_per_bfd,
529 unrelocated_addr addr)
530 : standard_psymtab (filename, partial_symtabs, objfile_per_bfd, addr)
531 {
532 }
533
534 void read_symtab (struct objfile *objf) override
535 {
537 (*legacy_read_symtab) (this, objf);
538 }
539
540 void expand_psymtab (struct objfile *objf) override
541 {
542 (*legacy_expand_psymtab) (this, objf);
543 }
544
545 /* Pointer to function which will read in the symtab corresponding to
546 this psymtab. */
547
548 void (*legacy_read_symtab) (legacy_psymtab *, struct objfile *) = nullptr;
549
550 /* Pointer to function which will actually expand this psymtab into
551 a full symtab. */
552
553 void (*legacy_expand_psymtab) (legacy_psymtab *, struct objfile *) = nullptr;
554
555 /* Information that lets read_symtab() locate the part of the symbol table
556 that this psymtab corresponds to. This information is private to the
557 format-dependent symbol reading routines. For further detail examine
558 the various symbol reading modules. */
559
560 void *read_symtab_private = nullptr;
561};
562
563/* Used when recording partial symbol tables. On destruction,
564 discards any partial symbol tables that have been built. However,
565 the tables can be kept by calling the "keep" method. */
567{
568 public:
569
571 : m_partial_symtabs (partial_symtabs),
572 m_psymtab (partial_symtabs->psymtabs)
573 {
574 }
575
581
582 /* Keep any partial symbol tables that were built. */
583 void keep ()
584 {
585 m_partial_symtabs = nullptr;
586 }
587
588 private:
589
590 /* The partial symbol storage object. */
592 /* How far back to free. */
594};
595
596/* An implementation of quick_symbol_functions, specialized for
597 partial symbols. */
599{
600 explicit psymbol_functions (const std::shared_ptr<psymtab_storage> &storage)
601 : m_partial_symtabs (storage)
602 {
603 }
604
609
610 bool has_symbols (struct objfile *objfile) override;
611
612 bool has_unexpanded_symtabs (struct objfile *objfile) override;
613
614 struct symtab *find_last_source_symtab (struct objfile *objfile) override;
615
616 void forget_cached_source_info (struct objfile *objfile) override;
617
619 const char *name,
620 domain_enum domain,
621 bool *symbol_found_p) override;
622
623 void print_stats (struct objfile *objfile, bool print_bcache) override;
624
625 void dump (struct objfile *objfile) override;
626
627 void expand_all_symtabs (struct objfile *objfile) override;
628
630 (struct objfile *,
631 const lookup_name_info &lookup_name,
632 domain_enum domain,
633 int global,
634 symbol_compare_ftype *ordered_compare) override;
635
637 (struct objfile *objfile,
638 gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
639 const lookup_name_info *lookup_name,
640 gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
641 gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
642 block_search_flags search_flags,
643 domain_enum domain,
644 enum search_domain kind) override;
645
647 (struct objfile *objfile, struct bound_minimal_symbol msymbol,
648 CORE_ADDR pc, struct obj_section *section, int warn_if_readin) override;
649
651 (struct objfile *objfile, CORE_ADDR address) override
652 {
653 return nullptr;
654 }
655
657 gdb::function_view<symbol_filename_ftype> fun,
658 bool need_fullname) override;
659
660 /* Return a range adapter for the psymtabs. */
662 (struct objfile *objfile);
663
664 /* Return the partial symbol storage associated with this
665 object. */
666 const std::shared_ptr<psymtab_storage> &get_partial_symtabs () const
667 {
668 return m_partial_symtabs;
669 }
670
671 /* Replace the partial symbol table storage in this object with
672 SYMS. */
673 void set_partial_symtabs (const std::shared_ptr<psymtab_storage> &syms)
674 {
675 m_partial_symtabs = syms;
676 }
677
678 /* Find which partial symtab contains PC and SECTION. Return NULL if
679 none. We return the psymtab that contains a symbol whose address
680 exactly matches PC, or, if we cannot find an exact match, the
681 psymtab that contains a symbol whose address is closest to PC. */
682
684 (struct objfile *objfile,
685 CORE_ADDR pc,
686 struct obj_section *section,
687 struct bound_minimal_symbol msymbol);
688
689private:
690
691 /* Count the number of partial symbols in *THIS. */
692 int count_psyms ();
693
694 /* Storage for the partial symbols. */
695 std::shared_ptr<psymtab_storage> m_partial_symtabs;
696};
697
698#endif /* PSYMTAB_H */
const char *const name
psymtab_storage * m_partial_symtabs
Definition psymtab.h:591
struct partial_symtab * m_psymtab
Definition psymtab.h:593
psymtab_discarder(psymtab_storage *partial_symtabs)
Definition psymtab.h:570
struct partial_symtab * psymtabs
Definition psymtab.h:122
gdb::optional< auto_obstack > m_obstack
Definition psymtab.h:134
void discard_psymtab(struct partial_symtab *pst)
Definition psymtab.c:1295
psymtab_storage()=default
DISABLE_COPY_AND_ASSIGN(psymtab_storage)
partial_symtab_range range()
Definition psymtab.h:112
void install_psymtab(partial_symtab *pst)
Definition psymtab.c:71
struct partial_symtab ** allocate_dependencies(int number)
Definition psymtab.h:97
void discard_psymtabs_to(struct partial_symtab *to)
Definition psymtab.h:75
next_range< partial_symtab > partial_symtab_range
Definition psymtab.h:107
struct obstack * obstack()
Definition psymtab.h:87
psymbol_bcache psymbol_cache
Definition psymtab.h:127
language
Definition defs.h:211
std::string copy_name(struct stoken token)
Definition parse.c:319
psymtab_search_status
Definition psymtab.h:198
@ PST_NOT_SEARCHED
Definition psymtab.h:199
@ PST_SEARCHED_AND_NOT_FOUND
Definition psymtab.h:201
@ PST_SEARCHED_AND_FOUND
Definition psymtab.h:200
psymbol_placement
Definition psymtab.h:208
int symbol_compare_ftype(const char *string1, const char *string2)
void forget_cached_source_info(void)
Definition source.c:417
void set_unrelocated_address(unrelocated_addr addr)
Definition symtab.h:534
short section_index() const
Definition symtab.h:621
struct obj_section * obj_section(const struct objfile *objfile) const
Definition symtab.c:1117
unrelocated_addr unrelocated_address() const
Definition symtab.h:528
legacy_psymtab(const char *filename, psymtab_storage *partial_symtabs, objfile_per_bfd_storage *objfile_per_bfd)
Definition psymtab.h:519
void expand_psymtab(struct objfile *objf) override
Definition psymtab.h:540
void * read_symtab_private
Definition psymtab.h:560
void read_symtab(struct objfile *objf) override
Definition psymtab.h:534
legacy_psymtab(const char *filename, psymtab_storage *partial_symtabs, objfile_per_bfd_storage *objfile_per_bfd, unrelocated_addr addr)
Definition psymtab.h:526
void(* legacy_expand_psymtab)(legacy_psymtab *, struct objfile *)
Definition psymtab.h:553
void(* legacy_read_symtab)(legacy_psymtab *, struct objfile *)
Definition psymtab.h:548
CORE_ADDR text_section_offset() const
Definition objfiles.h:482
::section_offsets section_offsets
Definition objfiles.h:786
void set_unrelocated_address(unrelocated_addr addr)
Definition psymtab.h:172
struct obj_section * obj_section(struct objfile *objfile) const
Definition psymtab.h:151
__extension__ enum domain_enum domain
Definition psymtab.h:184
unrelocated_addr unrelocated_address() const
Definition psymtab.h:157
CORE_ADDR address(const struct objfile *objfile) const
Definition psymtab.h:164
struct general_symbol_info ginfo
Definition psymtab.h:180
__extension__ enum address_class aclass
Definition psymtab.h:190
struct partial_symtab * user
Definition psymtab.h:428
virtual struct compunit_symtab * get_compunit_symtab(struct objfile *) const =0
struct partial_symtab ** dependencies
Definition psymtab.h:439
unsigned int text_low_valid
Definition psymtab.h:468
std::vector< partial_symbol * > static_psymbols
Definition psymtab.h:456
virtual ~partial_symtab()
Definition psymtab.h:246
unrelocated_addr unrelocated_text_low() const
Definition psymtab.h:286
unsigned int text_high_valid
Definition psymtab.h:469
unrelocated_addr m_text_low
Definition psymtab.h:398
partial_symtab(const char *filename, psymtab_storage *partial_symtabs, objfile_per_bfd_storage *objfile_per_bfd) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
Definition psymtab.c:1236
const char * dirname
Definition psymtab.h:389
__extension__ enum psymtab_search_status searched_flag
Definition psymtab.h:464
unrelocated_addr unrelocated_text_high() const
Definition psymtab.h:293
unrelocated_addr m_text_high
Definition psymtab.h:399
const char * filename
Definition psymtab.h:381
virtual bool readin_p(struct objfile *) const =0
void set_text_high(unrelocated_addr addr)
Definition psymtab.h:318
virtual void expand_psymtab(struct objfile *)=0
std::vector< partial_symbol * > global_psymbols
Definition psymtab.h:447
int number_of_dependencies
Definition psymtab.h:441
virtual void read_symtab(struct objfile *)=0
CORE_ADDR text_high(struct objfile *objfile) const
Definition psymtab.h:305
void expand_dependencies(struct objfile *)
Definition psymtab.c:1271
void set_text_low(unrelocated_addr addr)
Definition psymtab.h:311
void add_psymbol(gdb::string_view name, bool copy_name, domain_enum domain, enum address_class theclass, short section, psymbol_placement where, unrelocated_addr coreaddr, enum language language, psymtab_storage *partial_symtabs, struct objfile *objfile)
Definition psymtab.c:1211
bool empty() const
Definition psymtab.h:326
CORE_ADDR text_low(struct objfile *objfile) const
Definition psymtab.h:299
char * fullname
Definition psymtab.h:385
unsigned long hash(const void *addr, int length) override
Definition psymtab.c:1142
int compare(const void *left, const void *right, int length) override
Definition psymtab.c:1164
enum language lookup_global_symbol_language(struct objfile *objfile, const char *name, domain_enum domain, bool *symbol_found_p) override
Definition psymtab.c:281
struct compunit_symtab * find_pc_sect_compunit_symtab(struct objfile *objfile, struct bound_minimal_symbol msymbol, CORE_ADDR pc, struct obj_section *section, int warn_if_readin) override
Definition psymtab.c:190
void dump(struct objfile *objfile) override
Definition psymtab.c:793
psymbol_functions(const std::shared_ptr< psymtab_storage > &storage)
Definition psymtab.h:600
const std::shared_ptr< psymtab_storage > & get_partial_symtabs() const
Definition psymtab.h:666
void print_stats(struct objfile *objfile, bool print_bcache) override
Definition psymtab.c:759
void expand_matching_symbols(struct objfile *, const lookup_name_info &lookup_name, domain_enum domain, int global, symbol_compare_ftype *ordered_compare) override
Definition psymtab.c:885
void expand_all_symtabs(struct objfile *objfile) override
Definition psymtab.c:814
psymtab_storage::partial_symtab_range partial_symbols(struct objfile *objfile)
Definition psymtab.c:82
void map_symbol_filenames(struct objfile *objfile, gdb::function_view< symbol_filename_ftype > fun, bool need_fullname) override
Definition psymtab.c:825
void set_partial_symtabs(const std::shared_ptr< psymtab_storage > &syms)
Definition psymtab.h:673
struct symtab * find_last_source_symtab(struct objfile *objfile) override
Definition psymtab.c:537
std::shared_ptr< psymtab_storage > m_partial_symtabs
Definition psymtab.h:695
bool has_unexpanded_symtabs(struct objfile *objfile) override
Definition psymtab.c:1091
struct partial_symtab * find_pc_sect_psymtab(struct objfile *objfile, CORE_ADDR pc, struct obj_section *section, struct bound_minimal_symbol msymbol)
Definition psymtab.c:166
bool expand_symtabs_matching(struct objfile *objfile, 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) override
Definition psymtab.c:1015
bool has_symbols(struct objfile *objfile) override
Definition psymtab.c:1083
struct compunit_symtab * find_compunit_symtab_by_address(struct objfile *objfile, CORE_ADDR address) override
Definition psymtab.h:651
struct compunit_symtab * compunit_symtab
Definition psymtab.h:510
struct compunit_symtab * get_compunit_symtab(struct objfile *) const override
Definition psymtab.h:497
standard_psymtab(const char *filename, psymtab_storage *partial_symtabs, objfile_per_bfd_storage *objfile_per_bfd)
Definition psymtab.h:477
standard_psymtab(const char *filename, psymtab_storage *partial_symtabs, objfile_per_bfd_storage *objfile_per_bfd, unrelocated_addr addr)
Definition psymtab.h:484
bool readin_p(struct objfile *) const override
Definition psymtab.h:492
#define SYMBOL_DOMAIN_BITS
Definition symtab.h:936
search_domain
Definition symtab.h:945
address_class
Definition symtab.h:968
#define SYMBOL_ACLASS_BITS
Definition symtab.h:1082
domain_enum
Definition symtab.h:900