GDB (xrefs)
|
#include "registry.h"
#include "gdbsupport/byte-vector.h"
#include "gdbsupport/function-view.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 |
class | gdb_bfd_iovec_base |
Macros | |
#define | TARGET_SYSROOT_PREFIX "target:" |
Typedefs | |
typedef gdb::ref_ptr< struct bfd, gdb_bfd_ref_policy > | gdb_bfd_ref_ptr |
using | gdb_iovec_opener_ftype = gdb::function_view<gdb_bfd_iovec_base * (bfd *)> |
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, gdb_iovec_opener_ftype open_fn) |
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) |
#define TARGET_SYSROOT_PREFIX "target:" |
Definition at line 41 of file gdb_bfd.h.
Referenced by build_id_to_debug_bfd_1(), captured_main_1(), exec_file_attach(), remote_target::filesystem_is_local(), remote_target::follow_exec(), gdb_bfd_iovec_fileio_open(), gdb_bfd_open(), gdb_sysroot_changed(), gdbsim_target_open(), is_target_filename(), solib_find_1(), and validate_exec_file().
typedef gdb::ref_ptr<struct bfd, gdb_bfd_ref_policy> gdb_bfd_ref_ptr |
using gdb_bfd_section_range = next_range<asection> |
using gdb_iovec_opener_ftype = gdb::function_view<gdb_bfd_iovec_base * (bfd *)> |
int gdb_bfd_count_sections | ( | bfd * | abfd | ) |
Definition at line 1002 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 842 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().
|
extern |
Definition at line 1052 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 859 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 1034 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().
const gdb_byte * gdb_bfd_map_section | ( | asection * | section, |
bfd_size_type * | size ) |
Definition at line 725 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 935 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 473 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_open(), 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 301 of file gdb_bfd.c.
References gdb_bfd_openr_iovec(), 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 873 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, | ||
gdb_iovec_opener_ftype | open_fn ) |
Definition at line 893 of file gdb_bfd.c.
References gdb_bfd_iovec_base::read(), and gdb_bfd_iovec_base::stat().
Referenced by find_separate_debug_file_in_section(), gdb_bfd_open(), gdb_bfd_open_from_target_memory(), and rocm_solib_bfd_open().
gdb_bfd_ref_ptr gdb_bfd_openr_next_archived_file | ( | bfd * | archive, |
bfd * | previous ) |
Definition at line 956 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 883 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 969 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 620 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 1010 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 984 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 234 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(), rename_vmcore_idle_reg_sections(), and restore_command().
|
inlinestatic |
void gdb_bfd_unref | ( | struct bfd * | abfd | ) |
Definition at line 647 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().