20 #if !defined (OBJFILES_H)
131 #define obj_section_offset(s) \
132 (((s)->objfile->section_offsets)->offsets[gdb_bfd_section_index ((s)->objfile->obfd, (s)->the_bfd_section)])
135 #define obj_section_addr(s) \
136 (bfd_get_section_vma ((s)->objfile->obfd, s->the_bfd_section) \
137 + obj_section_offset (s))
141 #define obj_section_endaddr(s) \
142 (bfd_get_section_vma ((s)->objfile->obfd, s->the_bfd_section) \
143 + bfd_get_section_size ((s)->the_bfd_section) \
144 + obj_section_offset (s))
160 #define OBJSTAT(objfile, expr) (objfile -> stats.expr)
161 #define OBJSTATS struct objstats stats
166 #define MINIMAL_SYMBOL_HASH_SIZE 2039
425 #define OBJF_REORDERED (1 << 0)
432 #define OBJF_SHARED (1 << 1)
436 #define OBJF_READNOW (1 << 2)
445 #define OBJF_USERLOADED (1 << 3)
450 #define OBJF_PSYMTABS_READ (1 << 4)
455 #define OBJF_MAINLINE (1 << 5)
460 #define OBJF_NOT_FILENAME (1 << 6)
567 void *cb_data,
struct objfile *current_objfile);
576 #define ALL_PSPACE_OBJFILES(ss, obj) \
577 for ((obj) = ss->objfiles; (obj) != NULL; (obj) = (obj)->next)
579 #define ALL_OBJFILES(obj) \
580 for ((obj) = current_program_space->objfiles; \
584 #define ALL_OBJFILES_SAFE(obj,nxt) \
585 for ((obj) = current_program_space->objfiles; \
586 (obj) != NULL? ((nxt)=(obj)->next,1) :0; \
591 #define ALL_OBJFILE_FILETABS(objfile, cu, s) \
592 ALL_OBJFILE_COMPUNITS (objfile, cu) \
593 ALL_COMPUNIT_FILETABS (cu, s)
597 #define ALL_OBJFILE_COMPUNITS(objfile, cu) \
598 for ((cu) = (objfile) -> compunit_symtabs; (cu) != NULL; (cu) = (cu) -> next)
602 #define ALL_OBJFILE_MSYMBOLS(objfile, m) \
603 for ((m) = (objfile)->per_bfd->msymbols; \
604 MSYMBOL_LINKAGE_NAME (m) != NULL; \
610 #define ALL_FILETABS(objfile, ps, s) \
611 ALL_OBJFILES (objfile) \
612 ALL_OBJFILE_FILETABS (objfile, ps, s)
616 #define ALL_COMPUNITS(objfile, cu) \
617 ALL_OBJFILES (objfile) \
618 ALL_OBJFILE_COMPUNITS (objfile, cu)
623 #define ALL_MSYMBOLS(objfile, m) \
624 ALL_OBJFILES (objfile) \
625 ALL_OBJFILE_MSYMBOLS (objfile, m)
627 #define ALL_OBJFILE_OSECTIONS(objfile, osect) \
628 for (osect = objfile->sections; osect < objfile->sections_end; osect++) \
629 if (osect->the_bfd_section == NULL) \
660 #define ALL_OBJSECTIONS(objfile, osect) \
661 for ((objfile) = current_program_space->objfiles, \
662 (objfile) != NULL ? ((osect) = (objfile)->sections_end) : 0; \
664 && (osect) == (objfile)->sections_end; \
665 ((osect) == (objfile)->sections_end \
666 ? ((objfile) = (objfile)->next, \
667 (objfile) != NULL ? (osect) = (objfile)->sections_end : 0) \
669 ALL_OBJFILE_OSECTIONS (objfile, osect)
671 #define SECT_OFF_DATA(objfile) \
672 ((objfile->sect_index_data == -1) \
673 ? (internal_error (__FILE__, __LINE__, \
674 _("sect_index_data not initialized")), -1) \
675 : objfile->sect_index_data)
677 #define SECT_OFF_RODATA(objfile) \
678 ((objfile->sect_index_rodata == -1) \
679 ? (internal_error (__FILE__, __LINE__, \
680 _("sect_index_rodata not initialized")), -1) \
681 : objfile->sect_index_rodata)
683 #define SECT_OFF_TEXT(objfile) \
684 ((objfile->sect_index_text == -1) \
685 ? (internal_error (__FILE__, __LINE__, \
686 _("sect_index_text not initialized")), -1) \
687 : objfile->sect_index_text)
692 #define SECT_OFF_BSS(objfile) (objfile)->sect_index_bss
696 #define MULTI_OBJFILE_P() (object_files && object_files->next)
struct psymbol_allocation_list static_psymbols
struct minimal_symbol * msymbols
void build_objfile_section_table(struct objfile *)
struct htab * demangled_names_hash
void objfile_set_sym_fns(struct objfile *objfile, const struct sym_fns *sf)
void objfile_purge_solibs(void)
struct obstack storage_obstack
struct objfile * allocate_objfile(bfd *, const char *name, int)
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 psymbol_allocation_list global_psymbols
struct program_space * pspace
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
int objfile_has_symbols(struct objfile *objfile)
int objfile_has_full_symbols(struct objfile *objfile)
void free_objfile(struct 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 *)
struct obstack objfile_obstack
int is_addr_in_objfile(CORE_ADDR addr, const struct objfile *objfile)
int( iterate_over_objfiles_in_search_order_cb_ftype)(struct objfile *objfile, void *cb_data)
void objfile_rebase(struct objfile *, CORE_ADDR)
void set_objfile_main_name(struct objfile *objfile, const char *name, enum language lang)
const char * objfile_name(const struct objfile *objfile)
struct cleanup * make_cleanup_free_objfile(struct objfile *)
const struct sym_fns * sf
struct obj_section * sections
void inhibit_section_map_updates(struct program_space *pspace)
int shared_objfile_contains_address_p(struct program_space *pspace, CORE_ADDR address)
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)
int entry_point_address_query(CORE_ADDR *entry_p)
struct bcache * macro_cache
struct objfile * separate_debug_objfile_link
void add_separate_debug_objfile(struct objfile *, struct objfile *)
struct bcache * filename_cache
unsigned int minsyms_read
struct gdbarch * get_objfile_arch(const struct objfile *)
const char * name_of_main
const char * objfile_debug_name(const struct objfile *objfile)
DECLARE_REGISTRY(objfile)
struct obj_section * find_pc_section(CORE_ADDR pc)
struct obj_section * sections_end
static int in_plt_section(CORE_ADDR pc)
void print_objfile_statistics(void)
int pc_in_section(CORE_ADDR, char *)
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 terminate_minimal_symbol_table(struct objfile *objfile)
struct minimal_symbol * msymbol_hash[MINIMAL_SYMBOL_HASH_SIZE]
void resume_section_map_updates(struct program_space *pspace)
struct section_offsets * section_offsets
struct minimal_symbol * msymbol_demangled_hash[MINIMAL_SYMBOL_HASH_SIZE]
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)
void objfile_relocate(struct objfile *, const struct section_offsets *)
struct partial_symtab * psymtabs
void print_symbol_bcache_statistics(void)