GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
gdb_bfd.h File Reference
#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_policygdb_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)
 

Macro Definition Documentation

◆ TARGET_SYSROOT_PREFIX

#define TARGET_SYSROOT_PREFIX   "target:"

Typedef Documentation

◆ gdb_bfd_ref_ptr

typedef gdb::ref_ptr<struct bfd, gdb_bfd_ref_policy> gdb_bfd_ref_ptr

Definition at line 79 of file gdb_bfd.h.

◆ gdb_bfd_section_range

using gdb_bfd_section_range = next_range<asection>

Definition at line 231 of file gdb_bfd.h.

◆ gdb_iovec_opener_ftype

using gdb_iovec_opener_ftype = gdb::function_view<gdb_bfd_iovec_base * (bfd *)>

Definition at line 176 of file gdb_bfd.h.

Function Documentation

◆ gdb_bfd_count_sections()

int gdb_bfd_count_sections ( bfd * abfd)

◆ gdb_bfd_crc()

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().

◆ gdb_bfd_errmsg()

std::string gdb_bfd_errmsg ( bfd_error_type error_tag,
char ** matching )
extern

◆ gdb_bfd_fopen()

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().

◆ gdb_bfd_get_full_section_contents()

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().

◆ gdb_bfd_has_target_filename()

int gdb_bfd_has_target_filename ( struct bfd * abfd)

Definition at line 215 of file gdb_bfd.c.

References is_target_filename().

◆ gdb_bfd_map_section()

const gdb_byte * gdb_bfd_map_section ( asection * section,
bfd_size_type * size )

◆ gdb_bfd_mark_parent()

void gdb_bfd_mark_parent ( bfd * child,
bfd * parent )

◆ gdb_bfd_open()

gdb_bfd_ref_ptr gdb_bfd_open ( const char * name,
const char * target,
int fd = -1,
bool warn_if_slow = true )

◆ gdb_bfd_open_from_target_memory()

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_openr()

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_openr_iovec()

gdb_bfd_ref_ptr gdb_bfd_openr_iovec ( const char * filename,
const char * target,
gdb_iovec_opener_ftype open_fn )

◆ gdb_bfd_openr_next_archived_file()

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_openw()

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().

◆ gdb_bfd_record_inclusion()

void gdb_bfd_record_inclusion ( bfd * includer,
bfd * includee )

◆ gdb_bfd_ref()

void gdb_bfd_ref ( struct bfd * abfd)

◆ gdb_bfd_requires_relocations()

int gdb_bfd_requires_relocations ( bfd * abfd)

◆ gdb_bfd_section_index()

int gdb_bfd_section_index ( bfd * abfd,
asection * section )

◆ gdb_bfd_sections() [1/2]

static gdb_bfd_section_range gdb_bfd_sections ( bfd * abfd)
inlinestatic

◆ gdb_bfd_sections() [2/2]

static gdb_bfd_section_range gdb_bfd_sections ( const gdb_bfd_ref_ptr & abfd)
inlinestatic

Definition at line 240 of file gdb_bfd.h.

◆ gdb_bfd_unref()

void gdb_bfd_unref ( struct bfd * abfd)

◆ is_target_filename()

int is_target_filename ( const char * name)