20#if !defined (OBJFILES_H)
24#include "gdbsupport/gdb_obstack.h"
34#include "gdbsupport/next-iterator.h"
35#include "gdbsupport/safe-iterator.h"
38#include "gdbsupport/refcounted-object.h"
41#include <forward_list>
130#define ALL_OBJFILE_OSECTIONS(objfile, osect) \
131 for (osect = objfile->sections; osect < objfile->sections_end; osect++) \
132 if (osect->the_bfd_section == NULL) \
138#define SECT_OFF_DATA(objfile) \
139 ((objfile->sect_index_data == -1) \
140 ? (internal_error (_("sect_index_data not initialized")), -1) \
141 : objfile->sect_index_data)
143#define SECT_OFF_RODATA(objfile) \
144 ((objfile->sect_index_rodata == -1) \
145 ? (internal_error (_("sect_index_rodata not initialized")), -1) \
146 : objfile->sect_index_rodata)
148#define SECT_OFF_TEXT(objfile) \
149 ((objfile->sect_index_text == -1) \
150 ? (internal_error (_("sect_index_text not initialized")), -1) \
151 : objfile->sect_index_text)
156#define SECT_OFF_BSS(objfile) (objfile)->sect_index_bss
178#define OBJSTAT(objfile, expr) (objfile -> stats.expr)
179#define OBJSTATS struct objstats stats
183#define MINIMAL_SYMBOL_HASH_SIZE 2039
251 const char *
intern (
const std::string &str)
415 objfile_flags flags_,
objfile *parent =
nullptr);
476 const char *
intern (
const std::string &str)
516 (
const char *
name,
const char *real_path,
517 gdb::function_view<
bool (
symtab *)> callback);
560 (gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
562 gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
563 gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
564 block_search_flags search_flags,
585 bool *symbol_found_p);
595 gdb_assert (section->owner ==
nullptr || section->owner == this->obfd);
606 gdb_assert (section->owner ==
nullptr || section->owner == this->obfd);
616 const std::forward_list<quick_symbol_functions_up> &
685 std::forward_list<quick_symbol_functions_up>
qf;
separate_debug_iterator & operator++()
bool operator!=(const separate_debug_iterator &other)
struct objfile * m_objfile
separate_debug_iterator(struct objfile *objfile)
struct objfile * m_parent
struct objfile * operator*()
int gdb_bfd_section_index(bfd *abfd, asection *section)
gdb::ref_ptr< struct bfd, gdb_bfd_ref_policy > gdb_bfd_ref_ptr
gdb::function_view< bool(objfile *)> iterate_over_objfiles_in_search_order_cb_ftype
const char * objfile_flavour_name(struct objfile *objfile)
int objfile_has_full_symbols(struct objfile *objfile)
void objfiles_changed(void)
void set_objfile_main_name(struct objfile *objfile, const char *name, enum language lang)
#define MINIMAL_SYMBOL_HASH_SIZE
bool shared_objfile_contains_address_p(struct program_space *pspace, CORE_ADDR address)
const char * objfile_debug_name(const struct objfile *objfile)
void build_objfile_section_table(struct objfile *)
void objfile_rebase(struct objfile *, CORE_ADDR)
#define SECT_OFF_DATA(objfile)
int objfile_has_symbols(struct objfile *objfile)
void objfile_purge_solibs(void)
void default_iterate_over_objfiles_in_search_order(gdbarch *gdbarch, iterate_over_objfiles_in_search_order_cb_ftype cb, objfile *current_objfile)
int have_minimal_symbols(void)
struct type * objfile_int_type(struct objfile *of, int size_in_bytes, bool unsigned_p)
void objfile_set_sym_fns(struct objfile *objfile, const struct sym_fns *sf)
void print_objfile_statistics(void)
scoped_restore_tmpl< int > inhibit_section_map_updates(struct program_space *pspace)
#define SECT_OFF_TEXT(objfile)
struct obj_section * find_pc_section(CORE_ADDR pc)
const struct dynamic_prop * objfile_lookup_static_link(struct objfile *objfile, const struct block *block)
bool is_addr_in_objfile(CORE_ADDR addr, const struct objfile *objfile)
void set_objfile_per_bfd(struct objfile *obj)
CORE_ADDR entry_point_address(void)
std::unique_ptr< objfile, objfile_deleter > objfile_up
int have_partial_symbols(void)
int entry_point_address_query(CORE_ADDR *entry_p)
iterator_range< separate_debug_iterator > separate_debug_range
const char * objfile_name(const struct objfile *objfile)
void objfile_relocate(struct objfile *, const section_offsets &)
int pc_in_section(CORE_ADDR, const char *)
static int in_plt_section(CORE_ADDR pc)
const char * objfile_filename(const struct objfile *objfile)
int have_full_symbols(void)
void free_objfile_separate_debug(struct objfile *)
void objfile_register_static_link(struct objfile *objfile, const struct block *block, const struct dynamic_prop *static_link)
int() symbol_compare_ftype(const char *string1, const char *string2)
int the_bfd_section_index
const void * insert(const void *addr, int length, bool *added=nullptr)
bool operator!=(const self_type &other) const
struct minimal_symbol * value_type
struct minimal_symbol *& reference
struct minimal_symbol * m_msym
value_type operator*() const
minimal_symbol_iterator self_type
std::forward_iterator_tag iterator_category
bool operator==(const self_type &other) const
minimal_symbol_iterator(struct minimal_symbol *msym)
struct minimal_symbol ** pointer
CORE_ADDR endaddr() const
void set_offset(CORE_ADDR offset)
struct bfd_section * the_bfd_section
void operator()(objfile *ptr) const
objfile_per_bfd_storage(bfd *bfd)
htab_up demangled_names_hash
const char * intern(const std::string &str)
const char * intern(const char *str)
minimal_symbol * msymbol_hash[MINIMAL_SYMBOL_HASH_SIZE]
enum language language_of_main
auto_obstack storage_obstack
~objfile_per_bfd_storage()
minimal_symbol * msymbol_demangled_hash[MINIMAL_SYMBOL_HASH_SIZE]
std::bitset< nr_languages > demangled_hash_languages
const char * name_of_main
gdb::unique_xmalloc_ptr< minimal_symbol > msymbols
void forget_cached_source_info()
const char * original_name
const struct sym_fns * sf
struct obj_section * sections_end
struct compunit_symtab * compunit_symtabs
std::unique_ptr< jiter_objfile_data > jiter_data
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_link
CORE_ADDR section_offset(bfd_section *section) const
void set_section_offset(bfd_section *section, CORE_ADDR offset)
struct objfile * separate_debug_objfile
registry< objfile > registry_fields
void expand_symtabs_with_fullname(const char *fullname)
struct symtab * find_last_source_symtab()
void expand_symtabs_for_function(const char *func_name)
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)
static objfile * make(gdb_bfd_ref_ptr bfd_, const char *name_, objfile_flags flags_, objfile *parent=nullptr)
void print_stats(bool print_bcache)
bool map_symtabs_matching_filename(const char *name, const char *real_path, gdb::function_view< bool(symtab *)> callback)
struct obj_section * sections
CORE_ADDR text_section_offset() const
void expand_all_symtabs()
std::unique_ptr< jited_objfile_data > jited_data
void require_partial_symbols(bool verbose)
const char * intern(const char *str)
compunit_symtab_range compunits()
std::unique_ptr< objfile_per_bfd_storage > per_bfd_storage
bool has_unexpanded_symtabs()
bool skip_jit_symbol_lookup
auto_obstack objfile_obstack
std::forward_list< quick_symbol_functions_up > qf
DISABLE_COPY_AND_ASSIGN(objfile)
separate_debug_range separate_debug_objfiles()
CORE_ADDR data_section_offset() const
struct symbol * template_symbols
iterator_range< minimal_symbol_iterator > msymbols_range
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)
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()
const char * intern(const std::string &str)
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()
msymbols_range msymbols()
next_range< compunit_symtab > compunit_symtab_range
std::vector< CORE_ADDR > section_offsets