static void
fetch_pauth_masks_from_thread (struct regcache *regcache)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
+ aarch64_gdbarch_tdep *tdep
+ = (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
int ret;
struct iovec iovec;
uint64_t pauth_regset[2] = {0, 0};
static void
fetch_mteregs_from_thread (struct regcache *regcache)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
+ aarch64_gdbarch_tdep *tdep
+ = (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
int regno = tdep->mte_reg_base;
gdb_assert (regno != -1);
static void
store_mteregs_to_thread (struct regcache *regcache)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
+ aarch64_gdbarch_tdep *tdep
+ = (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
int regno = tdep->mte_reg_base;
gdb_assert (regno != -1);
aarch64_linux_nat_target::fetch_registers (struct regcache *regcache,
int regno)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
+ aarch64_gdbarch_tdep *tdep
+ = (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
if (regno == -1)
{
aarch64_linux_nat_target::store_registers (struct regcache *regcache,
int regno)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
+ aarch64_gdbarch_tdep *tdep
+ = (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
if (regno == -1)
{
return it if the current vector length matches the one in the tdep. */
inferior *inf = find_inferior_ptid (this, ptid);
gdb_assert (inf != NULL);
- if (vq == gdbarch_tdep (inf->gdbarch)->vq)
+ aarch64_gdbarch_tdep *tdep
+ = (aarch64_gdbarch_tdep *) gdbarch_tdep (inf->gdbarch);
+ if (vq == tdep->vq)
return inf->gdbarch;
/* We reach here if the vector length for the thread is different from its
static void
supply_gprs64 (struct regcache *regcache, uint64_t *vals)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
+ ppc_gdbarch_tdep *tdep
+ = (ppc_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
int regno;
for (regno = 0; regno < ppc_num_gprs; regno++)
supply_fprs (struct regcache *regcache, double *vals)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
int regno;
/* This function should never be called on architectures without
static int
special_register_p (struct gdbarch *gdbarch, int regno)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
return regno == gdbarch_pc_regnum (gdbarch)
|| regno == tdep->ppc_ps_regnum
uint32_t fpscr)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
regcache->raw_supply (gdbarch_pc_regnum (gdbarch), (char *) &iar);
regcache->raw_supply (tdep->ppc_ps_regnum, (char *) &msr);
uint32_t fpscr)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
regcache->raw_supply (gdbarch_pc_regnum (gdbarch), (char *) &iar);
regcache->raw_supply (tdep->ppc_ps_regnum, (char *) &msr);
fetch_regs_user_thread (struct regcache *regcache, pthdb_pthread_t pdtid)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
int status, i;
pthdb_context_t ctx;
pthdb_tid_t tid)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
uint64_t gprs64[ppc_num_gprs];
uint32_t gprs32[ppc_num_gprs];
double fprs[ppc_num_fprs];
static void
fill_gprs64 (const struct regcache *regcache, uint64_t *vals)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
+ ppc_gdbarch_tdep *tdep
+ = (ppc_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
int regno;
for (regno = 0; regno < ppc_num_gprs; regno++)
static void
fill_gprs32 (const struct regcache *regcache, uint32_t *vals)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
+ ppc_gdbarch_tdep *tdep
+ = (ppc_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
int regno;
for (regno = 0; regno < ppc_num_gprs; regno++)
fill_fprs (const struct regcache *regcache, double *vals)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
int regno;
/* This function should never be called on architectures without
uint32_t *fpscr)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
/* Verify that the size of the size of the IAR buffer is the
same as the raw size of the PC (in the register cache). If
uint32_t *fpscr)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
/* Verify that the size of the size of the IAR buffer is the
same as the raw size of the PC (in the register cache). If
store_regs_user_thread (const struct regcache *regcache, pthdb_pthread_t pdtid)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
int status, i;
pthdb_context_t ctx;
uint32_t int32;
pthdb_tid_t tid)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
uint64_t gprs64[ppc_num_gprs];
uint32_t gprs32[ppc_num_gprs];
double fprs[ppc_num_fprs];
struct gdbarch *gdbarch = regcache->arch ();
ptid_t ptid = regcache->ptid ();
#if defined(PT_GETFSBASE) || defined(PT_GETGSBASE)
- const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
#endif
if (regnum == -1 || amd64_native_gregset_supplies_p (gdbarch, regnum))
struct gdbarch *gdbarch = regcache->arch ();
ptid_t ptid = regcache->ptid ();
#if defined(PT_SETFSBASE) || defined(PT_SETGSBASE)
- const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
#endif
if (regnum == -1 || amd64_native_gregset_supplies_p (gdbarch, regnum))
gdb_byte regbuf[ARM_VFP3_REGS_SIZE];
int ret, tid;
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
/* Get the thread id for the ptrace call. */
tid = regcache->ptid ().lwp ();
gdb_byte regbuf[ARM_VFP3_REGS_SIZE];
int ret, tid;
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
/* Get the thread id for the ptrace call. */
tid = regcache->ptid ().lwp ();
arm_linux_nat_target::fetch_registers (struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
if (-1 == regno)
{
arm_linux_nat_target::store_registers (struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
if (-1 == regno)
{
static void
arm_supply_vfpregset (struct regcache *regcache, struct fpreg *fpregset)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
+ arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
if (tdep->vfp_register_count == 0)
return;
return;
}
- struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
+ arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
if (regno == ARM_FPSCR_REGNUM && tdep->vfp_register_count != 0)
regcache->raw_supply (ARM_FPSCR_REGNUM, (char *) &vfp.vfp_fpscr);
else if (regno >= ARM_D0_REGNUM
return;
}
- struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
+ arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
if (regno == ARM_FPSCR_REGNUM && tdep->vfp_register_count != 0)
regcache->raw_collect (ARM_FPSCR_REGNUM, (char *) &vfp.vfp_fpscr);
else if (regno >= ARM_D0_REGNUM
static void
store_fp_regs (const struct regcache *regcache)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
+ arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
int lwp = regcache->ptid ().lwp ();
if (tdep->vfp_register_count == 0)
return;
unw_word_t bsp, sof, cfm, psr, ip;
struct frame_info *this_frame = (struct frame_info *) arg;
struct gdbarch *gdbarch = get_frame_arch (this_frame);
+ ia64_gdbarch_tdep *tdep = (ia64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
/* We never call any libunwind routines that need to write registers. */
gdb_assert (!write);
the current register frame. */
bsp = get_frame_register_unsigned (this_frame, IA64_BSP_REGNUM);
cfm = get_frame_register_unsigned (this_frame, IA64_CFM_REGNUM);
- sof = gdbarch_tdep (gdbarch)->size_of_register_frame (this_frame, cfm);
+ sof = tdep->size_of_register_frame (this_frame, cfm);
*val = ia64_rse_skip_regs (bsp, -sof);
break;
static int
getfpregs_supplies (struct gdbarch *gdbarch, int regno)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
/* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
point registers. Traditionally, GDB's register set has still
ppcfbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
int i, regnum;
/* The stack pointer shouldn't be zero. */
ppc_register_u_addr (struct gdbarch *gdbarch, int regno)
{
int u_addr = -1;
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
/* NOTE: cagney/2003-11-25: This is the word size used by the ptrace
interface, and not the wordsize of the program's ABI. */
int wordsize = sizeof (long);
fetch_spe_register (struct regcache *regcache, int tid, int regno)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
struct gdb_evrregset_t evrregs;
gdb_assert (sizeof (evrregs.evr[0])
fetch_register (struct regcache *regcache, int tid, int regno)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
/* This isn't really an address. But ptrace thinks of it as one. */
CORE_ADDR regaddr = ppc_register_u_addr (gdbarch, regno);
int bytes_transferred;
fetch_gp_regs (struct regcache *regcache, int tid)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
int i;
if (have_ptrace_getsetregs)
fetch_fp_regs (struct regcache *regcache, int tid)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
int i;
if (have_ptrace_getsetfpregs)
fetch_ppc_registers (struct regcache *regcache, int tid)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
fetch_gp_regs (regcache, tid);
if (tdep->ppc_fp0_regnum >= 0)
store_spe_register (const struct regcache *regcache, int tid, int regno)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
struct gdb_evrregset_t evrregs;
gdb_assert (sizeof (evrregs.evr[0])
store_register (const struct regcache *regcache, int tid, int regno)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
/* This isn't really an address. But ptrace thinks of it as one. */
CORE_ADDR regaddr = ppc_register_u_addr (gdbarch, regno);
int i;
store_gp_regs (const struct regcache *regcache, int tid, int regno)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
int i;
if (have_ptrace_getsetregs)
store_fp_regs (const struct regcache *regcache, int tid, int regno)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
int i;
if (have_ptrace_getsetfpregs)
store_ppc_registers (const struct regcache *regcache, int tid)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
store_gp_regs (regcache, tid, -1);
if (tdep->ppc_fp0_regnum >= 0)
static int
getregs_supplies (struct gdbarch *gdbarch, int regnum)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
return ((regnum >= tdep->ppc_gp0_regnum
&& regnum < tdep->ppc_gp0_regnum + ppc_num_gprs)
static int
getfpregs_supplies (struct gdbarch *gdbarch, int regnum)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
/* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
point registers. Traditionally, GDB's register set has still
struct switchframe sf;
struct callframe cf;
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
int i;
/* The stack pointer shouldn't be zero. */
static int
getfpregs_supplies (struct gdbarch *gdbarch, int regnum)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
/* FIXME: jimb/2004-05-05: Some PPC variants don't have floating
point registers. Traditionally, GDB's register set has still
ppcobsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
struct switchframe sf;
struct callframe cf;
int i, regnum;
static int
regmap (struct gdbarch *gdbarch, int regno, int *isfloat)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
*isfloat = 0;
if (tdep->ppc_gp0_regnum <= regno
else
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
/* Read 32 general purpose registers. */
for (regno = tdep->ppc_gp0_regnum;
else
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
/* Write general purpose registers first. */
for (regno = tdep->ppc_gp0_regnum;
char *context_offset = context_ptr + mappings[r];
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
gdb_assert (!gdbarch_read_pc_p (gdbarch));
gdb_assert (gdbarch_pc_regnum (gdbarch) >= 0);
int i;
xtensa_elf_gregset_t *regs = (xtensa_elf_gregset_t *) gregsetp;
struct gdbarch *gdbarch = regcache->arch ();
+ xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1)
regcache->raw_collect (gdbarch_pc_regnum (gdbarch), ®s->pc);
if (regnum == gdbarch_ps_regnum (gdbarch) || regnum == -1)
regcache->raw_collect (gdbarch_ps_regnum (gdbarch), ®s->ps);
- if (regnum == gdbarch_tdep (gdbarch)->wb_regnum || regnum == -1)
- regcache->raw_collect (gdbarch_tdep (gdbarch)->wb_regnum,
+ if (regnum == tdep->wb_regnum || regnum == -1)
+ regcache->raw_collect (tdep->wb_regnum,
®s->windowbase);
- if (regnum == gdbarch_tdep (gdbarch)->ws_regnum || regnum == -1)
- regcache->raw_collect (gdbarch_tdep (gdbarch)->ws_regnum,
+ if (regnum == tdep->ws_regnum || regnum == -1)
+ regcache->raw_collect (tdep->ws_regnum,
®s->windowstart);
- if (regnum == gdbarch_tdep (gdbarch)->lbeg_regnum || regnum == -1)
- regcache->raw_collect (gdbarch_tdep (gdbarch)->lbeg_regnum,
+ if (regnum == tdep->lbeg_regnum || regnum == -1)
+ regcache->raw_collect (tdep->lbeg_regnum,
®s->lbeg);
- if (regnum == gdbarch_tdep (gdbarch)->lend_regnum || regnum == -1)
- regcache->raw_collect (gdbarch_tdep (gdbarch)->lend_regnum,
+ if (regnum == tdep->lend_regnum || regnum == -1)
+ regcache->raw_collect (tdep->lend_regnum,
®s->lend);
- if (regnum == gdbarch_tdep (gdbarch)->lcount_regnum || regnum == -1)
- regcache->raw_collect (gdbarch_tdep (gdbarch)->lcount_regnum,
+ if (regnum == tdep->lcount_regnum || regnum == -1)
+ regcache->raw_collect (tdep->lcount_regnum,
®s->lcount);
- if (regnum == gdbarch_tdep (gdbarch)->sar_regnum || regnum == -1)
- regcache->raw_collect (gdbarch_tdep (gdbarch)->sar_regnum,
+ if (regnum == tdep->sar_regnum || regnum == -1)
+ regcache->raw_collect (tdep->sar_regnum,
®s->sar);
- if (regnum == gdbarch_tdep (gdbarch)->threadptr_regnum || regnum == -1)
- regcache->raw_collect (gdbarch_tdep (gdbarch)->threadptr_regnum,
+ if (regnum == tdep->threadptr_regnum || regnum == -1)
+ regcache->raw_collect (tdep->threadptr_regnum,
®s->threadptr);
- if (regnum >=gdbarch_tdep (gdbarch)->ar_base
- && regnum < gdbarch_tdep (gdbarch)->ar_base
- + gdbarch_tdep (gdbarch)->num_aregs)
+ if (regnum >=tdep->ar_base
+ && regnum < tdep->ar_base
+ + tdep->num_aregs)
regcache->raw_collect (regnum,
- ®s->ar[regnum - gdbarch_tdep (gdbarch)->ar_base]);
+ ®s->ar[regnum - tdep->ar_base]);
else if (regnum == -1)
{
- for (i = 0; i < gdbarch_tdep (gdbarch)->num_aregs; ++i)
- regcache->raw_collect (gdbarch_tdep (gdbarch)->ar_base + i,
+ for (i = 0; i < tdep->num_aregs; ++i)
+ regcache->raw_collect (tdep->ar_base + i,
®s->ar[i]);
}
- if (regnum >= gdbarch_tdep (gdbarch)->a0_base
- && regnum < gdbarch_tdep (gdbarch)->a0_base + C0_NREGS)
+ if (regnum >= tdep->a0_base
+ && regnum < tdep->a0_base + C0_NREGS)
regcache->raw_collect (regnum,
®s->ar[(4 * regs->windowbase + regnum
- - gdbarch_tdep (gdbarch)->a0_base)
- % gdbarch_tdep (gdbarch)->num_aregs]);
+ - tdep->a0_base)
+ % tdep->num_aregs]);
else if (regnum == -1)
{
for (i = 0; i < C0_NREGS; ++i)
- regcache->raw_collect (gdbarch_tdep (gdbarch)->a0_base + i,
+ regcache->raw_collect (tdep->a0_base + i,
(®s->ar[(4 * regs->windowbase + i)
- % gdbarch_tdep (gdbarch)->num_aregs]));
+ % tdep->num_aregs]));
}
}
xtensa_elf_gregset_t *regs = (xtensa_elf_gregset_t *) gregsetp;
struct gdbarch *gdbarch = regcache->arch ();
+ xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1)
regcache->raw_supply (gdbarch_pc_regnum (gdbarch), ®s->pc);
if (regnum == gdbarch_ps_regnum (gdbarch) || regnum == -1)
regcache->raw_supply (gdbarch_ps_regnum (gdbarch), ®s->ps);
- if (regnum == gdbarch_tdep (gdbarch)->wb_regnum || regnum == -1)
- regcache->raw_supply (gdbarch_tdep (gdbarch)->wb_regnum,
+ if (regnum == tdep->wb_regnum || regnum == -1)
+ regcache->raw_supply (tdep->wb_regnum,
®s->windowbase);
- if (regnum == gdbarch_tdep (gdbarch)->ws_regnum || regnum == -1)
- regcache->raw_supply (gdbarch_tdep (gdbarch)->ws_regnum,
+ if (regnum == tdep->ws_regnum || regnum == -1)
+ regcache->raw_supply (tdep->ws_regnum,
®s->windowstart);
- if (regnum == gdbarch_tdep (gdbarch)->lbeg_regnum || regnum == -1)
- regcache->raw_supply (gdbarch_tdep (gdbarch)->lbeg_regnum,
+ if (regnum == tdep->lbeg_regnum || regnum == -1)
+ regcache->raw_supply (tdep->lbeg_regnum,
®s->lbeg);
- if (regnum == gdbarch_tdep (gdbarch)->lend_regnum || regnum == -1)
- regcache->raw_supply (gdbarch_tdep (gdbarch)->lend_regnum,
+ if (regnum == tdep->lend_regnum || regnum == -1)
+ regcache->raw_supply (tdep->lend_regnum,
®s->lend);
- if (regnum == gdbarch_tdep (gdbarch)->lcount_regnum || regnum == -1)
- regcache->raw_supply (gdbarch_tdep (gdbarch)->lcount_regnum,
+ if (regnum == tdep->lcount_regnum || regnum == -1)
+ regcache->raw_supply (tdep->lcount_regnum,
®s->lcount);
- if (regnum == gdbarch_tdep (gdbarch)->sar_regnum || regnum == -1)
- regcache->raw_supply (gdbarch_tdep (gdbarch)->sar_regnum,
+ if (regnum == tdep->sar_regnum || regnum == -1)
+ regcache->raw_supply (tdep->sar_regnum,
®s->sar);
- if (regnum == gdbarch_tdep (gdbarch)->threadptr_regnum || regnum == -1)
- regcache->raw_supply (gdbarch_tdep (gdbarch)->threadptr_regnum,
+ if (regnum == tdep->threadptr_regnum || regnum == -1)
+ regcache->raw_supply (tdep->threadptr_regnum,
®s->threadptr);
- if (regnum >=gdbarch_tdep (gdbarch)->ar_base
- && regnum < gdbarch_tdep (gdbarch)->ar_base
- + gdbarch_tdep (gdbarch)->num_aregs)
+ if (regnum >=tdep->ar_base
+ && regnum < tdep->ar_base
+ + tdep->num_aregs)
regcache->raw_supply (regnum,
- ®s->ar[regnum - gdbarch_tdep (gdbarch)->ar_base]);
+ ®s->ar[regnum - tdep->ar_base]);
else if (regnum == -1)
{
- for (i = 0; i < gdbarch_tdep (gdbarch)->num_aregs; ++i)
- regcache->raw_supply (gdbarch_tdep (gdbarch)->ar_base + i,
+ for (i = 0; i < tdep->num_aregs; ++i)
+ regcache->raw_supply (tdep->ar_base + i,
®s->ar[i]);
}
- if (regnum >= gdbarch_tdep (gdbarch)->a0_base
- && regnum < gdbarch_tdep (gdbarch)->a0_base + C0_NREGS)
+ if (regnum >= tdep->a0_base
+ && regnum < tdep->a0_base + C0_NREGS)
regcache->raw_supply (regnum,
®s->ar[(4 * regs->windowbase + regnum
- - gdbarch_tdep (gdbarch)->a0_base)
- % gdbarch_tdep (gdbarch)->num_aregs]);
+ - tdep->a0_base)
+ % tdep->num_aregs]);
else if (regnum == -1)
{
for (i = 0; i < C0_NREGS; ++i)
- regcache->raw_supply (gdbarch_tdep (gdbarch)->a0_base + i,
+ regcache->raw_supply (tdep->a0_base + i,
®s->ar[(4 * regs->windowbase + i)
- % gdbarch_tdep (gdbarch)->num_aregs]);
+ % tdep->num_aregs]);
}
}