GDB (xrefs)
Macros | Functions | Variables
/tmp/gdb-7.10/gdb/solib.c File Reference
#include "defs.h"
#include <sys/types.h>
#include <fcntl.h>
#include "symtab.h"
#include "bfd.h"
#include "symfile.h"
#include "objfiles.h"
#include "gdbcore.h"
#include "command.h"
#include "target.h"
#include "frame.h"
#include "gdb_regex.h"
#include "inferior.h"
#include "environ.h"
#include "language.h"
#include "gdbcmd.h"
#include "completer.h"
#include "filenames.h"
#include "exec.h"
#include "solist.h"
#include "observer.h"
#include "readline/readline.h"
#include "remote.h"
#include "solib.h"
#include "interps.h"
#include "filesystem.h"
#include "gdb_bfd.h"
#include "filestuff.h"

Go to the source code of this file.

Macros

#define so_list_head   current_program_space->so_list
 
#define DOS_BASED_FILE_SYSTEM   0
 

Functions

static void * solib_init (struct obstack *obstack)
 
static const struct target_so_opssolib_ops (struct gdbarch *gdbarch)
 
void set_solib_ops (struct gdbarch *gdbarch, const struct target_so_ops *new_ops)
 
static void show_solib_search_path (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static char * solib_find_1 (char *in_pathname, int *fd, int is_solib)
 
char * exec_file_find (char *in_pathname, int *fd)
 
char * solib_find (char *in_pathname, int *fd)
 
bfd * solib_bfd_fopen (char *pathname, int fd)
 
bfd * solib_bfd_open (char *pathname)
 
static int solib_map_sections (struct so_list *so)
 
static void clear_so (struct so_list *so)
 
void free_so (struct so_list *so)
 
struct so_listmaster_so_list (void)
 
int solib_read_symbols (struct so_list *so, int flags)
 
static int solib_used (const struct so_list *const known)
 
static void update_solib_list (int from_tty, struct target_ops *target)
 
int libpthread_name_p (const char *name)
 
static int libpthread_solib_p (struct so_list *so)
 
void solib_add (const char *pattern, int from_tty, struct target_ops *target, int readsyms)
 
static void info_sharedlibrary_command (char *pattern, int from_tty)
 
int solib_contains_address_p (const struct so_list *const solib, CORE_ADDR address)
 
char * solib_name_from_address (struct program_space *pspace, CORE_ADDR address)
 
int solib_keep_data_in_core (CORE_ADDR vaddr, unsigned long size)
 
void clear_solib (void)
 
void solib_create_inferior_hook (int from_tty)
 
int in_solib_dynsym_resolve_code (CORE_ADDR pc)
 
static void sharedlibrary_command (char *args, int from_tty)
 
void no_shared_libraries (char *ignored, int from_tty)
 
void update_solib_breakpoints (void)
 
void handle_solib_event (void)
 
static void reload_shared_libraries_1 (int from_tty)
 
static void reload_shared_libraries (char *ignored, int from_tty, struct cmd_list_element *e)
 
static void gdb_sysroot_changed (char *ignored, int from_tty, struct cmd_list_element *e)
 
static void show_auto_solib_add (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
struct symbolsolib_global_lookup (struct objfile *objfile, const char *name, const domain_enum domain)
 
CORE_ADDR gdb_bfd_lookup_symbol_from_symtab (bfd *abfd, int(*match_sym)(asymbol *, void *), void *data)
 
static CORE_ADDR bfd_lookup_symbol_from_dyn_symtab (bfd *abfd, int(*match_sym)(asymbol *, void *), void *data)
 
CORE_ADDR gdb_bfd_lookup_symbol (bfd *abfd, int(*match_sym)(asymbol *, void *), void *data)
 
static void remove_user_added_objfile (struct objfile *objfile)
 
void _initialize_solib (void)
 

Variables

static struct gdbarch_datasolib_data
 
struct target_so_opscurrent_target_so_ops
 
static char * solib_search_path = NULL
 
initialize_file_ftype _initialize_solib
 

Macro Definition Documentation

#define DOS_BASED_FILE_SYSTEM   0

Definition at line 112 of file solib.c.

Referenced by solib_find_1().

#define so_list_head   current_program_space->so_list

Function Documentation

void _initialize_solib ( void  )
static CORE_ADDR bfd_lookup_symbol_from_dyn_symtab ( bfd *  abfd,
int(*)(asymbol *, void *)  match_sym,
void *  data 
)
static

Definition at line 1591 of file solib.c.

References do_cleanups(), make_cleanup(), xfree(), and xmalloc().

Referenced by gdb_bfd_lookup_symbol().

static void clear_so ( struct so_list so)
static
void clear_solib ( void  )
char* exec_file_find ( char *  in_pathname,
int fd 
)
void free_so ( struct so_list so)
CORE_ADDR gdb_bfd_lookup_symbol ( bfd *  abfd,
int(*)(asymbol *, void *)  match_sym,
void *  data 
)
CORE_ADDR gdb_bfd_lookup_symbol_from_symtab ( bfd *  abfd,
int(*)(asymbol *, void *)  match_sym,
void *  data 
)
static void gdb_sysroot_changed ( char *  ignored,
int  from_tty,
struct cmd_list_element e 
)
static
void handle_solib_event ( void  )
int in_solib_dynsym_resolve_code ( CORE_ADDR  pc)

Definition at line 1280 of file solib.c.

References target_so_ops::in_dynsym_resolve_code, solib_ops(), and target_gdbarch().

Referenced by process_event_stop_test().

static void info_sharedlibrary_command ( char *  pattern,
int  from_tty 
)
static
int libpthread_name_p ( const char *  name)
static int libpthread_solib_p ( struct so_list so)
static

Definition at line 950 of file solib.c.

References libpthread_name_p(), and so_list::so_name.

Referenced by reload_shared_libraries_1(), and solib_add().

struct so_list* master_so_list ( void  )
void no_shared_libraries ( char *  ignored,
int  from_tty 
)
static void reload_shared_libraries ( char *  ignored,
int  from_tty,
struct cmd_list_element e 
)
static
static void reload_shared_libraries_1 ( int  from_tty)
static
static void remove_user_added_objfile ( struct objfile objfile)
static

Definition at line 1648 of file solib.c.

References objfile::flags, so_list::next, OBJF_USERLOADED, so_list::objfile, and so_list_head.

Referenced by _initialize_solib().

void set_solib_ops ( struct gdbarch gdbarch,
const struct target_so_ops new_ops 
)
static void sharedlibrary_command ( char *  args,
int  from_tty 
)
static

Definition at line 1290 of file solib.c.

References dont_repeat(), and solib_add().

Referenced by _initialize_solib().

static void show_auto_solib_add ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
)
static

Definition at line 1503 of file solib.c.

References _, and fprintf_filtered().

Referenced by _initialize_solib().

static void show_solib_search_path ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
)
static

Definition at line 100 of file solib.c.

References _, and fprintf_filtered().

Referenced by _initialize_solib().

void solib_add ( const char *  pattern,
int  from_tty,
struct target_ops target,
int  readsyms 
)
bfd* solib_bfd_fopen ( char *  pathname,
int  fd 
)
bfd* solib_bfd_open ( char *  pathname)
int solib_contains_address_p ( const struct so_list *const  solib,
CORE_ADDR  address 
)
void solib_create_inferior_hook ( int  from_tty)
char* solib_find ( char *  in_pathname,
int fd 
)

Definition at line 419 of file solib.c.

References gdbarch_solib_symbols_extension(), solib_find_1(), and target_gdbarch().

Referenced by darwin_bfd_open(), and solib_bfd_open().

static char* solib_find_1 ( char *  in_pathname,
int fd,
int  is_solib 
)
static
struct symbol* solib_global_lookup ( struct objfile objfile,
const char *  name,
const domain_enum  domain 
)

Definition at line 1515 of file solib.c.

References get_objfile_arch(), target_so_ops::lookup_lib_global_symbol, and solib_ops().

Referenced by lookup_global_symbol().

static void* solib_init ( struct obstack *  obstack)
static

Definition at line 56 of file solib.c.

References current_target_so_ops, and OBSTACK_ZALLOC.

Referenced by _initialize_solib().

int solib_keep_data_in_core ( CORE_ADDR  vaddr,
unsigned long  size 
)

Definition at line 1209 of file solib.c.

References target_so_ops::keep_data_in_core, solib_ops(), and target_gdbarch().

Referenced by gcore_create_callback().

static int solib_map_sections ( struct so_list so)
static
char* solib_name_from_address ( struct program_space pspace,
CORE_ADDR  address 
)
static const struct target_so_ops* solib_ops ( struct gdbarch gdbarch)
static
int solib_read_symbols ( struct so_list so,
int  flags 
)
static int solib_used ( const struct so_list *const  known)
static

Definition at line 727 of file solib.c.

References so_list::next, so_list::objfile, and so_list_head.

Referenced by reload_shared_libraries_1(), and update_solib_list().

void update_solib_breakpoints ( void  )

Definition at line 1316 of file solib.c.

References solib_ops(), target_gdbarch(), and target_so_ops::update_breakpoints.

Referenced by set_stop_on_solib_events().

static void update_solib_list ( int  from_tty,
struct target_ops target 
)
static

Variable Documentation

initialize_file_ftype _initialize_solib
struct target_so_ops* current_target_so_ops

Definition at line 88 of file solib.c.

Referenced by _initialize_solib_target(), and solib_init().

struct gdbarch_data* solib_data
static

Definition at line 53 of file solib.c.

char* solib_search_path = NULL
static

Definition at line 98 of file solib.c.

Referenced by _initialize_solib(), and solib_find_1().