GDB (xrefs)

Functions | Variables
/tmp/gdb-8.1/gdb/xtensa-linux-nat.c File Reference
`#include "defs.h"`
`#include "frame.h"`
`#include "inferior.h"`
`#include "gdbcore.h"`
`#include "regcache.h"`
`#include "target.h"`
`#include "linux-nat.h"`
`#include <sys/types.h>`
`#include <signal.h>`
`#include <sys/user.h>`
`#include <sys/ioctl.h>`
`#include "gdb_wait.h"`
`#include <fcntl.h>`
`#include <sys/procfs.h>`
`#include "nat/gdb_ptrace.h"`
`#include <asm/ptrace.h>`
`#include "gregset.h"`
`#include "xtensa-tdep.h"`
`#include "gdb_proc_service.h"`
`#include "xtensa-xtregs.c"`

Go to the source code of this file.

## Functions
void | fill_gregset (const struct regcache *regcache, gdb_gregset_t *gregsetp, int regnum)
static void | supply_gregset_reg (struct regcache *regcache, const gdb_gregset_t *gregsetp, int regnum)
void | supply_gregset (struct regcache *regcache, const gdb_gregset_t *gregsetp)
void | fill_fpregset (const struct regcache *regcache, gdb_fpregset_t *fpregsetp, int regnum)
void | supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
static void | fetch_gregs (struct regcache *regcache, int regnum)
static void | store_gregs (struct regcache *regcache, int regnum)
static void | fetch_xtregs (struct regcache *regcache, int regnum)
static void | store_xtregs (struct regcache *regcache, int regnum)
static void | xtensa_linux_fetch_inferior_registers (struct target_ops *ops, struct regcache *regcache, int regnum)
static void | xtensa_linux_store_inferior_registers (struct target_ops *ops, struct regcache *regcache, int regnum)
ps_err_e | ps_get_thread_area (struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base)
void | _initialize_xtensa_linux_nat (void)

## Variables
static int | xtreg_lo
static int | xtreg_high

## Function Documentation

## ◆ _initialize_xtensa_linux_nat()

void _initialize_xtensa_linux_nat | ( | void |  | ) |

Definition at line 342 of file xtensa-linux-nat.c.

References xtensa_regtable_t::gdb_regnum, linux_nat_add_target(), linux_target(), xtensa_regtable_t::name, target_ops::to_fetch_registers, target_ops::to_store_registers, xtensa_linux_fetch_inferior_registers(), xtensa_linux_store_inferior_registers(), xtensa_regmap_table, xtreg_high, and xtreg_lo.

## ◆ fetch_gregs()

static void fetch_gregs | ( | struct regcache * | regcache,
|  | int | regnum
| ) |  |
| static

Definition at line 211 of file xtensa-linux-nat.c.

References _, perror_with_name(), ptid_get_lwp(), ptrace(), PTRACE_GETREGS, regcache_get_ptid(), regnum, supply_gregset_reg(), and selftests::ptid::tid.

Referenced by xtensa_linux_fetch_inferior_registers().

## ◆ fetch_xtregs()

static void fetch_xtregs | ( | struct regcache * | regcache,
|  | int | regnum
| ) |  |
| static

Definition at line 258 of file xtensa-linux-nat.c.

References _, xtensa_regtable_t::gdb_regnum, xtensa_regtable_t::name, perror_with_name(), ptid_get_lwp(), ptrace(), xtensa_regtable_t::ptrace_offset, regcache_get_ptid(), regcache_raw_supply(), regnum, selftests::ptid::tid, XTENSA_ELF_XTREG_SIZE, and xtensa_regmap_table.

Referenced by xtensa_linux_fetch_inferior_registers().

## ◆ fill_fpregset()

void fill_fpregset | ( | const struct regcache * | regcache,
|  | gdb_fpregset_t * | fpregsetp,
|  | int | regnum
| ) |  |

Definition at line 194 of file xtensa-linux-nat.c.

References aarch64_linux_fpregset, AARCH64_LINUX_SIZEOF_FPREGSET, and regcache_collect_regset().

## ◆ fill_gregset()

void fill_gregset | ( | const struct regcache * | regcache,
|  | gdb_gregset_t * | gregsetp,
|  | int | regnum
| ) |  |

Definition at line 49 of file xtensa-linux-nat.c.

References gdbarch_tdep::a0_base, aarch64_linux_gregset, AARCH64_LINUX_SIZEOF_GREGSET, xtensa_elf_gregset_t::ar, gdbarch_tdep::ar_base, regcache::arch(), C0_NREGS, gdbarch_pc_regnum(), gdbarch_ps_regnum(), gdbarch_tdep(), xtensa_elf_gregset_t::lbeg, xtensa_elf_gregset_t::lcount, xtensa_elf_gregset_t::lend, gdbarch_tdep::num_aregs, xtensa_elf_gregset_t::pc, xtensa_elf_gregset_t::ps, regcache_collect_regset(), regcache_raw_collect(), regnum, xtensa_elf_gregset_t::sar, xtensa_elf_gregset_t::threadptr, xtensa_elf_gregset_t::windowbase, and xtensa_elf_gregset_t::windowstart.

Referenced by store_gregs().

## ◆ ps_get_thread_area()

ps_err_e ps_get_thread_area | ( | struct ps_prochandle * | ph,
|  | lwpid_t | lwpid,
|  | int | idx,
|  | void ** | base
| ) |  |

Definition at line 325 of file xtensa-linux-nat.c.

References aarch64_ps_get_thread_area(), gdbarch_bfd_arch_info(), PS_ERR, PS_OK, ptrace(), PTRACE_GETREGS, target_gdbarch(), and xtensa_elf_gregset_t::threadptr.

## ◆ store_gregs()

static void store_gregs | ( | struct regcache * | regcache,
|  | int | regnum
| ) |  |
| static

Definition at line 230 of file xtensa-linux-nat.c.

References _, fill_gregset(), perror_with_name(), ptid_get_lwp(), ptrace(), PTRACE_GETREGS, PTRACE_SETREGS, regcache_get_ptid(), regnum, and selftests::ptid::tid.

Referenced by xtensa_linux_store_inferior_registers().

## ◆ store_xtregs()

static void store_xtregs | ( | struct regcache * | regcache,
|  | int | regnum
| ) |  |
| static

Definition at line 274 of file xtensa-linux-nat.c.

References _, xtensa_regtable_t::gdb_regnum, xtensa_regtable_t::name, perror_with_name(), ptid_get_lwp(), ptrace(), xtensa_regtable_t::ptrace_offset, regcache_get_ptid(), regcache_raw_collect(), regnum, selftests::ptid::tid, XTENSA_ELF_XTREG_SIZE, and xtensa_regmap_table.

Referenced by xtensa_linux_store_inferior_registers().

## ◆ supply_fpregset()

void supply_fpregset | ( | struct regcache * | regcache,
|  | const gdb_fpregset_t * | fpregsetp
| ) |  |

Definition at line 201 of file xtensa-linux-nat.c.

References aarch64_linux_fpregset, AARCH64_LINUX_SIZEOF_FPREGSET, and regcache_supply_regset().

## ◆ supply_gregset()

void supply_gregset | ( | struct regcache * | regcache,
|  | const gdb_gregset_t * | gregsetp
| ) |  |

Definition at line 188 of file xtensa-linux-nat.c.

References aarch64_linux_gregset, AARCH64_LINUX_SIZEOF_GREGSET, regcache_supply_regset(), and supply_gregset_reg().

## ◆ supply_gregset_reg()

static void supply_gregset_reg | ( | struct regcache * | regcache,
|  | const gdb_gregset_t * | gregsetp,
|  | int | regnum
| ) |  |
| static

Definition at line 118 of file xtensa-linux-nat.c.

References gdbarch_tdep::a0_base, xtensa_elf_gregset_t::ar, gdbarch_tdep::ar_base, regcache::arch(), C0_NREGS, gdbarch_pc_regnum(), gdbarch_ps_regnum(), gdbarch_tdep(), xtensa_elf_gregset_t::lbeg, xtensa_elf_gregset_t::lcount, xtensa_elf_gregset_t::lend, gdbarch_tdep::num_aregs, xtensa_elf_gregset_t::pc, xtensa_elf_gregset_t::ps, regcache_raw_supply(), regnum, xtensa_elf_gregset_t::sar, xtensa_elf_gregset_t::threadptr, xtensa_elf_gregset_t::windowbase, and xtensa_elf_gregset_t::windowstart.

Referenced by fetch_gregs(), and supply_gregset().

## ◆ xtensa_linux_fetch_inferior_registers()

static void xtensa_linux_fetch_inferior_registers | ( | struct target_ops * | ops,
|  | struct regcache * | regcache,
|  | int | regnum
| ) |  |
| static

Definition at line 293 of file xtensa-linux-nat.c.

References fetch_gregs(), fetch_xtregs(), regnum, xtreg_high, and xtreg_lo.

Referenced by _initialize_xtensa_linux_nat().

## ◆ xtensa_linux_store_inferior_registers()

static void xtensa_linux_store_inferior_registers | ( | struct target_ops * | ops,
|  | struct regcache * | regcache,
|  | int | regnum
| ) |  |
| static

Definition at line 308 of file xtensa-linux-nat.c.

References regnum, store_gregs(), store_xtregs(), xtreg_high, and xtreg_lo.

Referenced by _initialize_xtensa_linux_nat().

## Variable Documentation

## ◆ xtreg_high

int xtreg_high
| static

Definition at line 252 of file xtensa-linux-nat.c.

Referenced by _initialize_xtensa_linux_nat(), xtensa_linux_fetch_inferior_registers(), and xtensa_linux_store_inferior_registers().

## ◆ xtreg_lo

int xtreg_lo
| static

Definition at line 251 of file xtensa-linux-nat.c.

Referenced by _initialize_xtensa_linux_nat(), xtensa_linux_fetch_inferior_registers(), and xtensa_linux_store_inferior_registers().