GDB (xrefs)

Macros | Functions | Variables
/tmp/gdb-8.1/gdb/rs6000-nat.c File Reference
`#include "defs.h"`
`#include "inferior.h"`
`#include "target.h"`
`#include "gdbcore.h"`
`#include "symfile.h"`
`#include "objfiles.h"`
`#include "bfd.h"`
`#include "gdb-stabs.h"`
`#include "regcache.h"`
`#include "arch-utils.h"`
`#include "inf-child.h"`
`#include "inf-ptrace.h"`
`#include "ppc-tdep.h"`
`#include "rs6000-tdep.h"`
`#include "rs6000-aix-tdep.h"`
`#include "exec.h"`
`#include "observer.h"`
`#include "xcoffread.h"`
`#include <sys/ptrace.h>`
`#include <sys/reg.h>`
`#include <sys/dir.h>`
`#include <sys/user.h>`
`#include <signal.h>`
`#include <sys/ioctl.h>`
`#include <fcntl.h>`
`#include <a.out.h>`
`#include <sys/file.h>`
`#include <sys/stat.h>`
`#include "gdb_bfd.h"`
`#include <sys/core.h>`
`#include <sys/ldr.h>`
`#include <sys/systemcfg.h>`

Go to the source code of this file.

## Macros
#define | __LDINFO_PTRACE32__ /* for __ld_info32 */
#define | __LDINFO_PTRACE64__ /* for __ld_info64 */
#define | ARCH64() 0

## Functions
static int | regmap (struct gdbarch *gdbarch, int regno, int *isfloat)
static int | rs6000_ptrace32 (int req, int id, int *addr, int data, int *buf)
static int | rs6000_ptrace64 (int req, int id, long long addr, int data, void *buf)
static void | fetch_register (struct regcache *regcache, int regno)
static void | store_register (struct regcache *regcache, int regno)
static void | rs6000_fetch_inferior_registers (struct target_ops *ops, struct regcache *regcache, int regno)
static void | rs6000_store_inferior_registers (struct target_ops *ops, struct regcache *regcache, int regno)
static enum target_xfer_status | rs6000_xfer_partial (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
static ptid_t | rs6000_wait (struct target_ops *ops, ptid_t ptid, struct target_waitstatus *ourstatus, int options)
static void | rs6000_create_inferior (struct target_ops *ops, const char *exec_file, const std::string &allargs, char **env, int from_tty)
static gdb_byte * | rs6000_ptrace_ldinfo (ptid_t ptid)
static enum target_xfer_status | rs6000_xfer_shared_libraries (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
void | _initialize_rs6000_nat (void)

## Variables
static target_xfer_partial_ftype | rs6000_xfer_shared_libraries
static void(* | super_create_inferior )(struct target_ops *, const char *exec_file, const std::string &allargs, char **env, int from_tty)

## Macro Definition Documentation

## ◆ __LDINFO_PTRACE32__

#define __LDINFO_PTRACE32__ /* for __ld_info32 */

Definition at line 53 of file rs6000-nat.c.

## ◆ __LDINFO_PTRACE64__

#define __LDINFO_PTRACE64__ /* for __ld_info64 */

Definition at line 54 of file rs6000-nat.c.

## ◆ ARCH64

#define ARCH64 | ( |  | ) | 0

Definition at line 72 of file rs6000-nat.c.

Referenced by fetch_register(), rs6000_ptrace_ldinfo(), rs6000_xfer_partial(), and store_register().

## Function Documentation

## ◆ _initialize_rs6000_nat()

void _initialize_rs6000_nat | ( | void |  | ) |

Definition at line 659 of file rs6000-nat.c.

References add_target(), inf_ptrace_target(), rs6000_create_inferior(), rs6000_fetch_inferior_registers(), rs6000_store_inferior_registers(), rs6000_wait(), rs6000_xfer_partial(), super_create_inferior, target_ops::to_create_inferior, target_ops::to_fetch_registers, target_ops::to_store_registers, target_ops::to_wait, and target_ops::to_xfer_partial.

## ◆ fetch_register()

static void fetch_register | ( | struct regcache * | regcache,
|  | int | regno
| ) |  |
| static

Definition at line 162 of file rs6000-nat.c.

References _, regcache::arch(), ARCH64, fprintf_unfiltered(), gdb_stderr, gdbarch_num_regs(), pid, PPC_MAX_REGISTER_SIZE, ptid_get_pid(), regcache_get_ptid(), regcache_raw_supply(), register_size(), regmap(), rs6000_ptrace32(), and rs6000_ptrace64().

Referenced by rs6000_fetch_inferior_registers().

## ◆ regmap()

static int regmap | ( | struct gdbarch * | gdbarch,
|  | int | regno,
|  | int * | isfloat
| ) |  |
| static

Definition at line 85 of file rs6000-nat.c.

References gdbarch_pc_regnum(), gdbarch_tdep(), MSR, gdbarch_tdep::ppc_cr_regnum, gdbarch_tdep::ppc_ctr_regnum, gdbarch_tdep::ppc_fp0_regnum, gdbarch_tdep::ppc_fpscr_regnum, gdbarch_tdep::ppc_gp0_regnum, gdbarch_tdep::ppc_lr_regnum, gdbarch_tdep::ppc_mq_regnum, ppc_num_fprs, ppc_num_gprs, gdbarch_tdep::ppc_ps_regnum, and gdbarch_tdep::ppc_xer_regnum.

Referenced by fetch_register(), and store_register().

## ◆ rs6000_create_inferior()

static void rs6000_create_inferior | ( | struct target_ops * | ops,
|  | const char * | exec_file,
|  | const std::string & | allargs,
|  | char ** | env,
|  | int | from_tty
| ) |  |
| static

Definition at line 532 of file rs6000-nat.c.

References _, gdbarch_info::abfd, gdbarch_info::bfd_arch_info, exec_bfd, gdbarch_info_init(), gdbarch_update_p(), internal_error(), and super_create_inferior.

Referenced by _initialize_rs6000_nat().

## ◆ rs6000_fetch_inferior_registers()

static void rs6000_fetch_inferior_registers | ( | struct target_ops * | ops,
|  | struct regcache * | regcache,
|  | int | regno
| ) |  |
| static

Definition at line 281 of file rs6000-nat.c.

References regcache::arch(), fetch_register(), gdbarch_pc_regnum(), gdbarch_tdep(), gdbarch_tdep::ppc_cr_regnum, gdbarch_tdep::ppc_ctr_regnum, gdbarch_tdep::ppc_fp0_regnum, gdbarch_tdep::ppc_fpscr_regnum, gdbarch_tdep::ppc_gp0_regnum, gdbarch_tdep::ppc_lr_regnum, gdbarch_tdep::ppc_mq_regnum, ppc_num_fprs, ppc_num_gprs, gdbarch_tdep::ppc_ps_regnum, and gdbarch_tdep::ppc_xer_regnum.

Referenced by _initialize_rs6000_nat().

## ◆ rs6000_ptrace32()

static int rs6000_ptrace32 | ( | int | req,
|  | int | id,
|  | int * | addr,
|  | int | data,
|  | int * | buf
| ) |  |
| static

Definition at line 124 of file rs6000-nat.c.

References ptrace().

Referenced by fetch_register(), rs6000_ptrace_ldinfo(), rs6000_xfer_partial(), and store_register().

## ◆ rs6000_ptrace64()

static int rs6000_ptrace64 | ( | int | req,
|  | int | id,
|  | long long | addr,
|  | int | data,
|  | void * | buf
| ) |  |
| static

Definition at line 141 of file rs6000-nat.c.

References hex_string().

Referenced by fetch_register(), rs6000_ptrace_ldinfo(), rs6000_xfer_partial(), and store_register().

## ◆ rs6000_ptrace_ldinfo()

static gdb_byte* rs6000_ptrace_ldinfo | ( | ptid_t | ptid | ) |
| static

Definition at line 591 of file rs6000-nat.c.

References _, ARCH64, perror_with_name(), pid, ptid_get_pid(), rs6000_ptrace32(), rs6000_ptrace64(), xmalloc(), and xrealloc().

Referenced by rs6000_xfer_shared_libraries().

## ◆ rs6000_store_inferior_registers()

static void rs6000_store_inferior_registers | ( | struct target_ops * | ops,
|  | struct regcache * | regcache,
|  | int | regno
| ) |  |
| static

Definition at line 324 of file rs6000-nat.c.

References regcache::arch(), gdbarch_pc_regnum(), gdbarch_tdep(), gdbarch_tdep::ppc_cr_regnum, gdbarch_tdep::ppc_ctr_regnum, gdbarch_tdep::ppc_fp0_regnum, gdbarch_tdep::ppc_fpscr_regnum, gdbarch_tdep::ppc_gp0_regnum, gdbarch_tdep::ppc_lr_regnum, gdbarch_tdep::ppc_mq_regnum, ppc_num_fprs, ppc_num_gprs, gdbarch_tdep::ppc_ps_regnum, gdbarch_tdep::ppc_xer_regnum, and store_register().

Referenced by _initialize_rs6000_nat().

## ◆ rs6000_wait()

static ptid_t rs6000_wait | ( | struct target_ops * | ops,
|  | ptid_t | ptid,
|  | struct target_waitstatus * | ourstatus,
|  | int | options
| ) |  |
| static

Definition at line 471 of file rs6000-nat.c.

References _, clear_sigint_trap(), fprintf_unfiltered(), gdb_stderr, inferior_ptid, target_waitstatus::kind, pid, pid_to_ptid(), ptid_get_pid(), safe_strerror(), set_sigint_trap(), target_waitstatus::sig, status, store_waitstatus(), TARGET_WAITKIND_LOADED, TARGET_WAITKIND_SIGNALLED, TARGET_WAITKIND_SPURIOUS, target_waitstatus::value, and WIFSTOPPED.

Referenced by _initialize_rs6000_nat().

## ◆ rs6000_xfer_partial()

static enum target_xfer_status rs6000_xfer_partial | ( | struct target_ops * | ops,
|  | enum target_object | object,
|  | const char * | annex,
|  | gdb_byte * | readbuf,
|  | const gdb_byte * | writebuf,
|  | ULONGEST | offset,
|  | ULONGEST | len,
|  | ULONGEST * | xfered_len
| ) |  |
| static

Definition at line 365 of file rs6000-nat.c.

References ARCH64, arch64, inferior_ptid, offset, pid, PT_READ_I, PT_WRITE_D, ptid_get_pid(), PTRACE_TYPE_RET, rs6000_ptrace32(), rs6000_ptrace64(), rs6000_xfer_shared_libraries, TARGET_OBJECT_LIBRARIES_AIX, TARGET_OBJECT_MEMORY, TARGET_XFER_E_IO, TARGET_XFER_EOF, and TARGET_XFER_OK.

Referenced by _initialize_rs6000_nat().

## ◆ rs6000_xfer_shared_libraries()

static enum target_xfer_status rs6000_xfer_shared_libraries | ( | struct target_ops * | ops,
|  | enum target_object | object,
|  | const char * | annex,
|  | gdb_byte * | readbuf,
|  | const gdb_byte * | writebuf,
|  | ULONGEST | offset,
|  | ULONGEST | len,
|  | ULONGEST * | xfered_len
| ) |  |
| static

Definition at line 625 of file rs6000-nat.c.

References do_cleanups(), gdb_assert, inferior_ptid, make_cleanup(), offset, rs6000_aix_ld_info_to_xml(), rs6000_ptrace_ldinfo(), target_gdbarch(), target_has_execution, TARGET_XFER_E_IO, TARGET_XFER_EOF, TARGET_XFER_OK, and xfree().

## ◆ store_register()

static void store_register | ( | struct regcache * | regcache,
|  | int | regno
| ) |  |
| static

Definition at line 221 of file rs6000-nat.c.

References _, regcache::arch(), ARCH64, fprintf_unfiltered(), gdb_stderr, gdbarch_num_regs(), pid, PPC_MAX_REGISTER_SIZE, ptid_get_pid(), regcache_get_ptid(), regcache_raw_collect(), register_size(), regmap(), rs6000_ptrace32(), and rs6000_ptrace64().

Referenced by rs6000_store_inferior_registers().

## Variable Documentation

## ◆ rs6000_xfer_shared_libraries

target_xfer_partial_ftype rs6000_xfer_shared_libraries
| static

Definition at line 77 of file rs6000-nat.c.

Referenced by rs6000_xfer_partial().

## ◆ super_create_inferior

void(* super_create_inferior) (struct target_ops *, const char *exec_file, const std::string &allargs, char **env, int from_tty)
| static

Definition at line 527 of file rs6000-nat.c.

Referenced by _initialize_rs6000_nat(), and rs6000_create_inferior().