GDB (xrefs)
Classes | Defines | Functions | Variables
/home/stan/gdb/src/gdb/gdb_bfd.c File Reference
#include "defs.h"
#include "gdb_bfd.h"
#include "gdb_assert.h"
#include "gdb_string.h"
#include "ui-out.h"
#include "gdbcmd.h"
#include "hashtab.h"
#include "filestuff.h"

Go to the source code of this file.

Classes

struct  gdb_bfd_section_data
struct  gdb_bfd_data
struct  gdb_bfd_cache_search

Defines

#define GDB_BFD_DATA_ACCESSOR(ABFD)   ((struct gdb_bfd_data *) bfd_usrdata (ABFD))

Functions

void gdb_bfd_stash_filename (struct bfd *abfd)
static hashval_t hash_bfd (const void *b)
static int eq_bfd (const void *a, const void *b)
struct bfd * gdb_bfd_open (const char *name, const char *target, int fd)
static void free_one_bfd_section (bfd *abfd, asection *sectp, void *ignore)
static int gdb_bfd_close_or_warn (struct bfd *abfd)
void gdb_bfd_ref (struct bfd *abfd)
void gdb_bfd_unref (struct bfd *abfd)
static struct
gdb_bfd_section_data
get_section_descriptor (asection *section)
const gdb_bytegdb_bfd_map_section (asection *sectp, bfd_size_type *size)
static int get_file_crc (bfd *abfd, unsigned long *file_crc_return)
int gdb_bfd_crc (struct bfd *abfd, unsigned long *crc_out)
bfd * gdb_bfd_fopen (const char *filename, const char *target, const char *mode, int fd)
bfd * gdb_bfd_openr (const char *filename, const char *target)
bfd * gdb_bfd_openw (const char *filename, const char *target)
bfd * 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))
void gdb_bfd_mark_parent (bfd *child, bfd *parent)
bfd * gdb_bfd_openr_next_archived_file (bfd *archive, bfd *previous)
bfd * gdb_bfd_fdopenr (const char *filename, const char *target, int fd)
 gdb_static_assert (ARRAY_SIZE(_bfd_std_section)==4)
int gdb_bfd_section_index (bfd *abfd, asection *section)
int gdb_bfd_count_sections (bfd *abfd)
int gdb_bfd_requires_relocations (bfd *abfd)
static int print_one_bfd (void **slot, void *data)
static void maintenance_info_bfds (char *arg, int from_tty)
void _initialize_gdb_bfd (void)

Variables

static htab_t all_bfds
static htab_t gdb_bfd_cache
initialize_file_ftype _initialize_gdb_bfd

Define Documentation

#define GDB_BFD_DATA_ACCESSOR (   ABFD)    ((struct gdb_bfd_data *) bfd_usrdata (ABFD))

Definition at line 106 of file gdb_bfd.c.


Function Documentation

void _initialize_gdb_bfd ( void  )
static int eq_bfd ( const void *  a,
const void *  b 
) [static]

Definition at line 142 of file gdb_bfd.c.

References gdb_bfd_cache_search::filename, gdb_bfd_data::mtime, and gdb_bfd_cache_search::mtime.

Referenced by gdb_bfd_open().

static void free_one_bfd_section ( bfd *  abfd,
asection *  sectp,
void *  ignore 
) [static]
static int gdb_bfd_close_or_warn ( struct bfd *  abfd) [static]

Definition at line 239 of file gdb_bfd.c.

References _, free_one_bfd_section(), name, and warning().

Referenced by gdb_bfd_unref().

int gdb_bfd_count_sections ( bfd *  abfd)
int gdb_bfd_crc ( struct bfd *  abfd,
unsigned long *  crc_out 
)

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

bfd* gdb_bfd_fdopenr ( const char *  filename,
const char *  target,
int  fd 
)

Definition at line 601 of file gdb_bfd.c.

References gdb_bfd_ref(), and gdb_bfd_stash_filename().

bfd* gdb_bfd_fopen ( const char *  filename,
const char *  target,
const char *  mode,
int  fd 
)

Definition at line 487 of file gdb_bfd.c.

References gdb_bfd_ref(), and gdb_bfd_stash_filename().

Referenced by core_open(), and exec_file_attach().

const gdb_byte* gdb_bfd_map_section ( asection *  sectp,
bfd_size_type *  size 
)
void gdb_bfd_mark_parent ( bfd *  child,
bfd *  parent 
)
struct bfd* gdb_bfd_open ( const char *  name,
const char *  target,
int  fd 
) [read]
bfd* gdb_bfd_openr ( const char *  filename,
const char *  target 
)

Definition at line 504 of file gdb_bfd.c.

References gdb_bfd_ref(), and gdb_bfd_stash_filename().

Referenced by bfd_openr_with_cleanup(), and macho_check_dsym().

bfd* 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 
)
bfd* gdb_bfd_openr_next_archived_file ( bfd *  archive,
bfd *  previous 
)

Definition at line 588 of file gdb_bfd.c.

References gdb_bfd_mark_parent().

Referenced by macho_symfile_read_all_oso(), and solib_aix_bfd_open().

bfd* gdb_bfd_openw ( const char *  filename,
const char *  target 
)

Definition at line 520 of file gdb_bfd.c.

References gdb_bfd_ref(), and gdb_bfd_stash_filename().

Referenced by bfd_openw_with_cleanup(), and create_gcore_bfd().

void gdb_bfd_ref ( struct bfd *  abfd)

Definition at line 647 of file gdb_bfd.c.

References gdb_bfd_data::needs_relocations, and gdb_bfd_data::relocation_computed.

Referenced by get_objfile_bfd_data().

int gdb_bfd_section_index ( bfd *  abfd,
asection *  section 
)
void gdb_bfd_stash_filename ( struct bfd *  abfd)
void gdb_bfd_unref ( struct bfd *  abfd)
gdb_static_assert ( ARRAY_SIZE(_bfd_std_section)  = =4)
static int get_file_crc ( bfd *  abfd,
unsigned long *  file_crc_return 
) [static]

Definition at line 435 of file gdb_bfd.c.

References _, and warning().

Referenced by gdb_bfd_crc().

static struct gdb_bfd_section_data* get_section_descriptor ( asection *  section) [static, read]

Definition at line 341 of file gdb_bfd.c.

Referenced by gdb_bfd_map_section().

static hashval_t hash_bfd ( const void *  b) [static]

Definition at line 130 of file gdb_bfd.c.

Referenced by gdb_bfd_open().

static void maintenance_info_bfds ( char *  arg,
int  from_tty 
) [static]
static int print_one_bfd ( void **  slot,
void *  data 
) [static]

Variable Documentation

Referenced by initialize_all_files().

htab_t all_bfds [static]

Definition at line 58 of file gdb_bfd.c.

Referenced by _initialize_gdb_bfd(), gdb_bfd_ref(), gdb_bfd_unref(), and maintenance_info_bfds().

htab_t gdb_bfd_cache [static]

Definition at line 113 of file gdb_bfd.c.

Referenced by gdb_bfd_open(), and gdb_bfd_unref().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines