24#include "gdbsupport/byte-vector.h"
25#include "gdbsupport/function-view.h"
26#include "gdbsupport/gdb_ref_ptr.h"
27#include "gdbsupport/iterator-range.h"
28#include "gdbsupport/next-iterator.h"
41#define TARGET_SYSROOT_PREFIX "target:"
67 static void incref (
struct bfd *abfd)
72 static void decref (
struct bfd *abfd)
95 int fd = -1,
bool warn_if_slow =
true);
135int gdb_bfd_crc (
struct bfd *abfd,
unsigned long *crc_out);
168 virtual file_ptr
read (bfd *abfd,
void *buffer, file_ptr nbytes,
169 file_ptr offset) = 0;
172 virtual int stat (
struct bfd *abfd,
struct stat *sb) = 0;
215 gdb::byte_vector *contents);
251extern std::string
gdb_bfd_errmsg (bfd_error_type error_tag,
char **matching);
constexpr string_view get()
virtual int stat(struct bfd *abfd, struct stat *sb)=0
virtual file_ptr read(bfd *abfd, void *buffer, file_ptr nbytes, file_ptr offset)=0
virtual ~gdb_bfd_iovec_base()=default
gdb_bfd_iovec_base()=default
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)
next_range< asection > gdb_bfd_section_range
gdb_bfd_ref_ptr gdb_bfd_openr_iovec(const char *filename, const char *target, gdb_iovec_opener_ftype open_fn)
gdb::ref_ptr< struct bfd, gdb_bfd_ref_policy > gdb_bfd_ref_ptr
int gdb_bfd_crc(struct bfd *abfd, unsigned long *crc_out)
gdb::function_view< gdb_bfd_iovec_base *(bfd *)> gdb_iovec_opener_ftype
int gdb_bfd_section_index(bfd *abfd, asection *section)
std::string gdb_bfd_errmsg(bfd_error_type error_tag, char **matching)
int gdb_bfd_requires_relocations(bfd *abfd)
gdb_bfd_ref_ptr gdb_bfd_fopen(const char *, const char *, const char *, int)
int gdb_bfd_has_target_filename(struct bfd *abfd)
gdb_bfd_ref_ptr gdb_bfd_openr(const char *, const char *)
int gdb_bfd_count_sections(bfd *abfd)
void gdb_bfd_mark_parent(bfd *child, bfd *parent)
gdb_bfd_ref_ptr gdb_bfd_openr_next_archived_file(bfd *archive, bfd *previous)
void gdb_bfd_record_inclusion(bfd *includer, bfd *includee)
static gdb_bfd_section_range gdb_bfd_sections(bfd *abfd)
void gdb_bfd_ref(struct bfd *abfd)
const gdb_byte * gdb_bfd_map_section(asection *section, bfd_size_type *size)
int is_target_filename(const char *name)
gdb_bfd_ref_ptr gdb_bfd_open_from_target_memory(CORE_ADDR addr, ULONGEST size, const char *target)
gdb_bfd_ref_ptr gdb_bfd_openw(const char *, const char *)
bool gdb_bfd_get_full_section_contents(bfd *abfd, asection *section, gdb::byte_vector *contents)
static void decref(struct bfd *abfd)
static void incref(struct bfd *abfd)