GDB (xrefs)
|
#include "defs.h"
#include "solib-spu.h"
#include "gdbcore.h"
#include "gdb_string.h"
#include "gdb_assert.h"
#include "gdb_stat.h"
#include "arch-utils.h"
#include "bfd.h"
#include "symtab.h"
#include "solib.h"
#include "solib-svr4.h"
#include "solist.h"
#include "inferior.h"
#include "objfiles.h"
#include "observer.h"
#include "breakpoint.h"
#include "gdbthread.h"
#include "exceptions.h"
#include "gdb_bfd.h"
#include "spu-tdep.h"
Go to the source code of this file.
Defines | |
#define | MAX_SPE_FD 1024 |
#define | spu_standalone_p() |
Functions | |
static void | spu_relocate_main_executable (int spufs_fd) |
static void | spu_skip_standalone_loader (void) |
static void | append_ocl_sos (struct so_list **link_ptr) |
static struct so_list * | spu_current_sos (void) |
static void | spu_free_so (struct so_list *so) |
static void | spu_relocate_section_addresses (struct so_list *so, struct target_section *sec) |
static void * | spu_bfd_iovec_open (bfd *nbfd, void *open_closure) |
static int | spu_bfd_iovec_close (bfd *nbfd, void *stream) |
static file_ptr | spu_bfd_iovec_pread (bfd *abfd, void *stream, void *buf, file_ptr nbytes, file_ptr offset) |
static int | spu_bfd_iovec_stat (bfd *abfd, void *stream, struct stat *sb) |
static bfd * | spu_bfd_fopen (char *name, CORE_ADDR addr) |
static bfd * | spu_bfd_open (char *pathname) |
static struct symbol * | spu_lookup_lib_symbol (const struct objfile *objfile, const char *name, const domain_enum domain) |
static int | spu_enable_break (struct objfile *objfile) |
static void | ocl_enable_break (struct objfile *objfile) |
static void | spu_solib_create_inferior_hook (int from_tty) |
void | set_spu_solib_ops (struct gdbarch *gdbarch) |
static void | spu_solib_loaded (struct so_list *so) |
void | _initialize_spu_solib (void) |
Variables | |
static struct objfile_data * | ocl_program_data_key |
initialize_file_ftype | _initialize_spu_solib |
#define MAX_SPE_FD 1024 |
Definition at line 44 of file solib-spu.c.
Referenced by spu_current_sos().
#define spu_standalone_p | ( | ) |
(symfile_objfile && symfile_objfile->obfd \ && bfd_get_arch (symfile_objfile->obfd) == bfd_arch_spu)
Definition at line 47 of file solib-spu.c.
Referenced by spu_current_sos(), and spu_solib_create_inferior_hook().
void _initialize_spu_solib | ( | void | ) |
Definition at line 552 of file solib-spu.c.
References _initialize_spu_solib, observer_attach_solib_loaded(), ocl_program_data_key, and spu_solib_loaded().
static void append_ocl_sos | ( | struct so_list ** | link_ptr | ) | [static] |
Definition at line 104 of file solib-spu.c.
References ALL_OBJFILES, gdb_exception::error, hex_string(), MEMORY_ERROR, so_list::next, objfile::obfd, ocl_program_data_key, read_memory_unsigned_integer(), gdb_exception::reason, RETURN_MASK_ALL, SPUADDR_SPU, throw_exception(), TRY_CATCH, xsnprintf(), and XZALLOC.
Referenced by spu_current_sos().
static void ocl_enable_break | ( | struct objfile * | objfile | ) | [static] |
Definition at line 435 of file solib-spu.c.
References create_solib_event_breakpoint(), get_objfile_arch(), lookup_minimal_symbol(), objfile::objfile_obstack, OBSTACK_CALLOC, ocl_program_data_key, objfile::sections, objfile::sections_end, and SYMBOL_VALUE_ADDRESS.
Referenced by spu_solib_loaded().
void set_spu_solib_ops | ( | struct gdbarch * | gdbarch | ) |
Definition at line 509 of file solib-spu.c.
References target_so_ops::bfd_open, target_so_ops::current_sos, target_so_ops::free_so, target_so_ops::lookup_lib_global_symbol, target_so_ops::relocate_section_addresses, set_solib_ops(), target_so_ops::solib_create_inferior_hook, spu_bfd_open(), spu_current_sos(), spu_free_so(), spu_lookup_lib_symbol(), spu_relocate_section_addresses(), spu_solib_create_inferior_hook(), and svr4_so_ops.
Referenced by ppc_linux_init_abi().
static bfd* spu_bfd_fopen | ( | char * | name, |
CORE_ADDR | addr | ||
) | [static] |
Definition at line 324 of file solib-spu.c.
References gdb_bfd_openr_iovec(), gdb_bfd_unref(), spu_bfd_iovec_close(), spu_bfd_iovec_open(), spu_bfd_iovec_pread(), spu_bfd_iovec_stat(), and xmalloc().
Referenced by spu_bfd_open().
static int spu_bfd_iovec_close | ( | bfd * | nbfd, |
void * | stream | ||
) | [static] |
static void* spu_bfd_iovec_open | ( | bfd * | nbfd, |
void * | open_closure | ||
) | [static] |
Definition at line 280 of file solib-spu.c.
Referenced by spu_bfd_fopen().
static file_ptr spu_bfd_iovec_pread | ( | bfd * | abfd, |
void * | stream, | ||
void * | buf, | ||
file_ptr | nbytes, | ||
file_ptr | offset | ||
) | [static] |
Definition at line 295 of file solib-spu.c.
References target_read_memory().
Referenced by spu_bfd_fopen().
static int spu_bfd_iovec_stat | ( | bfd * | abfd, |
void * | stream, | ||
struct stat * | sb | ||
) | [static] |
Definition at line 312 of file solib-spu.c.
Referenced by spu_bfd_fopen().
static bfd* spu_bfd_open | ( | char * | pathname | ) | [static] |
Definition at line 349 of file solib-spu.c.
References _, so_list::abfd, target_so_ops::bfd_open, error(), internal_error(), spu_bfd_fopen(), strrchr(), svr4_so_ops, and xfree().
Referenced by set_spu_solib_ops().
static struct so_list* spu_current_sos | ( | void | ) | [static, read] |
Definition at line 159 of file solib-spu.c.
References append_ocl_sos(), target_so_ops::current_sos, current_target, enable_breakpoints_after_startup(), extract_unsigned_integer(), gdbarch_byte_order(), hex_string(), len, MAX_SPE_FD, so_list::next, size, spu_relocate_main_executable(), spu_standalone_p, svr4_so_ops, target_gdbarch(), TARGET_OBJECT_SPU, target_read(), xsnprintf(), and XZALLOC.
Referenced by set_spu_solib_ops().
static int spu_enable_break | ( | struct objfile * | objfile | ) | [static] |
Definition at line 409 of file solib-spu.c.
References create_solib_event_breakpoint(), current_target, gdbarch_convert_from_func_ptr_addr(), lookup_minimal_symbol(), SYMBOL_VALUE_ADDRESS, and target_gdbarch().
Referenced by spu_solib_create_inferior_hook(), and spu_solib_loaded().
static void spu_free_so | ( | struct so_list * | so | ) | [static] |
Definition at line 240 of file solib-spu.c.
References target_so_ops::free_so, so_list::so_original_name, and svr4_so_ops.
Referenced by set_spu_solib_ops().
static struct symbol* spu_lookup_lib_symbol | ( | const struct objfile * | objfile, |
const char * | name, | ||
const domain_enum | domain | ||
) | [static, read] |
Definition at line 395 of file solib-spu.c.
References lookup_global_symbol_from_objfile(), target_so_ops::lookup_lib_global_symbol, objfile::obfd, and svr4_so_ops.
Referenced by set_spu_solib_ops().
static void spu_relocate_main_executable | ( | int | spufs_fd | ) | [static] |
Definition at line 54 of file solib-spu.c.
References objfile_relocate(), section_offsets::offsets, SPUADDR, and symfile_objfile.
Referenced by spu_current_sos(), and spu_solib_create_inferior_hook().
static void spu_relocate_section_addresses | ( | struct so_list * | so, |
struct target_section * | sec | ||
) | [static] |
Definition at line 248 of file solib-spu.c.
References target_section::addr, so_list::addr_high, so_list::addr_low, target_section::endaddr, internal_error(), target_so_ops::relocate_section_addresses, so_list::so_original_name, SPUADDR, svr4_so_ops, and target_section::the_bfd_section.
Referenced by set_spu_solib_ops().
static void spu_skip_standalone_loader | ( | void | ) | [static] |
Definition at line 74 of file solib-spu.c.
References thread_info::control, current_inferior(), thread_control_state::in_infcall, inferior_ptid, inferior_thread(), minus_one_ptid, set_executing(), target_has_execution, target_resume(), and target_wait().
Referenced by spu_solib_create_inferior_hook().
static void spu_solib_create_inferior_hook | ( | int | from_tty | ) | [static] |
Definition at line 471 of file solib-spu.c.
References disable_breakpoints_before_startup(), target_so_ops::solib_create_inferior_hook, spu_enable_break(), spu_relocate_main_executable(), spu_skip_standalone_loader(), spu_standalone_p, and svr4_so_ops.
Referenced by set_spu_solib_ops().
static void spu_solib_loaded | ( | struct so_list * | so | ) | [static] |
Definition at line 532 of file solib-spu.c.
References so_list::objfile, ocl_enable_break(), so_list::so_name, so_list::so_original_name, solib_read_symbols(), spu_enable_break(), and strstr().
Referenced by _initialize_spu_solib().
Referenced by _initialize_spu_solib(), and initialize_all_files().
struct objfile_data* ocl_program_data_key [static] |
Definition at line 100 of file solib-spu.c.
Referenced by _initialize_spu_solib(), append_ocl_sos(), and ocl_enable_break().