20#if !defined (OBJFILES_H)
24#include "gdbsupport/gdb_obstack.h"
33#include "gdbsupport/next-iterator.h"
34#include "gdbsupport/safe-iterator.h"
37#include "gdbsupport/refcounted-object.h"
40#include <forward_list>
129#define SECT_OFF_DATA(objfile) \
130 ((objfile->sect_index_data == -1) \
131 ? (internal_error (_("sect_index_data not initialized")), -1) \
132 : objfile->sect_index_data)
134#define SECT_OFF_RODATA(objfile) \
135 ((objfile->sect_index_rodata == -1) \
136 ? (internal_error (_("sect_index_rodata not initialized")), -1) \
137 : objfile->sect_index_rodata)
139#define SECT_OFF_TEXT(objfile) \
140 ((objfile->sect_index_text == -1) \
141 ? (internal_error (_("sect_index_text not initialized")), -1) \
142 : objfile->sect_index_text)
147#define SECT_OFF_BSS(objfile) (objfile)->sect_index_bss
169#define OBJSTAT(objfile, expr) (objfile -> stats.expr)
170#define OBJSTATS struct objstats stats
174#define MINIMAL_SYMBOL_HASH_SIZE 2039
242 const char *
intern (
const std::string &str)
379 CORE_ADDR
offset ()
const;
440 objfile_flags flags_,
objfile *parent =
nullptr);
501 const char *
intern (
const std::string &str)
541 (
const char *
name,
const char *real_path,
542 gdb::function_view<
bool (
symtab *)> callback);
585 (gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
587 gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
588 gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
589 block_search_flags search_flags,
610 bool *symbol_found_p);
620 gdb_assert (section->owner ==
nullptr || section->owner == this->obfd);
631 gdb_assert (section->owner ==
nullptr || section->owner == this->obfd);
662 {
return !(*
this == other); }
677 while (m_iter < m_end && m_iter->the_bfd_section ==
nullptr)
687 return (iterator_range<section_iterator>
694 return (iterator_range<section_iterator>
703 const std::forward_list<quick_symbol_functions_up> &
772 std::forward_list<quick_symbol_functions_up>
qf;
bool operator==(const section_iterator &other) const
section_iterator(obj_section *iter, obj_section *end)
section_iterator & operator++()
section_iterator self_type
bool operator!=(const section_iterator &other) const
section_iterator(const section_iterator &)=default
section_iterator(section_iterator &&)=default
section_iterator & operator=(const section_iterator &)=default
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)
bool pc_in_section(CORE_ADDR, const char *)
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 &)
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
struct obj_section * sections_start
void forget_cached_source_info()
const char * original_name
iterator_range< section_iterator > sections()
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)
bool object_format_has_copy_relocs
void print_stats(bool print_bcache)
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
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)
iterator_range< section_iterator > sections() const
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