GDB (xrefs)
|
#include "registry.h"
#include "gdbsupport/byte-vector.h"
#include "gdbsupport/gdb_ref_ptr.h"
#include "gdbsupport/iterator-range.h"
#include "gdbsupport/next-iterator.h"
Go to the source code of this file.
Classes | |
struct | registry_accessor< bfd > |
struct | gdb_bfd_ref_policy |
Macros | |
#define | TARGET_SYSROOT_PREFIX "target:" |
Typedefs | |
typedef gdb::ref_ptr< struct bfd, gdb_bfd_ref_policy > | gdb_bfd_ref_ptr |
using | gdb_bfd_section_range = next_range< asection > |
Functions | |
int | is_target_filename (const char *name) |
int | gdb_bfd_has_target_filename (struct bfd *abfd) |
void | gdb_bfd_ref (struct bfd *abfd) |
void | gdb_bfd_unref (struct bfd *abfd) |
gdb_bfd_ref_ptr | gdb_bfd_open (const char *name, const char *target, int fd=-1, bool warn_if_slow=true) |
void | gdb_bfd_mark_parent (bfd *child, bfd *parent) |
void | gdb_bfd_record_inclusion (bfd *includer, bfd *includee) |
const gdb_byte * | gdb_bfd_map_section (asection *section, bfd_size_type *size) |
int | gdb_bfd_crc (struct bfd *abfd, unsigned long *crc_out) |
gdb_bfd_ref_ptr | gdb_bfd_fopen (const char *, const char *, const char *, int) |
gdb_bfd_ref_ptr | gdb_bfd_openr (const char *, const char *) |
gdb_bfd_ref_ptr | gdb_bfd_openw (const char *, const char *) |
gdb_bfd_ref_ptr | gdb_bfd_openr_iovec (const char *filename, const char *target, void *(*open_func)(struct bfd *nbfd, void *open_closure), void *open_closure, file_ptr(*pread_func)(struct bfd *nbfd, void *stream, void *buf, file_ptr nbytes, file_ptr offset), int(*close_func)(struct bfd *nbfd, void *stream), int(*stat_func)(struct bfd *abfd, void *stream, struct stat *sb)) |
gdb_bfd_ref_ptr | gdb_bfd_openr_next_archived_file (bfd *archive, bfd *previous) |
int | gdb_bfd_section_index (bfd *abfd, asection *section) |
int | gdb_bfd_count_sections (bfd *abfd) |
int | gdb_bfd_requires_relocations (bfd *abfd) |
bool | gdb_bfd_get_full_section_contents (bfd *abfd, asection *section, gdb::byte_vector *contents) |
gdb_bfd_ref_ptr | gdb_bfd_open_from_target_memory (CORE_ADDR addr, ULONGEST size, const char *target) |
static gdb_bfd_section_range | gdb_bfd_sections (bfd *abfd) |
static gdb_bfd_section_range | gdb_bfd_sections (const gdb_bfd_ref_ptr &abfd) |
std::string | gdb_bfd_errmsg (bfd_error_type error_tag, char **matching) |
typedef gdb::ref_ptr<struct bfd, gdb_bfd_ref_policy> gdb_bfd_ref_ptr |
using gdb_bfd_section_range = next_range<asection> |
int gdb_bfd_count_sections | ( | bfd * | abfd | ) |
Definition at line 998 of file gdb_bfd.c.
Referenced by build_objfile_section_table(), default_symfile_offsets(), macho_symfile_offsets(), maint_print_all_sections(), maintenance_info_target_sections(), objfile_relocate(), solib_target_relocate_section_addresses(), and syms_from_objfile_1().
int gdb_bfd_crc | ( | struct bfd * | abfd, |
unsigned long * | crc_out | ||
) |
Definition at line 858 of file gdb_bfd.c.
References gdb_bfd_data::crc, gdb_bfd_data::crc_computed, and get_file_crc().
Referenced by separate_debug_file_exists().
std::string gdb_bfd_errmsg | ( | bfd_error_type | error_tag, |
char ** | matching | ||
) |
Definition at line 1048 of file gdb_bfd.c.
References AMBIGUOUS_MESS1, AMBIGUOUS_MESS2, and xfree().
Referenced by compile_object_load(), exec_file_attach(), and locate_exec_from_corefile_build_id().
gdb_bfd_ref_ptr gdb_bfd_fopen | ( | const char * | filename, |
const char * | target, | ||
const char * | mode, | ||
int | fd | ||
) |
Definition at line 875 of file gdb_bfd.c.
Referenced by core_target_open(), and exec_file_attach().
bool gdb_bfd_get_full_section_contents | ( | bfd * | abfd, |
asection * | section, | ||
gdb::byte_vector * | contents | ||
) |
Definition at line 1030 of file gdb_bfd.c.
Referenced by gdb_bfd_read_elf_soname(), and is_linked_with_cygwin_dll().
int gdb_bfd_has_target_filename | ( | struct bfd * | abfd | ) |
Definition at line 215 of file gdb_bfd.c.
References is_target_filename().
Referenced by solib_bfd_fopen(), and symfile_bfd_open().
const gdb_byte * gdb_bfd_map_section | ( | asection * | section, |
bfd_size_type * | size | ||
) |
Definition at line 741 of file gdb_bfd.c.
References gdb_bfd_section_data::data, get_section_descriptor(), gdb_bfd_section_data::map_addr, gdb_bfd_section_data::map_len, gdb_bfd_section_data::size, and size.
Referenced by dwarf2_section_info::read().
void gdb_bfd_mark_parent | ( | bfd * | child, |
bfd * | parent | ||
) |
Definition at line 931 of file gdb_bfd.c.
References gdb_bfd_data::archive_bfd, and gdb_bfd_ref().
Referenced by gdb_bfd_mach_o_fat_extract(), and gdb_bfd_openr_next_archived_file().
gdb_bfd_ref_ptr gdb_bfd_open | ( | const char * | name, |
const char * | target, | ||
int | fd = -1 , |
||
bool | warn_if_slow = true |
||
) |
Definition at line 491 of file gdb_bfd.c.
References bfd_cache_debug_printf, bfd_sharing, current_inferior(), gdb_bfd_cache_search::device_id, eq_bfd(), gdb_bfd_cache_search::filename, gdb_bfd_cache, gdb_bfd_init_data(), gdb_bfd_iovec_fileio_close(), gdb_bfd_iovec_fileio_fstat(), gdb_bfd_iovec_fileio_open(), gdb_bfd_iovec_fileio_pread(), gdb_bfd_openr_iovec(), hash_bfd(), gdb_bfd_cache_search::inode, is_target_filename(), gdb_bfd_cache_search::mtime, name, O_BINARY, gdb_bfd_cache_search::size, target_filesystem_is_local(), TARGET_SYSROOT_PREFIX, xcalloc(), and xfree().
Referenced by build_id_to_debug_bfd_1(), compile_object_load(), darwin_get_dyld_bfd(), dwarf2_get_dwz_file(), dwz_search_other_debugdirs(), exec_file_attach(), gdb_bfd_read_elf_soname(), generic_load(), locate_exec_from_corefile_build_id(), macho_symfile_read_all_oso(), reread_symbols(), separate_debug_file_exists(), solib_bfd_fopen(), symfile_bfd_open(), try_open_dwop_file(), validate_exec_file(), windows_make_so(), and windows_xfer_shared_library().
gdb_bfd_ref_ptr gdb_bfd_open_from_target_memory | ( | CORE_ADDR | addr, |
ULONGEST | size, | ||
const char * | target | ||
) |
Definition at line 322 of file gdb_bfd.c.
References target_buffer::filename(), gdb_bfd_openr_iovec(), mem_bfd_iovec_close(), mem_bfd_iovec_open(), mem_bfd_iovec_pread(), mem_bfd_iovec_stat(), and size.
Referenced by jit_bfd_try_read_symtab().
gdb_bfd_ref_ptr gdb_bfd_openr | ( | const char * | filename, |
const char * | target | ||
) |
Definition at line 886 of file gdb_bfd.c.
Referenced by bfd_openr_or_error(), and macho_check_dsym().
gdb_bfd_ref_ptr gdb_bfd_openr_iovec | ( | const char * | filename, |
const char * | target, | ||
void *(*)(struct bfd *nbfd, void *open_closure) | open_func, | ||
void * | open_closure, | ||
file_ptr(*)(struct bfd *nbfd, void *stream, void *buf, file_ptr nbytes, file_ptr offset) | pread_func, | ||
int(*)(struct bfd *nbfd, void *stream) | close_func, | ||
int(*)(struct bfd *abfd, void *stream, struct stat *sb) | stat_func | ||
) |
Definition at line 906 of file gdb_bfd.c.
Referenced by find_separate_debug_file_in_section(), gdb_bfd_open(), and gdb_bfd_open_from_target_memory().
gdb_bfd_ref_ptr gdb_bfd_openr_next_archived_file | ( | bfd * | archive, |
bfd * | previous | ||
) |
Definition at line 952 of file gdb_bfd.c.
References gdb_bfd_mark_parent().
Referenced by macho_symfile_read_all_oso(), and solib_aix_bfd_open().
gdb_bfd_ref_ptr gdb_bfd_openw | ( | const char * | filename, |
const char * | target | ||
) |
Definition at line 896 of file gdb_bfd.c.
Referenced by bfd_openw_or_error(), and create_gcore_bfd().
void gdb_bfd_record_inclusion | ( | bfd * | includer, |
bfd * | includee | ||
) |
Definition at line 965 of file gdb_bfd.c.
References gdb_bfd_data::included_bfds.
Referenced by core_target::build_file_mappings(), dwarf2_get_dwz_file(), and try_open_dwop_file().
void gdb_bfd_ref | ( | struct bfd * | abfd | ) |
Definition at line 636 of file gdb_bfd.c.
References bfd_cache_debug_printf, gdb_bfd_init_data(), and gdb_bfd_data::refc.
Referenced by gdb_bfd_mach_o_fat_extract(), gdb_bfd_mark_parent(), and gdb_bfd_ref_policy::incref().
int gdb_bfd_requires_relocations | ( | bfd * | abfd | ) |
Definition at line 1006 of file gdb_bfd.c.
References gdb_bfd_data::needs_relocations, and gdb_bfd_data::relocation_computed.
Referenced by dwarf2_has_info(), find_comp_unit(), set_comp_unit(), and set_objfile_per_bfd().
int gdb_bfd_section_index | ( | bfd * | abfd, |
asection * | section | ||
) |
Definition at line 980 of file gdb_bfd.c.
Referenced by add_to_objfile_sections(), build_section_addr_info_from_bfd(), build_section_addr_info_from_section_table(), cs_to_section(), find_targ_sec(), init_entry_point_info(), macho_symtab_add_minsym(), maint_obj_section_from_bfd_section(), place_section(), print_section_index(), record_minimal_symbol(), objfile::section_offset(), objfile::set_section_offset(), and solib_target_relocate_section_addresses().
|
inlinestatic |
Definition at line 222 of file gdb_bfd.h.
Referenced by addr_info_make_relative(), arm_elf_osabi_sniffer(), build_objfile_section_table(), build_section_table(), core_target_open(), default_symfile_offsets(), default_symfile_relocate(), dwarf2_get_dwz_file(), elf_symfile_read(), gcore_memory_sections(), gdb_bfd_close_or_warn(), generic_elf_osabi_sniffer(), generic_load(), get_stap_base_address(), maint_print_all_sections(), mips_sde_elf_osabi_sniffer(), open_and_init_dwo_file(), open_and_init_dwp_file(), read_pe_exported_syms(), and restore_command().
|
inlinestatic |
void gdb_bfd_unref | ( | struct bfd * | abfd | ) |
Definition at line 663 of file gdb_bfd.c.
References all_bfds, gdb_bfd_data::archive_bfd, bfd_cache_debug_printf, gdb_bfd_data::device_id, gdb_bfd_cache_search::device_id, gdb_bfd_cache_search::filename, gdb_bfd_cache, gdb_bfd_close_or_warn(), gdb_bfd_unref(), gdb_bfd_data::inode, gdb_bfd_cache_search::inode, gdb_bfd_data::mtime, gdb_bfd_cache_search::mtime, gdb_bfd_data::refc, gdb_bfd_data::size, and gdb_bfd_cache_search::size.
Referenced by clear_so(), gdb_bfd_ref_policy::decref(), and gdb_bfd_unref().
int is_target_filename | ( | const char * | name | ) |
Definition at line 207 of file gdb_bfd.c.
References name, and TARGET_SYSROOT_PREFIX.
Referenced by exec_file_attach(), remote_target::follow_exec(), gdb_bfd_has_target_filename(), gdb_bfd_iovec_fileio_open(), gdb_bfd_open(), gdbsim_target_open(), load_auto_scripts_for_objfile(), objfile::objfile(), solib_find_1(), symfile_bfd_open(), and validate_exec_file().