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/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_policygdb_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)
 

Macro Definition Documentation

◆ TARGET_SYSROOT_PREFIX

#define TARGET_SYSROOT_PREFIX   "target:"

Definition at line 40 of file gdb_bfd.h.

Typedef Documentation

◆ gdb_bfd_ref_ptr

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

Definition at line 78 of file gdb_bfd.h.

◆ gdb_bfd_section_range

using gdb_bfd_section_range = next_range<asection>

Definition at line 219 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 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().

◆ gdb_bfd_errmsg()

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

◆ gdb_bfd_fopen()

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

◆ gdb_bfd_get_full_section_contents()

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

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

Referenced by solib_bfd_fopen(), and symfile_bfd_open().

◆ 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 
)

◆ gdb_bfd_openr()

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

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 
)

◆ gdb_bfd_openr_next_archived_file()

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

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

◆ 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 228 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)