36 #include <sys/types.h> 180 storage->~objfile_per_bfd_storage ();
231 return htab_hash_pointer (e->
block);
275 *slot = (
void *) entry;
318 aflag = bfd_get_section_flags (abfd, asect);
319 if (!(aflag & SEC_ALLOC))
379 const char *expanded_name;
385 objfile_alloc_data (
this);
392 expanded_name =
"<<anonymous objfile>>";
396 expanded_name =
name;
400 expanded_name = name_holder.get ();
405 strlen (expanded_name));
414 mtime = bfd_get_mtime (abfd);
434 last_one = last_one->
next);
435 last_one->
next =
this;
474 error (
_(
"Entry point address is not known."));
529 for (objp = &
object_files; *objp != NULL; objp = &((*objp)->next))
531 if (*objp == before_this)
540 _(
"put_objfile_before: before objfile not in list"));
561 for (objpp = &
object_files; *objpp != NULL; objpp = &((*objpp)->next))
565 *objpp = (*objpp)->
next;
572 _(
"unlink_objfile: objfile already unlinked"));
678 objfile_free_data (
this);
786 int something_changed = 0;
793 something_changed = 1;
795 if (!something_changed)
812 for (i = 0; i < l->
nitems; ++i)
826 ANOFFSET (delta, block_line_section));
921 std::vector<struct section_offsets>
950 new_offsets->
offsets[i] = slide;
1103 if (sect1_addr < sect2_addr)
1105 else if (sect1_addr > sect2_addr)
1134 if (objfile1 == objfile2)
1144 else if (osect == sect2)
1197 const struct bfd_section *section)
1199 const bfd_vma lma = bfd_section_lma (abfd, section);
1202 && (bfd_get_file_flags (abfd) & BFD_IN_MEMORY) == 0)
1207 if ((bfd_get_section_flags (abfd, section) & SEC_THREAD_LOCAL) != 0)
1223 for (i = 0, j = 0; i < map_size - 1; i++)
1232 if (sect1_addr == sect2_addr
1265 for (i = 0, j = 0; i < map_size - 1; )
1270 for (k = i + 1; k < map_size; k++)
1280 if (sect1_endaddr <= sect2_addr)
1297 _(
"unexpected overlap between:\n" 1298 " (A) section `%s' from `%s' [%s, %s)\n" 1299 " (B) section `%s' from `%s' [%s, %s).\n" 1300 "Will ignore section B"),
1330 int alloc_size, map_size, i;
1348 if (alloc_size == 0)
1367 if (map_size < alloc_size)
1374 *pmap_size = map_size;
1541 void *cb_data,
struct objfile *current_objfile)
1590 return bfd_flavour_name (bfd_get_flavour (
objfile->
obfd));
1598 = register_program_space_data_with_cleanup (NULL,
void objfiles_changed(void)
void resume_section_map_updates(struct program_space *pspace)
void addr_info_make_relative(struct section_addr_info *addrs, bfd *abfd)
#define OBSTACK_CALLOC(OBSTACK, NUMBER, TYPE)
#define SECT_OFF_TEXT(objfile)
#define ALL_OBJFILE_FILETABS(objfile, cu, s)
int pc_in_section(CORE_ADDR pc, const char *name)
struct psymbol_bcache * psymbol_bcache_init(void)
#define DEFINE_REGISTRY(TAG, ACCESS)
struct linetable_entry item[1]
void psymbol_bcache_free(struct psymbol_bcache *bcache)
int gdb_bfd_section_index(bfd *abfd, asection *section)
void free_all_objfiles(void)
struct objfile * separate_debug_objfile_backlink
int section_is_overlay(struct obj_section *section)
struct symbol * hash_next
struct bfd_section * the_bfd_section
void relative_addr_info_to_section_offsets(struct section_offsets *section_offsets, int num_sections, const struct section_addr_info *addrs)
int objfile_has_symbols(struct objfile *objfile)
struct program_space * pspace
int gdb_bfd_requires_relocations(bfd *abfd)
const struct dynamic_prop * static_link
struct symtab_and_line get_current_source_symtab_and_line(void)
#define SYMBOL_CLASS(symbol)
void internal_error(const char *file, int line, const char *fmt,...)
#define obj_section_endaddr(s)
const char * objfile_filename(const struct objfile *objfile)
#define REGISTRY_ACCESS_FIELD(CONTAINER)
void objfile_relocate(struct objfile *objfile, const struct section_offsets *new_offsets)
struct section_addr_info * build_section_addr_info_from_objfile(const struct objfile *objfile)
#define ALL_DICT_SYMBOLS(dict, iter, sym)
void set_objfile_main_name(struct objfile *objfile, const char *name, enum language lang)
const struct block * innermost_block
int have_partial_symbols(void)
#define ALL_OBJFILE_OSECTIONS(objfile, osect)
#define BLOCKVECTOR_BLOCK(blocklist, n)
void inhibit_section_map_updates(struct program_space *pspace)
struct objfile_per_bfd_storage * per_bfd
struct symbol * template_symbols
int is_addr_in_objfile(CORE_ADDR addr, const struct objfile *objfile)
static int objfile_rebase1(struct objfile *objfile, CORE_ADDR slide)
void set_objfile_per_bfd(struct objfile *objfile)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
void breakpoint_free_objfile(struct objfile *objfile)
void gdb_bfd_ref(struct bfd *abfd)
void observer_notify_free_objfile(struct objfile *objfile)
mach_port_t kern_return_t mach_port_t msgports mach_port_t kern_return_t pid_t pid mach_port_t kern_return_t mach_port_t task mach_port_t kern_return_t int flags
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)
#define SIZEOF_N_SECTION_OFFSETS(n)
struct so_list * master_so_list(void)
int objfile_has_partial_symbols(struct objfile *objfile)
int shared_objfile_contains_address_p(struct program_space *pspace, CORE_ADDR address)
static void update_section_map(struct program_space *pspace, struct obj_section ***pmap, int *pmap_size)
void breakpoint_re_set(void)
#define SYMBOL_VALUE_ADDRESS(symbol)
void free_objfile_separate_debug(struct objfile *objfile)
std::unique_ptr< T, xfree_deleter< T > > unique_xmalloc_ptr
void clear_current_source_symtab_and_line(void)
void gdb_bfd_unref(struct bfd *abfd)
objfile(bfd *, const char *, objfile_flags)
int objfile_has_full_symbols(struct objfile *objfile)
#define SYMTAB_OBJFILE(symtab)
static const struct program_space_data * objfiles_pspace_data
static void objfiles_pspace_data_cleanup(struct program_space *pspace, void *arg)
struct obj_section ** sections
void preserve_values(struct objfile *objfile)
void add_separate_debug_objfile(struct objfile *objfile, struct objfile *parent)
#define gdb_assert_not_reached(message)
const struct sym_fns * sf
void build_objfile_section_table(struct objfile *objfile)
static hashval_t static_link_htab_entry_hash(const void *p)
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
#define ANOFFSET(secoff, whichone)
struct gdbarch * get_objfile_arch(const struct objfile *objfile)
struct obj_section * sections
static int filter_overlapping_sections(struct obj_section **map, int map_size)
struct bcache * bcache_xmalloc(unsigned long(*hash_function)(const void *, int length), int(*compare_function)(const void *, const void *, int length))
void forget_cached_source_info_for_objfile(struct objfile *objfile)
htab * demangled_names_hash
struct objfile * separate_debug_objfile
void _initialize_objfiles(void)
static int objfile_relocate1(struct objfile *objfile, const struct section_offsets *new_offsets)
#define complaint(COMPLAINTS, FMT,...)
struct compunit_symtab * compunit_symtabs
static int qsort_cmp(const void *a, const void *b)
static void add_to_objfile_sections(struct bfd *abfd, struct bfd_section *asect, void *objfilep)
int section_is_mapped(struct obj_section *osect)
static void relocate_one_symbol(struct symbol *sym, struct objfile *objfile, struct section_offsets *delta)
void(* sym_finish)(struct objfile *)
struct obj_section * find_pc_section(CORE_ADDR pc)
const char * objfile_name(const struct objfile *objfile)
#define XRESIZEVEC(T, P, N)
void(* relocate)(struct objfile *objfile, const struct section_offsets *new_offsets, const struct section_offsets *delta)
void(* sym_read_psymbols)(struct objfile *)
const struct dynamic_prop * objfile_lookup_static_link(struct objfile *objfile, const struct block *block)
#define ALL_OBJFILE_COMPUNITS(objfile, cu)
struct objfile * separate_debug_objfile_link
void exec_set_section_address(const char *filename, int index, CORE_ADDR address)
void clear_pc_function_cache(void)
int() iterate_over_objfiles_in_search_order_cb_ftype(struct objfile *objfile, void *cb_data)
int have_minimal_symbols(void)
void objfile_purge_solibs(void)
#define COMPUNIT_BLOCKVECTOR(cust)
struct symbol * fixup_symbol_section(struct symbol *sym, struct objfile *objfile)
int entry_point_address_query(CORE_ADDR *entry_p)
static int static_link_htab_entry_eq(const void *p1, const void *p2)
void unlink_objfile(struct objfile *objfile)
struct gdbarch * gdbarch_from_bfd(bfd *abfd)
const char * objfile_flavour_name(struct objfile *objfile)
CORE_ADDR entry_point_address(void)
struct obj_section * find_pc_mapped_section(CORE_ADDR pc)
gdb::unique_xmalloc_ptr< char > gdb_abspath(const char *path)
const char * name_of_main
void btrace_free_objfile(struct objfile *objfile)
static struct objfile_pspace_info * get_objfile_pspace_data(struct program_space *pspace)
struct complaints * symfile_complaints
int gdb_bfd_count_sections(bfd *abfd)
#define COMPUNIT_BLOCK_LINE_SECTION(cust)
#define obj_section_addr(s)
struct objfile * objfile_separate_debug_iterate(const struct objfile *parent, const struct objfile *objfile)
const char * objfile_debug_name(const struct objfile *objfile)
enum language language_of_main
static int bsearch_cmp(const void *key, const void *elt)
#define ALL_OBJFILES_SAFE(obj, nxt)
#define BLOCKVECTOR_NBLOCKS(blocklist)
int have_full_symbols(void)
static void free_objfile_per_bfd_storage(struct objfile_per_bfd_storage *storage)
void bcache_xfree(struct bcache *bcache)
const struct block * block
void addrmap_relocate(struct addrmap *map, CORE_ADDR offset)
static const struct bfd_data * objfiles_bfd_data
const struct block * expression_context_block
enum overlay_debugging_state overlay_debugging
struct program_space * current_program_space
void objfile_register_static_link(struct objfile *objfile, const struct block *block, const struct dynamic_prop *static_link)
struct addrmap * psymtabs_addrmap
static struct obj_section * preferred_obj_section(struct obj_section *a, struct obj_section *b)
#define BLOCKVECTOR_MAP(blocklist)
auto_obstack storage_obstack
#define SYMBOL_SECTION(symbol)
int new_objfiles_available
struct section_offsets * section_offsets
void terminate_minimal_symbol_table(struct objfile *objfile)
#define ALL_OBJFILES(obj)
static int insert_section_p(const struct bfd *abfd, const struct bfd_section *section)
const struct quick_symbol_functions * qf
void put_objfile_before(struct objfile *objfile, struct objfile *before_this)
static int filter_debuginfo_sections(struct obj_section **map, int map_size)
static void add_to_objfile_sections_full(struct bfd *abfd, struct bfd_section *asect, struct objfile *objfile, int force)
PTR xcalloc(size_t number, size_t size)
int(* has_symbols)(struct objfile *objfile)
#define ALL_PSPACE_OBJFILES(ss, obj)
int is_target_filename(const char *name)
void resume_section_map_updates_cleanup(void *arg)
#define SYMTAB_LINETABLE(symtab)
struct psymbol_bcache * psymbol_cache
static struct objfile_per_bfd_storage * get_objfile_bfd_data(struct objfile *objfile, struct bfd *abfd)
void clear_symtab_users(symfile_add_flags add_flags)
void error(const char *fmt,...)
void objfile_rebase(struct objfile *objfile, CORE_ADDR slide)
void do_cleanups(struct cleanup *old_chain)
static void objfile_bfd_data_free(struct bfd *unused, void *d)
struct obj_section * sections_end