GDB (xrefs)
|
#include "defs.h"
#include "gdbcore.h"
#include "gdb_string.h"
#include "target.h"
#include "inferior.h"
#include "inf-child.h"
#include "inf-ptrace.h"
#include "regcache.h"
#include "symfile.h"
#include "gdb_wait.h"
#include "gdbthread.h"
#include "gdb_bfd.h"
#include <sys/ptrace.h>
#include <asm/ptrace.h>
#include <sys/types.h>
#include "spu-tdep.h"
Go to the source code of this file.
#define INSTR_SC 0x44000002 |
Definition at line 41 of file spu-linux-nat.c.
Referenced by parse_spufs_run().
#define NR_spu_run 0x0116 |
Definition at line 42 of file spu-linux-nat.c.
Referenced by parse_spufs_run().
void _initialize_spu_nat | ( | void | ) |
Definition at line 616 of file spu-linux-nat.c.
References add_target(), inf_ptrace_target(), spu_can_use_hw_breakpoint(), spu_child_post_attach(), spu_child_post_startup_inferior(), spu_child_wait(), spu_fetch_inferior_registers(), spu_store_inferior_registers(), spu_xfer_partial(), target_ops::to_can_use_hw_breakpoint, target_ops::to_fetch_registers, target_ops::to_post_attach, target_ops::to_post_startup_inferior, target_ops::to_store_registers, target_ops::to_wait, and target_ops::to_xfer_partial.
static int fetch_ppc_memory | ( | ULONGEST | memaddr, |
gdb_byte * | myaddr, | ||
int | len | ||
) | [static] |
Definition at line 127 of file spu-linux-nat.c.
References fetch_ppc_memory_1(), inferior_ptid, len, memcpy(), ptid_get_lwp(), ptid_get_pid(), PTRACE_TYPE_RET, and ULONGEST.
Referenced by parse_spufs_run(), spu_bfd_iovec_pread(), and spu_fetch_inferior_registers().
static int fetch_ppc_memory_1 | ( | int | tid, |
ULONGEST | memaddr, | ||
PTRACE_TYPE_RET * | word | ||
) | [static] |
Definition at line 89 of file spu-linux-nat.c.
References PT_READ_I, ptrace(), and PTRACE_TYPE_ARG3.
Referenced by fetch_ppc_memory(), and store_ppc_memory().
static ULONGEST fetch_ppc_register | ( | int | regno | ) | [static] |
Definition at line 47 of file spu-linux-nat.c.
References _, inferior_ptid, gdb::printing::long, perror_with_name(), PT_READ_U, ptid_get_lwp(), ptid_get_pid(), ptrace(), PTRACE_TYPE_ARG3, PTRACE_TYPE_RET, ULONGEST, and xsnprintf().
Referenced by parse_spufs_run().
static int parse_spufs_run | ( | int * | fd, |
ULONGEST * | addr | ||
) | [static] |
Definition at line 206 of file spu-linux-nat.c.
References extract_unsigned_integer(), fetch_ppc_memory(), fetch_ppc_register(), gdbarch_byte_order(), INSTR_SC, NR_spu_run, gdbarch_tdep::pc, target_gdbarch(), and ULONGEST.
Referenced by spu_child_post_attach(), spu_child_post_startup_inferior(), spu_fetch_inferior_registers(), spu_store_inferior_registers(), and spu_xfer_partial().
static int spu_bfd_iovec_close | ( | struct bfd * | nbfd, |
void * | stream | ||
) | [static] |
static void* spu_bfd_iovec_open | ( | struct bfd * | nbfd, |
void * | open_closure | ||
) | [static] |
Definition at line 270 of file spu-linux-nat.c.
Referenced by spu_bfd_open().
static file_ptr spu_bfd_iovec_pread | ( | struct bfd * | abfd, |
void * | stream, | ||
void * | buf, | ||
file_ptr | nbytes, | ||
file_ptr | offset | ||
) | [static] |
Definition at line 285 of file spu-linux-nat.c.
References fetch_ppc_memory(), and ULONGEST.
Referenced by spu_bfd_open().
static int spu_bfd_iovec_stat | ( | struct bfd * | abfd, |
void * | stream, | ||
struct stat * | sb | ||
) | [static] |
Definition at line 300 of file spu-linux-nat.c.
Referenced by spu_bfd_open().
static bfd* spu_bfd_open | ( | ULONGEST | addr | ) | [static] |
Definition at line 312 of file spu-linux-nat.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(), ULONGEST, xfree(), and xmalloc().
Referenced by spu_symbol_file_add_from_memory().
static int spu_can_use_hw_breakpoint | ( | int | type, |
int | cnt, | ||
int | othertype | ||
) | [static] |
Definition at line 608 of file spu-linux-nat.c.
Referenced by _initialize_spu_nat().
static void spu_child_post_attach | ( | int | pid | ) | [static] |
Definition at line 411 of file spu-linux-nat.c.
References get_exec_file(), parse_spufs_run(), PT_SYSCALL, ptrace(), PTRACE_TYPE_ARG3, spu_symbol_file_add_from_memory(), and ULONGEST.
Referenced by _initialize_spu_nat().
static void spu_child_post_startup_inferior | ( | ptid_t | ptid | ) | [static] |
Definition at line 392 of file spu-linux-nat.c.
References parse_spufs_run(), PT_SYSCALL, ptid_get_lwp(), ptid_get_pid(), ptrace(), PTRACE_TYPE_ARG3, and ULONGEST.
Referenced by _initialize_spu_nat().
static ptid_t spu_child_wait | ( | struct target_ops * | ops, |
ptid_t | ptid, | ||
struct target_waitstatus * | ourstatus, | ||
int | options | ||
) | [static] |
Definition at line 434 of file spu-linux-nat.c.
References _, clear_sigint_trap(), inferior_ptid, target_waitstatus::kind, pid_to_ptid(), ptid_get_pid(), safe_strerror(), set_sigint_trap(), target_waitstatus::sig, exsummary::status, store_waitstatus(), TARGET_WAITKIND_SIGNALLED, target_waitstatus::value, and warning().
Referenced by _initialize_spu_nat().
static void spu_fetch_inferior_registers | ( | struct target_ops * | ops, |
struct regcache * | regcache, | ||
int | regno | ||
) | [static] |
Definition at line 483 of file spu-linux-nat.c.
References gdbarch::byte_order, fetch_ppc_memory(), gdbarch_byte_order(), get_regcache_arch(), parse_spufs_run(), regcache_raw_supply(), SPU_ID_REGNUM, SPU_NUM_GPRS, SPU_PC_REGNUM, spu_proc_xfer_spu(), store_unsigned_integer(), ULONGEST, and xsnprintf().
Referenced by _initialize_spu_nat().
static LONGEST spu_proc_xfer_spu | ( | const char * | annex, |
gdb_byte * | readbuf, | ||
const gdb_byte * | writebuf, | ||
ULONGEST | offset, | ||
LONGEST | len | ||
) | [static] |
Definition at line 232 of file spu-linux-nat.c.
References inferior_ptid, ptid_get_pid(), read(), and xsnprintf().
Referenced by spu_fetch_inferior_registers(), spu_store_inferior_registers(), spu_symbol_file_add_from_memory(), and spu_xfer_partial().
static void spu_store_inferior_registers | ( | struct target_ops * | ops, |
struct regcache * | regcache, | ||
int | regno | ||
) | [static] |
Definition at line 527 of file spu-linux-nat.c.
References parse_spufs_run(), regcache_raw_collect(), SPU_NUM_GPRS, SPU_PC_REGNUM, spu_proc_xfer_spu(), store_ppc_memory(), ULONGEST, and xsnprintf().
Referenced by _initialize_spu_nat().
static void spu_symbol_file_add_from_memory | ( | int | inferior_fd | ) | [static] |
Definition at line 357 of file spu-linux-nat.c.
References do_cleanups(), len, make_cleanup_bfd_unref(), spu_bfd_open(), spu_proc_xfer_spu(), strtoulst(), symbol_file_add_from_bfd(), SYMFILE_MAINLINE, SYMFILE_VERBOSE, ULONGEST, and xsnprintf().
Referenced by spu_child_post_attach().
static LONGEST spu_xfer_partial | ( | struct target_ops * | ops, |
enum target_object | object, | ||
const char * | annex, | ||
gdb_byte * | readbuf, | ||
const gdb_byte * | writebuf, | ||
ULONGEST | offset, | ||
LONGEST | len | ||
) | [static] |
Definition at line 562 of file spu-linux-nat.c.
References LONGEST, memset(), parse_spufs_run(), spu_proc_xfer_spu(), strtoulst(), TARGET_OBJECT_MEMORY, TARGET_OBJECT_SPU, ULONGEST, and xsnprintf().
Referenced by _initialize_spu_nat().
Definition at line 157 of file spu-linux-nat.c.
References fetch_ppc_memory_1(), inferior_ptid, len, memcpy(), ptid_get_lwp(), ptid_get_pid(), PTRACE_TYPE_RET, store_ppc_memory_1(), and ULONGEST.
Referenced by spu_store_inferior_registers().
static int store_ppc_memory_1 | ( | int | tid, |
ULONGEST | memaddr, | ||
PTRACE_TYPE_RET | word | ||
) | [static] |
Definition at line 108 of file spu-linux-nat.c.
References PT_WRITE_D, ptrace(), and PTRACE_TYPE_ARG3.
Referenced by store_ppc_memory().