/* Handle shared libraries for GDB, the GNU Debugger.
- Copyright (C) 1990-2003, 2005-2012 Free Software Foundation, Inc.
+ Copyright (C) 1990-2013 Free Software Foundation, Inc.
This file is part of GDB.
char *
solib_find (char *in_pathname, int *fd)
{
- struct target_so_ops *ops = solib_ops (target_gdbarch);
+ struct target_so_ops *ops = solib_ops (target_gdbarch ());
int found_file = -1;
char *temp_pathname = NULL;
int gdb_sysroot_is_empty;
const char *solib_symbols_extension
- = gdbarch_solib_symbols_extension (target_gdbarch);
+ = gdbarch_solib_symbols_extension (target_gdbarch ());
const char *fskind = effective_target_file_system_kind ();
struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
char *sysroot = NULL;
}
/* Check bfd arch. */
- b = gdbarch_bfd_arch_info (target_gdbarch);
+ b = gdbarch_bfd_arch_info (target_gdbarch ());
if (!b->compatible (b, bfd_get_arch_info (abfd)))
warning (_("`%s': Shared library architecture %s is not compatible "
"with target architecture %s."), bfd_get_filename (abfd),
static int
solib_map_sections (struct so_list *so)
{
- struct target_so_ops *ops = solib_ops (target_gdbarch);
+ struct target_so_ops *ops = solib_ops (target_gdbarch ());
char *filename;
struct target_section *p;
struct cleanup *old_chain;
void
free_so (struct so_list *so)
{
- struct target_so_ops *ops = solib_ops (target_gdbarch);
+ struct target_so_ops *ops = solib_ops (target_gdbarch ());
free_so_symbols (so);
ops->free_so (so);
static void
update_solib_list (int from_tty, struct target_ops *target)
{
- struct target_so_ops *ops = solib_ops (target_gdbarch);
+ struct target_so_ops *ops = solib_ops (target_gdbarch ());
struct so_list *inferior = ops->current_sos();
struct so_list *gdb, **gdb_link;
if (loaded_any_symbols)
{
- struct target_so_ops *ops = solib_ops (target_gdbarch);
+ struct target_so_ops *ops = solib_ops (target_gdbarch ());
/* Getting new symbols may change our opinion about what is
frameless. */
int addr_width;
int nr_libs;
struct cleanup *table_cleanup;
- struct gdbarch *gdbarch = target_gdbarch;
+ struct gdbarch *gdbarch = target_gdbarch ();
struct ui_out *uiout = current_uiout;
if (pattern)
int
solib_keep_data_in_core (CORE_ADDR vaddr, unsigned long size)
{
- struct target_so_ops *ops = solib_ops (target_gdbarch);
+ struct target_so_ops *ops = solib_ops (target_gdbarch ());
if (ops->keep_data_in_core)
return ops->keep_data_in_core (vaddr, size);
void
clear_solib (void)
{
- struct target_so_ops *ops = solib_ops (target_gdbarch);
+ struct target_so_ops *ops = solib_ops (target_gdbarch ());
/* This function is expected to handle ELF shared libraries. It is
also used on Solaris, which can run either ELF or a.out binaries
void
solib_create_inferior_hook (int from_tty)
{
- struct target_so_ops *ops = solib_ops (target_gdbarch);
+ struct target_so_ops *ops = solib_ops (target_gdbarch ());
ops->solib_create_inferior_hook (from_tty);
}
int
in_solib_dynsym_resolve_code (CORE_ADDR pc)
{
- struct target_so_ops *ops = solib_ops (target_gdbarch);
+ struct target_so_ops *ops = solib_ops (target_gdbarch ());
return ops->in_dynsym_resolve_code (pc);
}
reload_shared_libraries_1 (from_tty);
- ops = solib_ops (target_gdbarch);
+ ops = solib_ops (target_gdbarch ());
/* Creating inferior hooks here has two purposes. First, if we reload
shared libraries then the address of solib breakpoint we've computed
const char *name,
const domain_enum domain)
{
- struct target_so_ops *ops = solib_ops (target_gdbarch);
+ struct target_so_ops *ops = solib_ops (target_gdbarch ());
if (ops->lookup_lib_global_symbol != NULL)
return ops->lookup_lib_global_symbol (objfile, name, domain);