20 #if !defined (OBJFILES_H) 136 #define obj_section_offset(s) \ 137 (((s)->objfile->section_offsets)->offsets[gdb_bfd_section_index ((s)->objfile->obfd, (s)->the_bfd_section)]) 140 #define obj_section_addr(s) \ 141 (bfd_get_section_vma ((s)->objfile->obfd, s->the_bfd_section) \ 142 + obj_section_offset (s)) 146 #define obj_section_endaddr(s) \ 147 (bfd_get_section_vma ((s)->objfile->obfd, s->the_bfd_section) \ 148 + bfd_get_section_size ((s)->the_bfd_section) \ 149 + obj_section_offset (s)) 174 #define OBJSTAT(objfile, expr) (objfile -> stats.expr) 175 #define OBJSTATS struct objstats stats 180 #define MINIMAL_SYMBOL_HASH_SIZE 2039 288 objfile (bfd *,
const char *, objfile_flags);
570 void *cb_data,
struct objfile *current_objfile);
579 #define ALL_PSPACE_OBJFILES(ss, obj) \ 580 for ((obj) = ss->objfiles; (obj) != NULL; (obj) = (obj)->next) 582 #define ALL_OBJFILES(obj) \ 583 for ((obj) = current_program_space->objfiles; \ 587 #define ALL_OBJFILES_SAFE(obj,nxt) \ 588 for ((obj) = current_program_space->objfiles; \ 589 (obj) != NULL? ((nxt)=(obj)->next,1) :0; \ 594 #define ALL_OBJFILE_FILETABS(objfile, cu, s) \ 595 ALL_OBJFILE_COMPUNITS (objfile, cu) \ 596 ALL_COMPUNIT_FILETABS (cu, s) 600 #define ALL_OBJFILE_COMPUNITS(objfile, cu) \ 601 for ((cu) = (objfile) -> compunit_symtabs; (cu) != NULL; (cu) = (cu) -> next) 605 #define ALL_OBJFILE_MSYMBOLS(objfile, m) \ 606 for ((m) = (objfile)->per_bfd->msymbols; \ 607 MSYMBOL_LINKAGE_NAME (m) != NULL; \ 613 #define ALL_FILETABS(objfile, ps, s) \ 614 ALL_OBJFILES (objfile) \ 615 ALL_OBJFILE_FILETABS (objfile, ps, s) 619 #define ALL_COMPUNITS(objfile, cu) \ 620 ALL_OBJFILES (objfile) \ 621 ALL_OBJFILE_COMPUNITS (objfile, cu) 626 #define ALL_MSYMBOLS(objfile, m) \ 627 ALL_OBJFILES (objfile) \ 628 ALL_OBJFILE_MSYMBOLS (objfile, m) 630 #define ALL_OBJFILE_OSECTIONS(objfile, osect) \ 631 for (osect = objfile->sections; osect < objfile->sections_end; osect++) \ 632 if (osect->the_bfd_section == NULL) \ 663 #define ALL_OBJSECTIONS(objfile, osect) \ 664 for ((objfile) = current_program_space->objfiles, \ 665 (objfile) != NULL ? ((osect) = (objfile)->sections_end) : 0; \ 667 && (osect) == (objfile)->sections_end; \ 668 ((osect) == (objfile)->sections_end \ 669 ? ((objfile) = (objfile)->next, \ 670 (objfile) != NULL ? (osect) = (objfile)->sections_end : 0) \ 672 ALL_OBJFILE_OSECTIONS (objfile, osect) 674 #define SECT_OFF_DATA(objfile) \ 675 ((objfile->sect_index_data == -1) \ 676 ? (internal_error (__FILE__, __LINE__, \ 677 _("sect_index_data not initialized")), -1) \ 678 : objfile->sect_index_data) 680 #define SECT_OFF_RODATA(objfile) \ 681 ((objfile->sect_index_rodata == -1) \ 682 ? (internal_error (__FILE__, __LINE__, \ 683 _("sect_index_rodata not initialized")), -1) \ 684 : objfile->sect_index_rodata) 686 #define SECT_OFF_TEXT(objfile) \ 687 ((objfile->sect_index_text == -1) \ 688 ? (internal_error (__FILE__, __LINE__, \ 689 _("sect_index_text not initialized")), -1) \ 690 : objfile->sect_index_text) 695 #define SECT_OFF_BSS(objfile) (objfile)->sect_index_bss 699 #define MULTI_OBJFILE_P() (object_files && object_files->next)
void build_objfile_section_table(struct objfile *)
void objfile_set_sym_fns(struct objfile *objfile, const struct sym_fns *sf)
void objfile_purge_solibs(void)
int have_partial_symbols(void)
void free_objfile_separate_debug(struct objfile *)
struct objfile * separate_debug_objfile_backlink
struct bfd_section * the_bfd_section
void unlink_objfile(struct objfile *)
struct program_space * pspace
minimal_symbol * msymbol_hash[MINIMAL_SYMBOL_HASH_SIZE]
void default_iterate_over_objfiles_in_search_order(struct gdbarch *gdbarch, iterate_over_objfiles_in_search_order_cb_ftype *cb, void *cb_data, struct objfile *current_objfile)
void objfiles_changed(void)
int have_minimal_symbols(void)
#define MINIMAL_SYMBOL_HASH_SIZE
const char * objfile_flavour_name(struct objfile *objfile)
int objfile_has_symbols(struct objfile *objfile)
int objfile_has_full_symbols(struct objfile *objfile)
struct objfile_per_bfd_storage * per_bfd
struct symbol * template_symbols
int objfile_has_partial_symbols(struct objfile *objfile)
struct objfile * objfile_separate_debug_iterate(const struct objfile *, const struct objfile *)
int is_addr_in_objfile(CORE_ADDR addr, const struct objfile *objfile)
void objfile_rebase(struct objfile *, CORE_ADDR)
minimal_symbol * msymbol_demangled_hash[MINIMAL_SYMBOL_HASH_SIZE]
minimal_symbol * msymbols
const struct dynamic_prop * objfile_lookup_static_link(struct objfile *objfile, const struct block *block)
std::vector< std::pair< CORE_ADDR, partial_symtab * > > psymbol_map
objfile(bfd *, const char *, objfile_flags)
void set_objfile_main_name(struct objfile *objfile, const char *name, enum language lang)
const char * objfile_name(const struct objfile *objfile)
const struct sym_fns * sf
struct obj_section * sections
void inhibit_section_map_updates(struct program_space *pspace)
std::vector< enum language > demangled_hash_languages
int shared_objfile_contains_address_p(struct program_space *pspace, CORE_ADDR address)
htab * demangled_names_hash
void free_all_objfiles(void)
struct objfile * separate_debug_objfile
struct compunit_symtab * compunit_symtabs
int have_full_symbols(void)
const char * objfile_filename(const struct objfile *objfile)
std::vector< partial_symbol * > static_psymbols
int entry_point_address_query(CORE_ADDR *entry_p)
struct objfile * separate_debug_objfile_link
void add_separate_debug_objfile(struct objfile *, struct objfile *)
int() iterate_over_objfiles_in_search_order_cb_ftype(struct objfile *objfile, void *cb_data)
struct gdbarch * get_objfile_arch(const struct objfile *)
objfile_per_bfd_storage()
const char * name_of_main
const char * objfile_debug_name(const struct objfile *objfile)
DISABLE_COPY_AND_ASSIGN(objfile)
DECLARE_REGISTRY(objfile)
struct obj_section * find_pc_section(CORE_ADDR pc)
std::vector< partial_symbol * > global_psymbols
static int in_plt_section(CORE_ADDR pc)
void print_objfile_statistics(void)
enum language language_of_main
struct partial_symtab * free_psymtabs
int the_bfd_section_index
void resume_section_map_updates_cleanup(void *arg)
struct addrmap * psymtabs_addrmap
void objfile_register_static_link(struct objfile *objfile, const struct block *block, const struct dynamic_prop *static_link)
auto_obstack storage_obstack
void resume_section_map_updates(struct program_space *pspace)
CORE_ADDR entry_point_address(void)
void put_objfile_before(struct objfile *, struct objfile *)
struct psymbol_bcache * psymbol_cache
void set_objfile_per_bfd(struct objfile *obj)
int pc_in_section(CORE_ADDR, const char *)
void objfile_relocate(struct objfile *, const struct section_offsets *)
struct partial_symtab * psymtabs
struct obj_section * sections_end
void print_symbol_bcache_statistics(void)