&aarch64_fbsd_fpregset);
gdbarch *gdbarch = regcache->arch ();
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
if (tdep->has_tls ())
{
const struct regcache_map_entry aarch64_fbsd_tls_regmap[] =
PT_SETFPREGS, &aarch64_fbsd_fpregset);
gdbarch *gdbarch = regcache->arch ();
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
if (tdep->has_tls ())
{
const struct regcache_map_entry aarch64_fbsd_tls_regmap[] =
void *cb_data,
const struct regcache *regcache)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
cb (".reg", AARCH64_FBSD_SIZEOF_GREGSET, AARCH64_FBSD_SIZEOF_GREGSET,
&aarch64_fbsd_gregset, NULL, cb_data);
aarch64_fbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
CORE_ADDR lm_addr, CORE_ADDR offset)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
struct regcache *regcache;
regcache = get_thread_arch_regcache (current_inferior ()->process_target (),
static void
aarch64_fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
/* Generic FreeBSD support. */
fbsd_init_abi (info, gdbarch);
fetch_pauth_masks_from_thread (struct regcache *regcache)
{
aarch64_gdbarch_tdep *tdep
- = (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
+ = gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
int ret;
struct iovec iovec;
uint64_t pauth_regset[2] = {0, 0};
fetch_mteregs_from_thread (struct regcache *regcache)
{
aarch64_gdbarch_tdep *tdep
- = (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
+ = gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
int regno = tdep->mte_reg_base;
gdb_assert (regno != -1);
store_mteregs_to_thread (struct regcache *regcache)
{
aarch64_gdbarch_tdep *tdep
- = (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
+ = gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
int regno = tdep->mte_reg_base;
gdb_assert (regno != -1);
fetch_tlsregs_from_thread (struct regcache *regcache)
{
aarch64_gdbarch_tdep *tdep
- = (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
+ = gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
int regno = tdep->tls_regnum;
gdb_assert (regno != -1);
store_tlsregs_to_thread (struct regcache *regcache)
{
aarch64_gdbarch_tdep *tdep
- = (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
+ = gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
int regno = tdep->tls_regnum;
gdb_assert (regno != -1);
aarch64_fetch_registers (struct regcache *regcache, int regno)
{
aarch64_gdbarch_tdep *tdep
- = (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
+ = gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
if (regno == -1)
{
aarch32_fetch_registers (struct regcache *regcache, int regno)
{
arm_gdbarch_tdep *tdep
- = (arm_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
+ = gdbarch_tdep<arm_gdbarch_tdep> (regcache->arch ());
if (regno == -1)
{
aarch64_store_registers (struct regcache *regcache, int regno)
{
aarch64_gdbarch_tdep *tdep
- = (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
+ = gdbarch_tdep<aarch64_gdbarch_tdep> (regcache->arch ());
if (regno == -1)
{
aarch32_store_registers (struct regcache *regcache, int regno)
{
arm_gdbarch_tdep *tdep
- = (arm_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
+ = gdbarch_tdep<arm_gdbarch_tdep> (regcache->arch ());
if (regno == -1)
{
/* Only return it if the current vector length matches the one in the tdep. */
aarch64_gdbarch_tdep *tdep
- = (aarch64_gdbarch_tdep *) gdbarch_tdep (inf->gdbarch);
+ = gdbarch_tdep<aarch64_gdbarch_tdep> (inf->gdbarch);
uint64_t vq = aarch64_sve_get_vq (ptid.lwp ());
if (vq == tdep->vq)
return inf->gdbarch;
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
CORE_ADDR sp = get_frame_register_unsigned (this_frame, AARCH64_SP_REGNUM);
CORE_ADDR sigcontext_addr = (sp + AARCH64_RT_SIGFRAME_UCONTEXT_OFFSET
+ AARCH64_UCONTEXT_SIGCONTEXT_OFFSET );
gdb_byte *header = (gdb_byte *) buf;
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
uint64_t vq = tdep->vq;
gdb_assert (buf != NULL);
void *cb_data,
const struct regcache *regcache)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
cb (".reg", AARCH64_LINUX_SIZEOF_GREGSET, AARCH64_LINUX_SIZEOF_GREGSET,
&aarch64_linux_gregset, NULL, cb_data);
struct ui_out *uiout,
enum gdb_signal siggnal)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
if (!tdep->has_mte () || siggnal != GDB_SIGNAL_SEGV)
return;
NULL };
static const char *const stap_register_indirection_suffixes[] = { "]",
NULL };
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
tdep->lowest_pc = 0x8000;
static void
aarch64_newlib_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
/* Jump buffer - support for longjmp.
Offset of original PC in jump buffer (in registers). */
else if (inst.opcode->iclass == ic_system)
{
aarch64_gdbarch_tdep *tdep
- = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
int ra_state_val = 0;
if (insn == 0xd503233f /* paciasp. */
struct aarch64_prologue_cache cache;
cache.saved_regs = trad_frame_alloc_saved_regs (gdbarch);
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
/* Test the simple prologue in which frame pointer is used. */
{
/* Halt the backtrace at "_start". */
gdbarch *arch = get_frame_arch (this_frame);
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (arch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (arch);
if (cache->prev_pc <= tdep->lowest_pc)
return UNWIND_OUTERMOST;
CORE_ADDR lr;
struct gdbarch *gdbarch = get_frame_arch (this_frame);
aarch64_gdbarch_tdep *tdep
- = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
lr = frame_unwind_register_unsigned (this_frame, AARCH64_LR_REGNUM);
void **this_cache, int regnum)
{
gdbarch *arch = get_frame_arch (this_frame);
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (arch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (arch);
CORE_ADDR lr;
switch (regnum)
struct dwarf2_frame_state_reg *reg,
struct frame_info *this_frame)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
switch (regnum)
{
aarch64_execute_dwarf_cfa_vendor_op (struct gdbarch *gdbarch, gdb_byte op,
struct dwarf2_frame_state *fs)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
struct dwarf2_frame_state_reg *ra_state;
if (op == DW_CFA_AARCH64_negate_ra_state)
static struct type *
aarch64_vnq_type (struct gdbarch *gdbarch)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
if (tdep->vnq_type == NULL)
{
static struct type *
aarch64_vnd_type (struct gdbarch *gdbarch)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
if (tdep->vnd_type == NULL)
{
static struct type *
aarch64_vns_type (struct gdbarch *gdbarch)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
if (tdep->vns_type == NULL)
{
static struct type *
aarch64_vnh_type (struct gdbarch *gdbarch)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
if (tdep->vnh_type == NULL)
{
static struct type *
aarch64_vnb_type (struct gdbarch *gdbarch)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
if (tdep->vnb_type == NULL)
{
static struct type *
aarch64_vnv_type (struct gdbarch *gdbarch)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
if (tdep->vnv_type == NULL)
{
static int
aarch64_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
if (reg >= AARCH64_DWARF_X0 && reg <= AARCH64_DWARF_X0 + 30)
return AARCH64_X0_REGNUM + reg - AARCH64_DWARF_X0;
CORE_ADDR jb_addr;
gdb_byte buf[X_REGISTER_SIZE];
struct gdbarch *gdbarch = get_frame_arch (frame);
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
jb_addr = get_frame_register_unsigned (frame, AARCH64_X0_REGNUM);
static const char *
aarch64_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
static const char *const q_name[] =
{
static struct type *
aarch64_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
int p_regnum = regnum - gdbarch_num_regs (gdbarch);
aarch64_pseudo_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
const struct reggroup *group)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
int p_regnum = regnum - gdbarch_num_regs (gdbarch);
aarch64_pseudo_read_value (struct gdbarch *gdbarch, readable_regcache *regcache,
int regnum)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
struct value *result_value = allocate_value (register_type (gdbarch, regnum));
VALUE_LVAL (result_value) = lval_register;
aarch64_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache,
int regnum, const gdb_byte *buf)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
regnum -= gdbarch_num_regs (gdbarch);
if (regnum >= AARCH64_Q0_REGNUM && regnum < AARCH64_Q0_REGNUM + 32)
static int
aarch64_cannot_store_register (struct gdbarch *gdbarch, int regnum)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
if (!tdep->has_pauth ())
return 0;
best_arch = gdbarch_list_lookup_by_info (best_arch->next, &info))
{
aarch64_gdbarch_tdep *tdep
- = (aarch64_gdbarch_tdep *) gdbarch_tdep (best_arch->gdbarch);
+ = gdbarch_tdep<aarch64_gdbarch_tdep> (best_arch->gdbarch);
if (tdep && tdep->vq == vq)
return best_arch->gdbarch;
}
static void
aarch64_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
{
- aarch64_gdbarch_tdep *tdep = (aarch64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ aarch64_gdbarch_tdep *tdep = gdbarch_tdep<aarch64_gdbarch_tdep> (gdbarch);
if (tdep == NULL)
return;
{
aarch64_gdbarch_tdep *tdep
- = (aarch64_gdbarch_tdep *) gdbarch_tdep (aarch64_insn_r->gdbarch);
+ = gdbarch_tdep<aarch64_gdbarch_tdep> (aarch64_insn_r->gdbarch);
uint8_t insn_bits24_27, insn_bits28_31, insn_bits22_23;
uint32_t record_buf[4];
supply_gprs64 (struct regcache *regcache, uint64_t *vals)
{
ppc_gdbarch_tdep *tdep
- = (ppc_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
+ = gdbarch_tdep<ppc_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 ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int regno;
/* This function should never be called on architectures without
static int
special_register_p (struct gdbarch *gdbarch, int regno)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
return regno == gdbarch_pc_regnum (gdbarch)
|| regno == tdep->ppc_ps_regnum
uint32_t fpscr)
{
struct gdbarch *gdbarch = regcache->arch ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_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 ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_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 ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int status, i;
pthdb_context_t ctx;
pthdb_tid_t tid)
{
struct gdbarch *gdbarch = regcache->arch ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
uint64_t gprs64[ppc_num_gprs];
uint32_t gprs32[ppc_num_gprs];
double fprs[ppc_num_fprs];
fill_gprs64 (const struct regcache *regcache, uint64_t *vals)
{
ppc_gdbarch_tdep *tdep
- = (ppc_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
+ = gdbarch_tdep<ppc_gdbarch_tdep> (regcache->arch ());
int regno;
for (regno = 0; regno < ppc_num_gprs; regno++)
fill_gprs32 (const struct regcache *regcache, uint32_t *vals)
{
ppc_gdbarch_tdep *tdep
- = (ppc_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
+ = gdbarch_tdep<ppc_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 ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int regno;
/* This function should never be called on architectures without
uint32_t *fpscr)
{
struct gdbarch *gdbarch = regcache->arch ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_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 ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_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 ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int status, i;
pthdb_context_t ctx;
uint32_t int32;
pthdb_tid_t tid)
{
struct gdbarch *gdbarch = regcache->arch ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
uint64_t gprs64[ppc_num_gprs];
uint32_t gprs32[ppc_num_gprs];
double fprs[ppc_num_fprs];
/* Hook into the MDEBUG frame unwinder. */
alpha_mdebug_init_abi (info, gdbarch);
- alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (gdbarch);
tdep->dynamic_sigtramp_offset = alpha_linux_sigtramp_offset;
tdep->sigcontext_addr = alpha_linux_sigcontext_addr;
tdep->pc_in_sigtramp = alpha_linux_pc_in_sigtramp;
alphanbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
- alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (gdbarch);
/* Hook into the DWARF CFI frame unwinder. */
alpha_dwarf2_init_abi (info, gdbarch);
static void
alphaobsd_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
{
- alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (gdbarch);
/* Hook into the DWARF CFI frame unwinder. */
alpha_dwarf2_init_abi (info, gdbarch);
gdb_byte *readbuf, const gdb_byte *writebuf)
{
enum type_code code = type->code ();
- alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (gdbarch);
if ((code == TYPE_CODE_STRUCT
|| code == TYPE_CODE_UNION
alpha_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
- alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR jb_addr;
gdb_byte raw_buffer[ALPHA_REGISTER_SIZE];
*this_prologue_cache = info;
gdbarch *arch = get_frame_arch (this_frame);
- alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (arch);
+ alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (arch);
info->sigcontext_addr = tdep->sigcontext_addr (this_frame);
return info;
alpha_sigtramp_register_address (struct gdbarch *gdbarch,
CORE_ADDR sigcontext_addr, int regnum)
{
- alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (gdbarch);
if (regnum >= 0 && regnum < 32)
return sigcontext_addr + tdep->sc_regs_offset + regnum * 8;
struct frame_id *this_id)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (gdbarch);
struct alpha_sigtramp_unwind_cache *info
= alpha_sigtramp_frame_unwind_cache (this_frame, this_prologue_cache);
CORE_ADDR stack_addr, code_addr;
/* We shouldn't even bother to try if the OSABI didn't register a
sigcontext_addr handler or pc_in_sigtramp handler. */
- alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (gdbarch);
if (tdep->sigcontext_addr == NULL)
return 0;
static CORE_ADDR
alpha_heuristic_proc_start (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- alpha_gdbarch_tdep *tdep = (alpha_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ alpha_gdbarch_tdep *tdep = gdbarch_tdep<alpha_gdbarch_tdep> (gdbarch);
CORE_ADDR last_non_nop = pc;
CORE_ADDR fence = pc - heuristic_fence_post;
CORE_ADDR orig_pc = pc;
static void
x86_darwin_init_abi_64 (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
amd64_init_abi (info, gdbarch,
amd64_target_description (X86_XSTATE_SSE_MASK, true));
{
struct gdbarch *gdbarch = regcache->arch ();
#if defined(PT_GETFSBASE) || defined(PT_GETGSBASE)
- const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ const i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
#endif
pid_t pid = get_ptrace_pid (regcache->ptid ());
const struct regset *gregset = find_gregset (gdbarch);
{
struct gdbarch *gdbarch = regcache->arch ();
#if defined(PT_GETFSBASE) || defined(PT_GETGSBASE)
- const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ const i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
#endif
pid_t pid = get_ptrace_pid (regcache->ptid ());
const struct regset *gregset = find_gregset (gdbarch);
void *cb_data,
const struct regcache *regcache)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
cb (".reg", AMD64_FBSD_SIZEOF_GREGSET, AMD64_FBSD_SIZEOF_GREGSET,
&amd64_fbsd_gregset, NULL, cb_data);
static void
amd64fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
/* Generic FreeBSD support. */
fbsd_init_abi (info, gdbarch);
void *cb_data,
const struct regcache *regcache)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
cb (".reg", 27 * 8, 27 * 8, &i386_gregset, NULL, cb_data);
cb (".reg2", 512, 512, &amd64_fpregset, NULL, cb_data);
amd64_linux_init_abi_common(struct gdbarch_info info, struct gdbarch *gdbarch,
int num_disp_step_buffers)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
linux_init_abi (info, gdbarch, num_disp_step_buffers);
static void
amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
struct tdesc_arch_data *tdesc_data = info.tdesc_data;
const struct tdesc_feature *feature;
int valid_p;
static void
amd64_x32_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
struct tdesc_arch_data *tdesc_data = info.tdesc_data;
const struct tdesc_feature *feature;
int valid_p;
static void
amd64nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
/* Initialize general-purpose register set details first. */
tdep->gregset_reg_offset = amd64nbsd_r_reg_offset;
static void
amd64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
amd64_init_abi (info, gdbarch,
amd64_target_description (X86_XSTATE_SSE_MASK, true));
static void
amd64_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
tdep->gregset_reg_offset = amd64_sol2_gregset_reg_offset;
tdep->gregset_num_regs = ARRAY_SIZE (amd64_sol2_gregset_reg_offset);
static int
amd64_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int ymm0_regnum = tdep->ymm0_regnum;
int regnum = -1;
static const char *
amd64_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (i386_byte_regnum_p (gdbarch, regnum))
return amd64_byte_names[regnum - tdep->al_regnum];
else if (i386_zmm_regnum_p (gdbarch, regnum))
readable_regcache *regcache,
int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
value *result_value = allocate_value (register_type (gdbarch, regnum));
VALUE_LVAL (result_value) = lval_register;
struct regcache *regcache,
int regnum, const gdb_byte *buf)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (i386_byte_regnum_p (gdbarch, regnum))
{
amd64_ax_pseudo_register_collect (struct gdbarch *gdbarch,
struct agent_expr *ax, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (i386_byte_regnum_p (gdbarch, regnum))
{
amd64_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct amd64_frame_cache *cache;
CORE_ADDR addr;
void **this_cache)
{
gdbarch *arch = get_frame_arch (this_frame);
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);
/* We shouldn't even bother if we don't have a sigcontext_addr
handler. */
int regnum, const void *fpregs, size_t len)
{
struct gdbarch *gdbarch = regcache->arch ();
- const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ const i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
gdb_assert (len >= tdep->sizeof_fpregset);
amd64_supply_fxsave (regcache, regnum, fpregs);
int regnum, void *fpregs, size_t len)
{
struct gdbarch *gdbarch = regcache->arch ();
- const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ const i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
gdb_assert (len >= tdep->sizeof_fpregset);
amd64_collect_fxsave (regcache, regnum, fpregs);
gdb_byte buf[8];
CORE_ADDR jb_addr;
struct gdbarch *gdbarch = get_frame_arch (frame);
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int jb_pc_offset = tdep->jb_pc_offset;
int len = TYPE_LENGTH (builtin_type (gdbarch)->builtin_func_ptr);
amd64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch,
const target_desc *default_tdesc)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
const struct target_desc *tdesc = info.target_desc;
static const char *const stap_integer_prefixes[] = { "$", NULL };
static const char *const stap_register_prefixes[] = { "%", NULL };
static struct type *
amd64_x32_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
switch (regnum - tdep->eax_regnum)
{
amd64_x32_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch,
const target_desc *default_tdesc)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
amd64_init_abi (info, gdbarch, default_tdesc);
const void *fxsave)
{
struct gdbarch *gdbarch = regcache->arch ();
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
i387_supply_fxsave (regcache, regnum, fxsave);
const void *xsave)
{
struct gdbarch *gdbarch = regcache->arch ();
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
i387_supply_xsave (regcache, regnum, xsave);
void *fxsave)
{
struct gdbarch *gdbarch = regcache->arch ();
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
gdb_byte *regs = (gdb_byte *) fxsave;
i387_collect_fxsave (regcache, regnum, fxsave);
void *xsave, int gcore)
{
struct gdbarch *gdbarch = regcache->arch ();
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
gdb_byte *regs = (gdb_byte *) xsave;
i387_collect_xsave (regcache, regnum, xsave, gcore);
static void
amd64_windows_init_abi_common (gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
/* The dwarf2 unwinder (appended very early by i386_gdbarch_init) is
preferred over the SEH one. The reasons are:
arc_linux_software_single_step (struct regcache *regcache)
{
struct gdbarch *gdbarch = regcache->arch ();
- arc_gdbarch_tdep *tdep = (arc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arc_gdbarch_tdep *tdep = gdbarch_tdep<arc_gdbarch_tdep> (gdbarch);
struct gdb_non_printing_memory_disassembler dis (gdbarch);
/* Read current instruction. */
static void
arc_linux_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- arc_gdbarch_tdep *tdep = (arc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arc_gdbarch_tdep *tdep = gdbarch_tdep<arc_gdbarch_tdep> (gdbarch);
arc_linux_debug_printf ("GNU/Linux OS/ABI initialization.");
{
arc_newlib_debug_printf ("Initialization.");
- arc_gdbarch_tdep *tdep = (arc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arc_gdbarch_tdep *tdep = gdbarch_tdep<arc_gdbarch_tdep> (gdbarch);
/* Offset of original PC in longjmp jump buffer (in registers). Value of PC
offset can be found in newlib/libc/machine/arc/setjmp.S. */
arc_debug_printf ("called");
struct gdbarch *gdbarch = get_frame_arch (frame);
- arc_gdbarch_tdep *tdep = (arc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arc_gdbarch_tdep *tdep = gdbarch_tdep<arc_gdbarch_tdep> (gdbarch);
int pc_offset = tdep->jb_pc * ARC_REGISTER_SIZE;
gdb_byte buf[ARC_REGISTER_SIZE];
CORE_ADDR jb_addr = get_frame_register_unsigned (frame, ARC_FIRST_ARG_REGNUM);
arc_debug_printf ("called");
gdbarch *arch = get_frame_arch (this_frame);
- arc_gdbarch_tdep *tdep = (arc_gdbarch_tdep *) gdbarch_tdep (arch);
+ arc_gdbarch_tdep *tdep = gdbarch_tdep<arc_gdbarch_tdep> (arch);
/* Allocate new frame cache instance and space for saved register info. */
struct arc_frame_cache *cache = FRAME_OBSTACK_ZALLOC (struct arc_frame_cache);
arc_debug_printf ("called");
gdbarch *arch = get_frame_arch (this_frame);
- arc_gdbarch_tdep *tdep = (arc_gdbarch_tdep *) gdbarch_tdep (arch);
+ arc_gdbarch_tdep *tdep = gdbarch_tdep<arc_gdbarch_tdep> (arch);
/* If we have a sigcontext_addr handler, then just return 1 (same as the
"default_frame_sniffer ()"). */
static void
arc_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
{
- arc_gdbarch_tdep *tdep = (arc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arc_gdbarch_tdep *tdep = gdbarch_tdep<arc_gdbarch_tdep> (gdbarch);
gdb_printf (file, "arc_dump_tdep: jb_pc = %i\n", tdep->jb_pc);
xfree (obstack);
}
+/* See gdbarch.h. */
+
struct gdbarch_tdep *
-gdbarch_tdep (struct gdbarch *gdbarch)
+gdbarch_tdep_1 (struct gdbarch *gdbarch)
{
if (gdbarch_debug >= 2)
- gdb_printf (gdb_stdlog, "gdbarch_tdep called\n");
+ gdb_printf (gdb_stdlog, "gdbarch_tdep_1 called\n");
return gdbarch->tdep;
}
#endif
#ifdef PT_GETREGSET
gdbarch *gdbarch = regcache->arch ();
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (tdep->tls_regnum > 0)
{
#endif
#ifdef PT_GETREGSET
gdbarch *gdbarch = regcache->arch ();
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (tdep->tls_regnum > 0)
{
void *cb_data,
const struct regcache *regcache)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
cb (".reg", ARM_FBSD_SIZEOF_GREGSET, ARM_FBSD_SIZEOF_GREGSET,
&arm_fbsd_gregset, NULL, cb_data);
arm_fbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
CORE_ADDR lm_addr, CORE_ADDR offset)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
struct regcache *regcache;
regcache = get_thread_arch_regcache (current_inferior ()->process_target (),
static void
arm_fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
/* Generic FreeBSD support. */
fbsd_init_abi (info, gdbarch);
gdb_byte regbuf[ARM_VFP3_REGS_SIZE];
int ret, tid;
struct gdbarch *gdbarch = regcache->arch ();
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_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 ();
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_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 ();
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (-1 == regno)
{
arm_linux_nat_target::store_registers (struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = regcache->arch ();
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (-1 == regno)
{
void *cb_data,
const struct regcache *regcache)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
cb (".reg", ARM_LINUX_SIZEOF_GREGSET, ARM_LINUX_SIZEOF_GREGSET,
&arm_linux_gregset, NULL, cb_data);
NULL };
static const char *const stap_register_indirection_suffixes[] = { "]",
NULL };
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
linux_init_abi (info, gdbarch, 1);
static void
arm_supply_vfpregset (struct regcache *regcache, struct fpreg *fpregset)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (regcache->arch ());
if (tdep->vfp_register_count == 0)
return;
return;
}
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_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;
}
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_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)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (regcache->arch ());
int lwp = regcache->ptid ().lwp ();
if (tdep->vfp_register_count == 0)
return;
arm_netbsd_init_abi_common (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
tdep->lowest_pc = 0x8000;
switch (info.byte_order)
arm_netbsd_elf_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
arm_netbsd_init_abi_common (info, gdbarch);
void *cb_data,
const struct regcache *regcache)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
cb (".reg", ARM_NONE_SIZEOF_GREGSET, ARM_NONE_SIZEOF_GREGSET,
&arm_none_gregset, nullptr, cb_data);
armobsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (tdep->fp_model == ARM_FLOAT_AUTO)
tdep->fp_model = ARM_FLOAT_SOFT_VFP;
arm_cache_init (struct arm_prologue_cache *cache, struct frame_info *frame)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
arm_cache_init (cache, gdbarch);
cache->sp = get_frame_register_unsigned (frame, ARM_SP_REGNUM);
int
arm_psr_thumb_bit (struct gdbarch *gdbarch)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (tdep->is_m)
return XPSR_T;
struct bound_minimal_symbol sym;
char type;
arm_displaced_step_copy_insn_closure *dsc = nullptr;
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (gdbarch_displaced_step_copy_insn_closure_by_addr_p (gdbarch))
dsc = ((arm_displaced_step_copy_insn_closure * )
static int
arm_m_addr_is_magic (struct gdbarch *gdbarch, CORE_ADDR addr)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (tdep->have_sec_ext)
{
switch ((addr & 0xff000000))
static CORE_ADDR
arm_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR val)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
/* On M-profile devices, do not strip the low bit from EXC_RETURN
(the magic exception return address). */
CORE_ADDR start, CORE_ADDR limit,
struct arm_prologue_cache *cache)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
int i;
CORE_ADDR offset, current_pc;
pv_t regs[ARM_FPS_REGNUM];
CORE_ADDR unrecognized_pc = 0;
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
/* Search the prologue looking for instructions that set up the
frame pointer, adjust the stack pointer, and save registers.
CORE_ADDR prologue_start, prologue_end;
CORE_ADDR prev_pc = get_frame_pc (this_frame);
CORE_ADDR block_addr = get_frame_address_in_block (this_frame);
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
/* Assume there is no frame until proven otherwise. */
cache->framereg = ARM_SP_REGNUM;
return cache;
arm_gdbarch_tdep *tdep =
- (arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
+ gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
prev_sp = unwound_fp + cache->framesize;
arm_cache_set_active_sp_value (cache, tdep, prev_sp);
/* This is meant to halt the backtrace at "_start". */
pc = get_frame_pc (this_frame);
gdbarch *arch = get_frame_arch (this_frame);
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (arch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (arch);
if (pc <= tdep->lowest_pc)
return UNWIND_OUTERMOST;
cache = (struct arm_prologue_cache *) *this_cache;
arm_gdbarch_tdep *tdep
- = (arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
+ = gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
/* Use function start address as part of the frame ID. If we cannot
identify the start address (due to missing symbol information),
*this_cache = arm_make_prologue_cache (this_frame);
cache = (struct arm_prologue_cache *) *this_cache;
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
/* If this frame has signed the return address, mark it as so. */
if (tdep->have_pacbti && cache->ra_signed_state.has_value ()
/* We already got the previous SP. */
arm_gdbarch_tdep *tdep
- = (arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
+ = gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
arm_cache_set_active_sp_value (cache, tdep, vsp);
return cache;
/* Since we are in epilogue, the SP has been restored. */
arm_gdbarch_tdep *tdep
- = (arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
+ = gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
arm_cache_set_active_sp_value (cache, tdep,
get_frame_register_unsigned (this_frame,
ARM_SP_REGNUM));
func = pc;
arm_gdbarch_tdep *tdep
- = (arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
+ = gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
*this_id = frame_id_build (arm_cache_get_prev_sp_value (cache, tdep), pc);
}
arm_cache_init (cache, this_frame);
arm_gdbarch_tdep *tdep
- = (arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
+ = gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
arm_cache_set_active_sp_value (cache, tdep,
get_frame_register_unsigned (this_frame,
ARM_SP_REGNUM));
cache = (struct arm_prologue_cache *) *this_cache;
arm_gdbarch_tdep *tdep
- = (arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
+ = gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
*this_id = frame_id_build (arm_cache_get_prev_sp_value (cache, tdep),
get_frame_pc (this_frame));
}
arm_m_exception_cache (struct frame_info *this_frame)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct arm_prologue_cache *cache;
CORE_ADDR lr;
/* Our frame ID for a stub frame is the current SP and LR. */
arm_gdbarch_tdep *tdep
- = (arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
+ = gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
*this_id = frame_id_build (arm_cache_get_prev_sp_value (cache, tdep),
get_frame_pc (this_frame));
}
/* The value was already reconstructed into PREV_SP. */
arm_gdbarch_tdep *tdep
- = (arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
+ = gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
if (prev_regnum == ARM_SP_REGNUM)
return frame_unwind_got_constant (this_frame, prev_regnum,
arm_cache_get_prev_sp_value (cache, tdep));
cache = (struct arm_prologue_cache *) *this_cache;
arm_gdbarch_tdep *tdep
- = (arm_gdbarch_tdep *) gdbarch_tdep (get_frame_arch (this_frame));
+ = gdbarch_tdep<arm_gdbarch_tdep> (get_frame_arch (this_frame));
return arm_cache_get_prev_sp_value (cache, tdep) - cache->framesize;
}
int regnum)
{
struct gdbarch * gdbarch = get_frame_arch (this_frame);
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
CORE_ADDR lr;
ULONGEST cpsr;
static int
arm_vfp_abi_for_function (struct gdbarch *gdbarch, struct type *func_type)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
/* Variadic functions always use the base ABI. Assume that functions
without debug info are not variadic. */
int use_vfp_abi;
struct type *ftype;
unsigned vfp_regs_free = (1 << 16) - 1;
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
/* Determine the type of this function and whether the VFP ABI
applies. */
static struct type *
arm_ext_type (struct gdbarch *gdbarch)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (!tdep->arm_ext_type)
tdep->arm_ext_type
static struct type *
arm_neon_double_type (struct gdbarch *gdbarch)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (tdep->neon_double_type == NULL)
{
static struct type *
arm_neon_quad_type (struct gdbarch *gdbarch)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (tdep->neon_quad_type == NULL)
{
static bool
is_q_pseudo (struct gdbarch *gdbarch, int regnum)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
/* Q pseudo registers are available for both NEON (Q0~Q15) and
MVE (Q0~Q7) features. */
static bool
is_s_pseudo (struct gdbarch *gdbarch, int regnum)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (tdep->have_s_pseudos
&& regnum >= tdep->s_pseudo_base
static bool
is_mve_pseudo (struct gdbarch *gdbarch, int regnum)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (tdep->have_mve
&& regnum >= tdep->mve_pseudo_base
static bool
is_pacbti_pseudo (struct gdbarch *gdbarch, int regnum)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (tdep->have_pacbti
&& regnum >= tdep->pacbti_pseudo_base
static struct type *
arm_register_type (struct gdbarch *gdbarch, int regnum)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (is_s_pseudo (gdbarch, regnum))
return builtin_type (gdbarch)->builtin_float;
/* PACBTI register containing the Pointer Authentication Code. */
if (reg == ARM_DWARF_RA_AUTH_CODE)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (tdep->have_pacbti)
return tdep->pacbti_pseudo_base;
int buf_len;
enum bfd_endian order = gdbarch_byte_order_for_code (gdbarch);
int i, any, last_it, last_it_count;
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
/* If we are using BKPT breakpoints, none of this is necessary. */
if (tdep->thumb2_breakpoint == NULL)
CORE_ADDR to,
arm_displaced_step_copy_insn_closure *dsc)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
unsigned int i, len, offset;
enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
int size = dsc->is_thumb? 2 : 4;
static int
arm_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
if (arm_pc_is_thumb (gdbarch, *pcptr))
static const gdb_byte *
arm_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
switch (kind)
{
{
struct gdbarch *gdbarch = regs->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (TYPE_CODE_FLT == type->code ())
{
return (TYPE_LENGTH (type) > 16);
}
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (tdep->arm_abi != ARM_ABI_APCS)
{
/* The AAPCS says all aggregates not larger than a word are returned
if (type->code () == TYPE_CODE_FLT)
{
gdb_byte buf[ARM_FP_REGISTER_SIZE];
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
switch (tdep->fp_model)
{
struct type *valtype, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
struct type *func_type = function ? value_type (function) : NULL;
enum arm_vfp_cprc_base_type vfp_base_type;
int vfp_base_count;
arm_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR jb_addr;
gdb_byte buf[ARM_INT_REGISTER_SIZE];
&& gdbarch_bfd_arch_info (target_gdbarch ())->arch == bfd_arch_arm)
{
arm_gdbarch_tdep *tdep
- = (arm_gdbarch_tdep *) gdbarch_tdep (target_gdbarch ());
+ = gdbarch_tdep<arm_gdbarch_tdep> (target_gdbarch ());
gdb_printf (file, _("\
The current ARM floating point model is \"auto\" (currently \"%s\").\n"),
&& gdbarch_bfd_arch_info (target_gdbarch ())->arch == bfd_arch_arm)
{
arm_gdbarch_tdep *tdep
- = (arm_gdbarch_tdep *) gdbarch_tdep (target_gdbarch ());
+ = gdbarch_tdep<arm_gdbarch_tdep> (target_gdbarch ());
gdb_printf (file, _("\
The current ARM ABI is \"auto\" (currently \"%s\").\n"),
static const char *
arm_register_name (struct gdbarch *gdbarch, int i)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (is_s_pseudo (gdbarch, i))
{
arm_mve_pseudo_read (struct gdbarch *gdbarch, readable_regcache *regcache,
int regnum, gdb_byte *buf)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
/* P0 is the first 16 bits of VPR. */
return regcache->raw_read_part (tdep->mve_vpr_regnum, 0, 2, buf);
char name_buf[4];
gdb_byte reg_buf[8];
int offset, double_regnum;
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
gdb_assert (regnum >= num_regs);
arm_mve_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache,
int regnum, const gdb_byte *buf)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
/* P0 is the first 16 bits of VPR. */
regcache->raw_write_part (tdep->mve_vpr_regnum, 0, 2, buf);
char name_buf[4];
gdb_byte reg_buf[8];
int offset, double_regnum;
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
gdb_assert (regnum >= num_regs);
static void
arm_register_g_packet_guesses (struct gdbarch *gdbarch)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (tdep->is_m)
{
static int
arm_code_of_frame_writable (struct gdbarch *gdbarch, struct frame_info *frame)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (tdep->is_m && get_frame_type (frame) == SIGTRAMP_FRAME)
{
best_arch = gdbarch_list_lookup_by_info (best_arch->next, &info))
{
arm_gdbarch_tdep *tdep
- = (arm_gdbarch_tdep *) gdbarch_tdep (best_arch->gdbarch);
+ = gdbarch_tdep<arm_gdbarch_tdep> (best_arch->gdbarch);
if (arm_abi != ARM_ABI_AUTO && arm_abi != tdep->arm_abi)
continue;
static void
arm_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
if (tdep == NULL)
return;
{
uint32_t op, op1_ebit, coproc, bits_24_25;
arm_gdbarch_tdep *tdep
- = (arm_gdbarch_tdep *) gdbarch_tdep (arm_insn_r->gdbarch);
+ = gdbarch_tdep<arm_gdbarch_tdep> (arm_insn_r->gdbarch);
struct regcache *reg_cache = arm_insn_r->regcache;
arm_insn_r->opcode = bits (arm_insn_r->arm_insn, 24, 27);
thumb_record_ldm_stm_swi (arm_insn_decode_record *thumb_insn_r)
{
arm_gdbarch_tdep *tdep
- = (arm_gdbarch_tdep *) gdbarch_tdep (thumb_insn_r->gdbarch);
+ = gdbarch_tdep<arm_gdbarch_tdep> (thumb_insn_r->gdbarch);
struct regcache *reg_cache = thumb_insn_r->regcache;
uint32_t ret = 0; /* function return value: -1:record failure ; 0:success */
static void
arm_wince_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- arm_gdbarch_tdep *tdep = (arm_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
windows_init_abi (info, gdbarch);
if (reg_nr == AVR_PC_REGNUM)
return builtin_type (gdbarch)->builtin_uint32;
- avr_gdbarch_tdep *tdep = (avr_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ avr_gdbarch_tdep *tdep = gdbarch_tdep<avr_gdbarch_tdep> (gdbarch);
if (reg_nr == AVR_PSEUDO_PC_REGNUM)
return tdep->pc_type;
gdb_assert (vpc < AVR_MAX_PROLOGUE_SIZE);
/* Handle static small stack allocation using rcall or push. */
- avr_gdbarch_tdep *tdep = (avr_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ avr_gdbarch_tdep *tdep = gdbarch_tdep<avr_gdbarch_tdep> (gdbarch);
while (scan_stage == 1 && vpc < len)
{
insn = extract_unsigned_integer (&prologue[vpc], 2, byte_order);
/* The previous frame's SP needed to be computed. Save the computed
value. */
- avr_gdbarch_tdep *tdep = (avr_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ avr_gdbarch_tdep *tdep = gdbarch_tdep<avr_gdbarch_tdep> (gdbarch);
info->saved_regs[AVR_SP_REGNUM].set_value (info->prev_sp
- 1 + tdep->call_length);
int i;
gdb_byte buf[3];
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- avr_gdbarch_tdep *tdep = (avr_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ avr_gdbarch_tdep *tdep = gdbarch_tdep<avr_gdbarch_tdep> (gdbarch);
read_memory (info->saved_regs[AVR_PC_REGNUM].addr (),
buf, tdep->call_length);
{
int i;
gdb_byte buf[3];
- avr_gdbarch_tdep *tdep = (avr_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ avr_gdbarch_tdep *tdep = gdbarch_tdep<avr_gdbarch_tdep> (gdbarch);
int call_length = tdep->call_length;
CORE_ADDR return_pc = avr_convert_iaddr_to_raw (bp_addr);
int regnum = AVR_ARGN_REGNUM;
best_arch = gdbarch_list_lookup_by_info (best_arch->next, &info))
{
avr_gdbarch_tdep *tdep
- = (avr_gdbarch_tdep *) gdbarch_tdep (best_arch->gdbarch);
+ = gdbarch_tdep<avr_gdbarch_tdep> (best_arch->gdbarch);
if (tdep->call_length == call_length)
return best_arch->gdbarch;
enum bfin_abi
bfin_abi (struct gdbarch *gdbarch)
{
- bfin_gdbarch_tdep *tdep = (bfin_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ bfin_gdbarch_tdep *tdep = gdbarch_tdep<bfin_gdbarch_tdep> (gdbarch);
return tdep->bfin_abi;
}
arches = gdbarch_list_lookup_by_info (arches->next, &info))
{
bfin_gdbarch_tdep *tdep
- = (bfin_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
+ = gdbarch_tdep<bfin_gdbarch_tdep> (arches->gdbarch);
if (tdep->bfin_abi != abi)
continue;
static void
cris_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- cris_gdbarch_tdep *tdep = (cris_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
linux_init_abi (info, gdbarch, 0);
void **this_cache)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- cris_gdbarch_tdep *tdep = (cris_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct cris_unwind_cache *info;
CORE_ADDR addr;
crisv32_single_step_through_delay (struct gdbarch *gdbarch,
struct frame_info *this_frame)
{
- cris_gdbarch_tdep *tdep = (cris_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
ULONGEST erp;
int ret = 0;
void **this_prologue_cache)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- cris_gdbarch_tdep *tdep = (cris_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
struct cris_unwind_cache *info;
if ((*this_prologue_cache))
static CORE_ADDR
cris_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- cris_gdbarch_tdep *tdep = (cris_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
CORE_ADDR func_addr, func_end;
struct symtab_and_line sal;
CORE_ADDR pc_after_prologue;
static const gdb_byte *
cris_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
{
- cris_gdbarch_tdep *tdep = (cris_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
static unsigned char break8_insn[] = {0x38, 0xe9};
static unsigned char break15_insn[] = {0x3f, 0xe9};
cris_spec_reg_applicable (struct gdbarch *gdbarch,
struct cris_spec_reg spec_reg)
{
- cris_gdbarch_tdep *tdep = (cris_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
unsigned int version = tdep->cris_version;
switch (spec_reg.applicable_version)
int regnum, const void *gregs, size_t len)
{
struct gdbarch *gdbarch = regcache->arch ();
- cris_gdbarch_tdep *tdep = (cris_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
int i;
const cris_elf_greg_t *regp = static_cast<const cris_elf_greg_t *>(gregs);
static void
cris_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
{
- cris_gdbarch_tdep *tdep = (cris_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ cris_gdbarch_tdep *tdep = gdbarch_tdep<cris_gdbarch_tdep> (gdbarch);
if (tdep != NULL)
{
gdb_printf (file, "cris_dump_tdep: tdep->cris_version = %i\n",
arches = gdbarch_list_lookup_by_info (arches->next, &info))
{
cris_gdbarch_tdep *tdep
- = (cris_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
+ = gdbarch_tdep<cris_gdbarch_tdep> (arches->gdbarch);
if (tdep->cris_version == usr_cmd_cris_version
&& tdep->cris_mode == usr_cmd_cris_mode
{
int num_regs = gdbarch_num_regs (gdbarch);
csky_gdbarch_tdep *tdep
- = (csky_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ = gdbarch_tdep<csky_gdbarch_tdep> (gdbarch);
regno -= num_regs;
{
int num_regs = gdbarch_num_regs (gdbarch);
csky_gdbarch_tdep *tdep
- = (csky_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ = gdbarch_tdep<csky_gdbarch_tdep> (gdbarch);
regnum -= num_regs;
{
int num_regs = gdbarch_num_regs (gdbarch);
csky_gdbarch_tdep *tdep
- = (csky_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ = gdbarch_tdep<csky_gdbarch_tdep> (gdbarch);
regnum -= num_regs;
arches = gdbarch_list_lookup_by_info (arches->next, &info))
{
csky_gdbarch_tdep *tdep
- = (csky_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
+ = gdbarch_tdep<csky_gdbarch_tdep> (arches->gdbarch);
if (fpu_abi != tdep->fpu_abi)
continue;
if (vdsp_version != tdep->vdsp_version)
enum frv_abi
frv_abi (struct gdbarch *gdbarch)
{
- frv_gdbarch_tdep *tdep = (frv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ frv_gdbarch_tdep *tdep = gdbarch_tdep<frv_gdbarch_tdep> (gdbarch);
return tdep->frv_abi;
}
if (reg >= frv_num_regs + frv_num_pseudo_regs)
return "?toolarge?";
- frv_gdbarch_tdep *tdep = (frv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ frv_gdbarch_tdep *tdep = gdbarch_tdep<frv_gdbarch_tdep> (gdbarch);
return tdep->register_names[reg];
}
{
if (reg_nr == FT32_PC_REGNUM)
{
- ft32_gdbarch_tdep *tdep = (ft32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ft32_gdbarch_tdep *tdep = gdbarch_tdep<ft32_gdbarch_tdep> (gdbarch);
return tdep->pc_type;
}
else if (reg_nr == FT32_SP_REGNUM || reg_nr == FT32_FP_REGNUM)
#include "gdbarch-gen.h"
-extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
+/* An internal function that should _only_ be called from gdbarch_tdep.
+ Returns the gdbarch_tdep field held within GDBARCH. */
+extern struct gdbarch_tdep *gdbarch_tdep_1 (struct gdbarch *gdbarch);
+
+/* Return the gdbarch_tdep object held within GDBARCH cast to the type
+ TDepType, which should be a sub-class of gdbarch_tdep. There is no
+ checking done that the gdbarch_tdep within GDBARCH actually is of the
+ type TDepType, we just assume the caller knows what they are doing. */
+
+template<typename TDepType>
+static inline TDepType *
+gdbarch_tdep (struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep_1 (gdbarch);
+ return static_cast<TDepType *> (tdep);
+}
/* Mechanism for co-ordinating the selection of a specific
architecture.
void
hppabsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ hppa_gdbarch_tdep *tdep = gdbarch_tdep<hppa_gdbarch_tdep> (gdbarch);
/* OpenBSD and NetBSD have a 64-bit 'long double'. */
set_gdbarch_long_double_bit (gdbarch, 64);
void *cb_data,
const struct regcache *regcache)
{
- hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ hppa_gdbarch_tdep *tdep = gdbarch_tdep<hppa_gdbarch_tdep> (gdbarch);
cb (".reg", 80 * tdep->bytes_per_address, 80 * tdep->bytes_per_address,
&hppa_linux_regset, NULL, cb_data);
static void
hppa_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ hppa_gdbarch_tdep *tdep = gdbarch_tdep<hppa_gdbarch_tdep> (gdbarch);
linux_init_abi (info, gdbarch, 0);
if (size > 0)
{
struct gdbarch *gdbarch = objfile->arch ();
- hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ hppa_gdbarch_tdep *tdep = gdbarch_tdep<hppa_gdbarch_tdep> (gdbarch);
unsigned long tmp;
unsigned i;
char *buf = (char *) alloca (size);
/* Global pointer (r19) of the function we are trying to call. */
CORE_ADDR gp;
- hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ hppa_gdbarch_tdep *tdep = gdbarch_tdep<hppa_gdbarch_tdep> (gdbarch);
for (write_pass = 0; write_pass < 2; write_pass++)
{
function_call_return_method return_method,
CORE_ADDR struct_addr)
{
- hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ hppa_gdbarch_tdep *tdep = gdbarch_tdep<hppa_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int i, offset = 0;
CORE_ADDR gp;
}
{
- hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ hppa_gdbarch_tdep *tdep = gdbarch_tdep<hppa_gdbarch_tdep> (gdbarch);
if (tdep->unwind_adjust_stub)
tdep->unwind_adjust_stub (this_frame, cache->base, cache->saved_regs);
{
CORE_ADDR pc = get_frame_address_in_block (this_frame);
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ hppa_gdbarch_tdep *tdep = gdbarch_tdep<hppa_gdbarch_tdep> (gdbarch);
if (pc == 0
|| (tdep->in_solib_call_trampoline != NULL
static void
hppa_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
{
- hppa_gdbarch_tdep *tdep = (hppa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ hppa_gdbarch_tdep *tdep = gdbarch_tdep<hppa_gdbarch_tdep> (gdbarch);
gdb_printf (file, "bytes_per_address = %d\n",
tdep->bytes_per_address);
void
i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
tdep->jb_pc_offset = 0;
function_call_return_method return_method,
CORE_ADDR struct_addr)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
gdb_byte buf[4];
int i;
static void
i386_darwin_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
/* We support the SSE registers. */
tdep->num_xmm_regs = I386_NUM_XREGS - 1;
void *cb_data,
const struct regcache *regcache)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
cb (".reg", I386_FBSD_SIZEOF_GREGSET, I386_FBSD_SIZEOF_GREGSET,
&i386_fbsd_gregset, NULL, cb_data);
static void
i386fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
/* Generic FreeBSD support. */
fbsd_init_abi (info, gdbarch);
static void
i386gnu_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
/* GNU uses ELF. */
i386_elf_init_abi (info, gdbarch);
static void
i386_go32_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
/* DJGPP doesn't have any special frames for signal handlers. */
tdep->sigtramp_p = NULL;
void *cb_data,
const struct regcache *regcache)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
cb (".reg", 68, 68, &i386_gregset, NULL, cb_data);
static void
i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
const struct target_desc *tdesc = info.target_desc;
struct tdesc_arch_data *tdesc_data = info.tdesc_data;
const struct tdesc_feature *feature;
static void
i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
/* Obviously NetBSD is BSD-based. */
i386bsd_init_abi (info, gdbarch);
static void
i386nbsdelf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
/* It's still NetBSD. */
i386nbsd_init_abi (info, gdbarch);
i386nto_supply_gregset (struct regcache *regcache, char *gpregs)
{
struct gdbarch *gdbarch = regcache->arch ();
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
gdb_assert (tdep->gregset_reg_offset == i386nto_gregset_reg_offset);
i386_gregset.supply_regset (&i386_gregset, regcache, -1,
i386nto_register_area (struct gdbarch *gdbarch,
int regno, int regset, unsigned *off)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
*off = 0;
if (regset == NTO_REG_GENERAL)
static void
i386nto_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
static struct target_so_ops nto_svr4_so_ops;
/* Deal with our strange signals. */
static void
i386obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
/* Obviously OpenBSD is BSD-based. */
i386bsd_init_abi (info, gdbarch);
static void
i386_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
/* Solaris is SVR4-based. */
i386_svr4_init_abi (info, gdbarch);
static int
i386_mmx_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int mm0_regnum = tdep->mm0_regnum;
if (mm0_regnum < 0)
int
i386_byte_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
regnum -= tdep->al_regnum;
return regnum >= 0 && regnum < tdep->num_byte_regs;
int
i386_word_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
regnum -= tdep->ax_regnum;
return regnum >= 0 && regnum < tdep->num_word_regs;
int
i386_dword_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int eax_regnum = tdep->eax_regnum;
if (eax_regnum < 0)
int
i386_zmmh_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int zmm0h_regnum = tdep->zmm0h_regnum;
if (zmm0h_regnum < 0)
int
i386_zmm_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int zmm0_regnum = tdep->zmm0_regnum;
if (zmm0_regnum < 0)
int
i386_k_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int k0_regnum = tdep->k0_regnum;
if (k0_regnum < 0)
static int
i386_ymmh_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int ymm0h_regnum = tdep->ymm0h_regnum;
if (ymm0h_regnum < 0)
int
i386_ymm_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int ymm0_regnum = tdep->ymm0_regnum;
if (ymm0_regnum < 0)
static int
i386_ymmh_avx512_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int ymm16h_regnum = tdep->ymm16h_regnum;
if (ymm16h_regnum < 0)
int
i386_ymm_avx512_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int ymm16_regnum = tdep->ymm16_regnum;
if (ymm16_regnum < 0)
int
i386_bnd_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int bnd0_regnum = tdep->bnd0_regnum;
if (bnd0_regnum < 0)
int
i386_xmm_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int num_xmm_regs = I387_NUM_XMM_REGS (tdep);
if (num_xmm_regs == 0)
int
i386_xmm_avx512_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int num_xmm_avx512_regs = I387_NUM_XMM_AVX512_REGS (tdep);
if (num_xmm_avx512_regs == 0)
static int
i386_mxcsr_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (I387_NUM_XMM_REGS (tdep) == 0)
return 0;
int
i386_fp_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (I387_ST0_REGNUM (tdep) < 0)
return 0;
int
i386_fpc_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (I387_ST0_REGNUM (tdep) < 0)
return 0;
static int
i386_bndr_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (I387_BND0R_REGNUM (tdep) < 0)
return 0;
static int
i386_mpx_ctrl_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (I387_BNDCFGU_REGNUM (tdep) < 0)
return 0;
bool
i386_pkru_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int pkru_regnum = tdep->pkru_regnum;
if (pkru_regnum < 0)
const char *
i386_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (i386_bnd_regnum_p (gdbarch, regnum))
return i386_bnd_names[regnum - tdep->bnd0_regnum];
if (i386_mmx_regnum_p (gdbarch, regnum))
static int
i386_dbx_reg_to_regnum (struct gdbarch *gdbarch, int reg)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
/* This implements what GCC calls the "default" register map
(dbx_register_map[]). */
static int
i386_svr4_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
/* This implements the GCC register map that tries to be compatible
with the SVR4 C compiler for DWARF (svr4_dbx_register_map[]). */
i386_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct i386_frame_cache *cache;
CORE_ADDR addr;
void **this_prologue_cache)
{
gdbarch *arch = get_frame_arch (this_frame);
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);
/* We shouldn't even bother if we don't have a sigcontext_addr
handler. */
CORE_ADDR sp, jb_addr;
struct gdbarch *gdbarch = get_frame_arch (frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int jb_pc_offset = tdep->jb_pc_offset;
/* If JB_PC_OFFSET is -1, we have no way to find out where the
i386_extract_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, gdb_byte *valbuf)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int len = TYPE_LENGTH (type);
gdb_byte buf[I386_MAX_REGISTER_SIZE];
i386_store_return_value (struct gdbarch *gdbarch, struct type *type,
struct regcache *regcache, const gdb_byte *valbuf)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int len = TYPE_LENGTH (type);
if (type->code () == TYPE_CODE_FLT)
static int
i386_reg_struct_return_p (struct gdbarch *gdbarch, struct type *type)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
enum type_code code = type->code ();
int len = TYPE_LENGTH (type);
struct type *
i387_ext_type (struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (!tdep->i387_ext_type)
{
static struct type *
i386_bnd_type (struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (!tdep->i386_bnd_type)
static struct type *
i386_zmm_type (struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (!tdep->i386_zmm_type)
{
static struct type *
i386_ymm_type (struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (!tdep->i386_ymm_type)
{
static struct type *
i386_mmx_type (struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (!tdep->i386_mmx_type)
{
i386_mmx_regnum_to_fp_regnum (readable_regcache *regcache, int regnum)
{
gdbarch *arch = regcache->arch ();
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);
int mmxreg, fpreg;
ULONGEST fstat;
int tos;
}
else
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (i386_bnd_regnum_p (gdbarch, regnum))
{
regnum -= tdep->bnd0_regnum;
}
else
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (i386_bnd_regnum_p (gdbarch, regnum))
{
i386_ax_pseudo_register_collect (struct gdbarch *gdbarch,
struct agent_expr *ax, int regnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (i386_mmx_regnum_p (gdbarch, regnum))
{
int regnum, const void *gregs, size_t len)
{
struct gdbarch *gdbarch = regcache->arch ();
- const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ const i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
const gdb_byte *regs = (const gdb_byte *) gregs;
int i;
int regnum, void *gregs, size_t len)
{
struct gdbarch *gdbarch = regcache->arch ();
- const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ const i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
gdb_byte *regs = (gdb_byte *) gregs;
int i;
int regnum, const void *fpregs, size_t len)
{
struct gdbarch *gdbarch = regcache->arch ();
- const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ const i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (len == I387_SIZEOF_FXSAVE)
{
int regnum, void *fpregs, size_t len)
{
struct gdbarch *gdbarch = regcache->arch ();
- const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ const i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (len == I387_SIZEOF_FXSAVE)
{
void *cb_data,
const struct regcache *regcache)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
cb (".reg", tdep->sizeof_gregset, tdep->sizeof_gregset, &i386_gregset, NULL,
cb_data);
void
i386_svr4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
/* System V Release 4 uses ELF. */
i386_elf_init_abi (info, gdbarch);
i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
const struct reggroup *group)
{
- const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ const i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int fp_regnum_p, mmx_regnum_p, xmm_regnum_p, mxcsr_regnum_p,
ymm_regnum_p, ymmh_regnum_p, ymm_avx512_regnum_p, ymmh_avx512_regnum_p,
bndr_regnum_p, bnd_regnum_p, zmm_regnum_p, zmmh_regnum_p,
struct i386_record_s *ir,
uint32_t iregnum)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int i;
/* Oza: Because of floating point insn push/pop of fpu stack is going to
ULONGEST addr;
gdb_byte buf[I386_MAX_REGISTER_SIZE];
struct i386_record_s ir;
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
uint8_t rex_w = -1;
uint8_t rex_r = 0;
rcache = get_current_regcache ();
gdbarch *arch = rcache->arch ();
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);
regstatus = regcache_raw_read_unsigned (rcache, tdep->bndcfgu_regnum, &ret);
i386_mpx_enabled (void)
{
gdbarch *arch = get_current_arch ();
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);
const struct target_desc *tdesc = tdep->tdesc;
return (tdesc_find_feature (tdesc, "org.gnu.gdb.i386.mpx") != NULL);
static void
i386_windows_init_abi_common (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
set_gdbarch_skip_trampoline_code (gdbarch, i386_windows_skip_trampoline_code);
i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
struct frame_info *frame, const char *args)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
ULONGEST fctrl;
int fctrl_p;
ULONGEST fstat;
i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave)
{
struct gdbarch *gdbarch = regcache->arch ();
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
const gdb_byte *regs = (const gdb_byte *) fsave;
int i;
i387_collect_fsave (const struct regcache *regcache, int regnum, void *fsave)
{
gdbarch *arch = regcache->arch ();
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);
gdb_byte *regs = (gdb_byte *) fsave;
int i;
i387_supply_fxsave (struct regcache *regcache, int regnum, const void *fxsave)
{
gdbarch *arch = regcache->arch ();
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);
const gdb_byte *regs = (const gdb_byte *) fxsave;
int i;
i387_collect_fxsave (const struct regcache *regcache, int regnum, void *fxsave)
{
gdbarch *arch = regcache->arch ();
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);
gdb_byte *regs = (gdb_byte *) fxsave;
int i;
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
const gdb_byte *regs = (const gdb_byte *) xsave;
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
/* Get `xstat_bv'. The supported bits in `xstat_bv' are 8 bytes. */
ULONGEST xstate_bv = extract_unsigned_integer (XSAVE_XSTATE_BV_ADDR (regs),
{
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
const gdb_byte *regs = (const gdb_byte *) xsave;
int i;
/* In 64-bit mode the split between "low" and "high" ZMM registers is at
{
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
gdb_byte *p, *regs = (gdb_byte *) xsave;
gdb_byte raw[I386_MAX_REGISTER_SIZE];
ULONGEST initial_xstate_bv, clear_bv, xstate_bv = 0;
void
i387_return_value (struct gdbarch *gdbarch, struct regcache *regcache)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
ULONGEST fstat;
/* Set the top of the floating-point register stack to 7. The
void
i387_reset_bnd_regs (struct gdbarch *gdbarch, struct regcache *regcache)
{
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
if (I387_BND0R_REGNUM (tdep) > 0)
{
static void
ia64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- ia64_gdbarch_tdep *tdep = (ia64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ia64_gdbarch_tdep *tdep = gdbarch_tdep<ia64_gdbarch_tdep> (gdbarch);
static const char *const stap_register_prefixes[] = { "r", NULL };
static const char *const stap_register_indirection_prefixes[] = { "[",
NULL };
static struct type *
ia64_ext_type (struct gdbarch *gdbarch)
{
- ia64_gdbarch_tdep *tdep = (ia64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ia64_gdbarch_tdep *tdep = gdbarch_tdep<ia64_gdbarch_tdep> (gdbarch);
if (!tdep->ia64_ext_type)
tdep->ia64_ext_type
struct ia64_frame_cache *cache)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- ia64_gdbarch_tdep *tdep = (ia64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ia64_gdbarch_tdep *tdep = gdbarch_tdep<ia64_gdbarch_tdep> (gdbarch);
if (tdep->sigcontext_register_address)
{
void **this_cache)
{
gdbarch *arch = get_frame_arch (this_frame);
- ia64_gdbarch_tdep *tdep = (ia64_gdbarch_tdep *) gdbarch_tdep (arch);
+ ia64_gdbarch_tdep *tdep = gdbarch_tdep<ia64_gdbarch_tdep> (arch);
if (tdep->pc_in_sigtramp)
{
CORE_ADDR pc = get_frame_pc (this_frame);
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);
+ ia64_gdbarch_tdep *tdep = gdbarch_tdep<ia64_gdbarch_tdep> (gdbarch);
/* We never call any libunwind routines that need to write registers. */
gdb_assert (!write);
static CORE_ADDR
ia64_find_global_pointer (struct gdbarch *gdbarch, CORE_ADDR faddr)
{
- ia64_gdbarch_tdep *tdep = (ia64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ia64_gdbarch_tdep *tdep = gdbarch_tdep<ia64_gdbarch_tdep> (gdbarch);
CORE_ADDR addr = 0;
if (tdep->find_global_pointer_from_solib)
function_call_return_method return_method,
CORE_ADDR struct_addr)
{
- ia64_gdbarch_tdep *tdep = (ia64_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ia64_gdbarch_tdep *tdep = gdbarch_tdep<ia64_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int argno;
struct value *arg;
static void
loongarch_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- loongarch_gdbarch_tdep *tdep = (loongarch_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ loongarch_gdbarch_tdep *tdep = gdbarch_tdep<loongarch_gdbarch_tdep> (gdbarch);
linux_init_abi (info, gdbarch, 0);
loongarch_next_pc (struct regcache *regcache, CORE_ADDR cur_pc)
{
struct gdbarch *gdbarch = regcache->arch ();
- loongarch_gdbarch_tdep *tdep = (loongarch_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ loongarch_gdbarch_tdep *tdep = gdbarch_tdep<loongarch_gdbarch_tdep> (gdbarch);
insn_t insn = loongarch_fetch_instruction (cur_pc);
size_t insn_len = loongarch_insn_length (insn);
CORE_ADDR next_pc = cur_pc + insn_len;
we are looking for. If it doesn't then we can't reuse this
gdbarch. */
loongarch_gdbarch_tdep *candidate_tdep
- = (loongarch_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
+ = gdbarch_tdep<loongarch_gdbarch_tdep> (arches->gdbarch);
if (candidate_tdep->abi_features != abi_features)
continue;
static void
make_types (struct gdbarch *arch)
{
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
unsigned long mach = gdbarch_bfd_arch_info (arch)->mach;
int data_addr_reg_bits, code_addr_reg_bits;
char type_name[50];
static const char *
m32c_register_name (struct gdbarch *gdbarch, int num)
{
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (gdbarch);
return tdep->regs[num].name;
}
static struct type *
m32c_register_type (struct gdbarch *arch, int reg_nr)
{
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
return tdep->regs[reg_nr].type;
}
static int
m32c_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
{
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (gdbarch);
return tdep->regs[reg_nr].sim_num;
}
static int
m32c_debug_info_reg_to_regnum (struct gdbarch *gdbarch, int reg_nr)
{
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (gdbarch);
if (0 <= reg_nr && reg_nr <= M32C_MAX_DWARF_REGNUM
&& tdep->dwarf_regs[reg_nr])
return tdep->dwarf_regs[reg_nr]->num;
m32c_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
const struct reggroup *group)
{
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (gdbarch);
struct m32c_reg *reg = &tdep->regs[regnum];
/* The anonymous raw registers aren't in any groups. */
m32c_read_flg (readable_regcache *cache)
{
gdbarch *arch = cache->arch ();
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
ULONGEST flg;
cache->raw_read (tdep->flg->num, &flg);
m32c_r3r2r1r0_read (struct m32c_reg *reg, readable_regcache *cache, gdb_byte *buf)
{
gdbarch *arch = reg->arch;
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
int len = TYPE_LENGTH (tdep->r0->type);
enum register_status status;
const gdb_byte *buf)
{
gdbarch *arch = reg->arch;
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
int len = TYPE_LENGTH (tdep->r0->type);
if (gdbarch_byte_order (reg->arch) == BFD_ENDIAN_BIG)
int cookednum,
gdb_byte *buf)
{
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
struct m32c_reg *reg;
gdb_assert (0 <= cookednum && cookednum < tdep->num_regs);
int cookednum,
const gdb_byte *buf)
{
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
struct m32c_reg *reg;
gdb_assert (0 <= cookednum && cookednum < tdep->num_regs);
struct m32c_reg *ry,
int n)
{
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
struct m32c_reg *r = &tdep->regs[tdep->num_regs];
gdb_assert (tdep->num_regs < M32C_MAX_NUM_REGS);
/* Update the DWARF->reg mapping. */
gdbarch *arch = reg->arch;
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
tdep->dwarf_regs[num] = reg;
}
static void
make_regs (struct gdbarch *arch)
{
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
int mach = gdbarch_bfd_arch_info (arch)->mach;
int num_raw_regs;
int num_cooked_regs;
return 1;
gdbarch *arch = state->arch;
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
if (m32c_pv_push (state, state->fb, tdep->push_addr_bytes))
return 1;
m32c_pv_pushm (struct m32c_pv_state *state, int src)
{
gdbarch *arch = state->arch;
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
/* The bits in SRC indicating which registers to save are:
r0 r1 r2 r3 a0 a1 sb fb */
m32c_is_1st_arg_reg (struct m32c_pv_state *state, pv_t value)
{
gdbarch *arch = state->arch;
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
return (value.kind == pvk_register
&& (gdbarch_bfd_arch_info (state->arch)->mach == bfd_mach_m16c
m32c_is_arg_reg (struct m32c_pv_state *state, pv_t value)
{
gdbarch *arch = state->arch;
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
return (value.kind == pvk_register
&& (gdbarch_bfd_arch_info (state->arch)->mach == bfd_mach_m16c
pv_t value)
{
gdbarch *arch = st->arch;
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
return (m32c_is_arg_reg (st, value)
&& loc.kind == srcdest_mem
pv_t value)
{
gdbarch *arch = st->arch;
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
return (m32c_is_1st_arg_reg (st, value)
&& !st->stack->find_reg (st->arch, value.reg, 0)
m32c_pushm_is_reg_save (struct m32c_pv_state *st, int src)
{
gdbarch *arch = st->arch;
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
/* The bits in SRC indicating which registers to save are:
r0 r1 r2 r3 a0 a1 sb fb */
{
struct m32c_prologue *prologue = (struct m32c_prologue *) prologue_untyped;
struct gdbarch *arch = prologue->arch;
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
/* Is this the unchanged value of some register being saved on the
stack? */
CORE_ADDR start, CORE_ADDR limit,
struct m32c_prologue *prologue)
{
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
unsigned long mach = gdbarch_bfd_arch_info (arch)->mach;
CORE_ADDR after_last_frame_related_insn;
struct m32c_pv_state st;
struct m32c_prologue *p
= m32c_analyze_frame_prologue (this_frame, this_prologue_cache);
gdbarch *arch = get_frame_arch (this_frame);
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
/* In functions that use alloca, the distance between the stack
pointer and the frame base varies dynamically, so we can't use
void **this_prologue_cache, int regnum)
{
gdbarch *arch = get_frame_arch (this_frame);
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (arch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (arch);
struct m32c_prologue *p
= m32c_analyze_frame_prologue (this_frame, this_prologue_cache);
CORE_ADDR frame_base = m32c_frame_base (this_frame, this_prologue_cache);
function_call_return_method return_method,
CORE_ADDR struct_addr)
{
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
unsigned long mach = gdbarch_bfd_arch_info (gdbarch)->mach;
CORE_ADDR cfa;
gdb_byte *readbuf,
const gdb_byte *writebuf)
{
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
enum return_value_convention conv;
ULONGEST valtype_len = TYPE_LENGTH (valtype);
m32c_skip_trampoline_code (struct frame_info *frame, CORE_ADDR stop_pc)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
/* It would be nicer to simply look up the addresses of known
struct m32c_prologue p;
struct regcache *regcache = get_current_regcache ();
- m32c_gdbarch_tdep *tdep = (m32c_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m32c_gdbarch_tdep *tdep = gdbarch_tdep<m32c_gdbarch_tdep> (gdbarch);
if (!find_pc_partial_function (pc, &name, &func_addr, &func_end))
internal_error (__FILE__, __LINE__,
static int
stack_correction (gdbarch *arch)
{
- m68gc11_gdbarch_tdep *tdep = (m68gc11_gdbarch_tdep *) gdbarch_tdep (arch);
+ m68gc11_gdbarch_tdep *tdep = gdbarch_tdep<m68gc11_gdbarch_tdep> (arch);
return tdep->stack_correction;
}
static int
use_page_register (gdbarch *arch)
{
- m68gc11_gdbarch_tdep *tdep = (m68gc11_gdbarch_tdep *) gdbarch_tdep (arch);
+ m68gc11_gdbarch_tdep *tdep = gdbarch_tdep<m68gc11_gdbarch_tdep> (arch);
return tdep->stack_correction;
}
return pc;
}
- m68gc11_gdbarch_tdep *tdep = (m68gc11_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68gc11_gdbarch_tdep *tdep = gdbarch_tdep<m68gc11_gdbarch_tdep> (gdbarch);
seq_table = tdep->prologue;
/* The 68hc11 stack is as follows:
else
{
m68gc11_gdbarch_tdep *tdep
- = (m68gc11_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ = gdbarch_tdep<m68gc11_gdbarch_tdep> (gdbarch);
if (regno == HARD_PC_REGNUM && tdep->use_page_register)
{
gdb_printf (file, " Y=");
m68hc11_print_register (gdbarch, file, frame, HARD_Y_REGNUM);
- m68gc11_gdbarch_tdep *tdep = (m68gc11_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68gc11_gdbarch_tdep *tdep = gdbarch_tdep<m68gc11_gdbarch_tdep> (gdbarch);
if (tdep->use_page_register)
{
arches = gdbarch_list_lookup_by_info (arches->next, &info))
{
m68gc11_gdbarch_tdep *tdep
- = (m68gc11_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
+ = gdbarch_tdep<m68gc11_gdbarch_tdep> (arches->gdbarch);
if (tdep->elf_flags != elf_flags)
continue;
static void
m68kbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
tdep->jb_pc = 5;
tdep->jb_elt_size = 4;
static void
m68k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
linux_init_abi (info, gdbarch, 0);
static struct type *
m68k_ps_type (struct gdbarch *gdbarch)
{
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
if (!tdep->m68k_ps_type)
{
static struct type *
m68881_ext_type (struct gdbarch *gdbarch)
{
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
if (!tdep->m68881_ext_type)
tdep->m68881_ext_type
static struct type *
m68k_register_type (struct gdbarch *gdbarch, int regnum)
{
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
if (tdep->fpregs_present)
{
static const char *
m68k_register_name (struct gdbarch *gdbarch, int regnum)
{
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
if (regnum < 0 || regnum >= ARRAY_SIZE (m68k_register_names))
internal_error (__FILE__, __LINE__,
m68k_convert_register_p (struct gdbarch *gdbarch,
int regnum, struct type *type)
{
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
if (!tdep->fpregs_present)
return 0;
if (type->code () == TYPE_CODE_PTR && len == 4)
{
struct gdbarch *gdbarch = regcache->arch ();
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
regcache->raw_read (tdep->pointer_result_regnum, valbuf);
}
else if (len <= 4)
{
gdb_byte buf[M68K_MAX_REGISTER_SIZE];
struct gdbarch *gdbarch = regcache->arch ();
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
if (tdep->float_return && type->code () == TYPE_CODE_FLT)
{
if (type->code () == TYPE_CODE_PTR && len == 4)
{
struct gdbarch *gdbarch = regcache->arch ();
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
regcache->raw_write (tdep->pointer_result_regnum, valbuf);
/* gdb historically also set D0 in the SVR4 case. */
if (tdep->pointer_result_regnum != M68K_D0_REGNUM)
const gdb_byte *valbuf)
{
struct gdbarch *gdbarch = regcache->arch ();
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
if (tdep->float_return && type->code () == TYPE_CODE_FLT)
{
static int
m68k_reg_struct_return_p (struct gdbarch *gdbarch, struct type *type)
{
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
enum type_code code = type->code ();
int len = TYPE_LENGTH (type);
gdb_byte *readbuf, const gdb_byte *writebuf)
{
enum type_code code = type->code ();
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
/* Aggregates with a single member are always returned like their
sole element. */
function_call_return_method return_method,
CORE_ADDR struct_addr)
{
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
gdb_byte buf[4];
int i;
static int
m68k_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int num)
{
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
if (num < 8)
/* d0..7 */
struct m68k_frame_cache *cache)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
if (cache->locals >= 0)
{
gdb_byte *buf;
CORE_ADDR sp, jb_addr;
struct gdbarch *gdbarch = get_frame_arch (frame);
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
if (tdep->jb_pc < 0)
void
m68k_svr4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
/* SVR4 uses a different calling convention. */
set_gdbarch_return_value (gdbarch, m68k_svr4_return_value);
static void
m68k_embedded_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
m68k_svr4_init_abi (info, gdbarch);
tdep->pointer_result_regnum = M68K_D0_REGNUM;
best_arch = gdbarch_list_lookup_by_info (best_arch->next, &info))
{
m68k_gdbarch_tdep *tdep
- = (m68k_gdbarch_tdep *) gdbarch_tdep (best_arch->gdbarch);
+ = gdbarch_tdep<m68k_gdbarch_tdep> (best_arch->gdbarch);
if (flavour != tdep->flavour)
continue;
static void
m68k_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
{
- m68k_gdbarch_tdep *tdep = (m68k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
if (tdep == NULL)
return;
specifically excluding the generic coprocessor register sets. */
mep_gdbarch_tdep *tdep
- = (mep_gdbarch_tdep *) gdbarch_tdep (target_gdbarch ());
+ = gdbarch_tdep<mep_gdbarch_tdep> (target_gdbarch ());
CGEN_CPU_DESC desc = tdep->cpu_desc;
const CGEN_HW_ENTRY *hw;
else
{
mep_gdbarch_tdep *tdep
- = (mep_gdbarch_tdep *) gdbarch_tdep (target_gdbarch ());
+ = gdbarch_tdep<mep_gdbarch_tdep> (target_gdbarch ());
return tdep->me_module;
}
}
arches = gdbarch_list_lookup_by_info (arches->next, &info))
{
mep_gdbarch_tdep *tdep
- = (mep_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
+ = gdbarch_tdep<mep_gdbarch_tdep> (arches->gdbarch);
if (tdep->me_module == me_module)
return arches->gdbarch;
thread_info *thread)
{
struct regcache *regcache = get_thread_regcache (thread);
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int regsize = register_size (gdbarch, MIPS_V0_REGNUM);
/* The content of a register */
mips_linux_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
enum mips_abi abi = mips_abi (gdbarch);
struct tdesc_arch_data *tdesc_data = info.tdesc_data;
const struct mips_regnum *
mips_regnum (struct gdbarch *gdbarch)
{
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
return tdep->regnum;
}
static bool
mips_eabi (gdbarch *arch)
{
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (arch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (arch);
return (tdep->mips_abi == MIPS_ABI_EABI32 \
|| tdep->mips_abi == MIPS_ABI_EABI64);
}
static int
mips_last_fp_arg_regnum (gdbarch *arch)
{
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (arch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (arch);
return tdep->mips_last_fp_arg_regnum;
}
static int
mips_last_arg_regnum (gdbarch *arch)
{
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (arch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (arch);
return tdep->mips_last_arg_regnum;
}
static enum mips_fpu_type
mips_get_fpu_type (gdbarch *arch)
{
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (arch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (arch);
return tdep->mips_fpu_type;
}
enum mips_abi
mips_abi (struct gdbarch *gdbarch)
{
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
return tdep->mips_abi;
}
int
mips_isa_regsize (struct gdbarch *gdbarch)
{
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
/* If we know how big the registers are, use that size. */
if (tdep->register_size_valid_p)
static int
is_mips16_isa (struct gdbarch *gdbarch)
{
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
return tdep->mips_isa == ISA_MIPS16;
}
static int
is_micromips_isa (struct gdbarch *gdbarch)
{
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
return tdep->mips_isa == ISA_MICROMIPS;
}
static const char *
mips_register_name (struct gdbarch *gdbarch, int regno)
{
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
/* GPR names for all ABIs other than n32/n64. */
static const char *mips_gpr_names[] = {
"zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",
else if (register_size (gdbarch, rawnum) >
register_size (gdbarch, cookednum))
{
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
if (tdep->mips64_transfers_32bit_regs_p)
return regcache->raw_read_part (rawnum, 0, 4, buf);
else if (register_size (gdbarch, rawnum) >
register_size (gdbarch, cookednum))
{
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
if (tdep->mips64_transfers_32bit_regs_p)
regcache->raw_write_part (rawnum, 0, 4, buf);
if (register_size (gdbarch, rawnum) > register_size (gdbarch, reg))
{
mips_gdbarch_tdep *tdep
- = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
if (!tdep->mips64_transfers_32bit_regs_p
|| gdbarch_byte_order (gdbarch) != BFD_ENDIAN_BIG)
else
{
int rawnum = regnum - gdbarch_num_regs (gdbarch);
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
/* The cooked or ABI registers. These are sized according to
the ABI (with a few complications). */
else
{
mips_gdbarch_tdep *tdep
- = (mips_gdbarch_tdep *) gdbarch_tdep (target_gdbarch ());
+ = gdbarch_tdep<mips_gdbarch_tdep> (target_gdbarch ());
if (mips_mask_address_p (tdep))
additional_text = _(" (currently \"on\")");
case 12: /* SYSCALL */
{
mips_gdbarch_tdep *tdep
- = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
if (tdep->syscall_next_pc != NULL)
pc = tdep->syscall_next_pc (get_current_frame ());
case 0x22d: /* SYSCALL: 000000 1000101101 111100 */
{
mips_gdbarch_tdep *tdep
- = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
if (tdep->syscall_next_pc != NULL)
pc = tdep->syscall_next_pc (get_current_frame ());
static CORE_ADDR
mips_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
{
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
if (mips_mask_address_p (tdep) && (((ULONGEST) addr) >> 32 == 0xffffffffUL))
/* This hack is a work-around for existing boards using PMON, the
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
int fp_return_type = 0;
int offset, regnum, xfer;
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
/* From MIPSpro N32 ABI Handbook, Document Number: 007-2816-004
{
CORE_ADDR func_addr = function ? find_function_addr (function, NULL) : 0;
int mips16 = mips_pc_is_mips16 (gdbarch, func_addr);
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
enum mips_fval_reg fval_reg;
fval_reg = readbuf ? mips16 ? mips_fval_gpr : mips_fval_fpr : mips_fval_both;
else if (arches != NULL)
{
mips_gdbarch_tdep *tdep
- = (mips_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
+ = gdbarch_tdep<mips_gdbarch_tdep> (arches->gdbarch);
elf_flags = tdep->elf_flags;
}
else
if (found_abi == MIPS_ABI_UNKNOWN && info.abfd == NULL && arches != NULL)
{
mips_gdbarch_tdep *tdep
- = (mips_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
+ = gdbarch_tdep<mips_gdbarch_tdep> (arches->gdbarch);
found_abi = tdep->found_abi;
}
arches = gdbarch_list_lookup_by_info (arches->next, &info))
{
mips_gdbarch_tdep *tdep
- = (mips_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
+ = gdbarch_tdep<mips_gdbarch_tdep> (arches->gdbarch);
/* MIPS needs to be pedantic about which ABI and the compressed
ISA variation the object is using. */
static void
mips_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
{
- mips_gdbarch_tdep *tdep = (mips_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ mips_gdbarch_tdep *tdep = gdbarch_tdep<mips_gdbarch_tdep> (gdbarch);
if (tdep != NULL)
{
int ef_mips_arch;
static void
mn10300_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
{
- mn10300_gdbarch_tdep *tdep = (mn10300_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ mn10300_gdbarch_tdep *tdep = gdbarch_tdep<mn10300_gdbarch_tdep> (gdbarch);
gdb_printf (file, "mn10300_dump_tdep: am33_mode = %d\n",
tdep->am33_mode);
}
static inline int
get_am33_mode (gdbarch *arch)
{
- mn10300_gdbarch_tdep *tdep = (mn10300_gdbarch_tdep *) gdbarch_tdep (arch);
+ mn10300_gdbarch_tdep *tdep = gdbarch_tdep<mn10300_gdbarch_tdep> (arch);
return tdep->am33_mode;
}
int rn;
pv_t reg[MSP430_NUM_TOTAL_REGS];
CORE_ADDR after_last_frame_setup_insn = start_pc;
- msp430_gdbarch_tdep *tdep = (msp430_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ msp430_gdbarch_tdep *tdep = gdbarch_tdep<msp430_gdbarch_tdep> (gdbarch);
int code_model = tdep->code_model;
int sz;
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
LONGEST valtype_len = TYPE_LENGTH (valtype);
- msp430_gdbarch_tdep *tdep = (msp430_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ msp430_gdbarch_tdep *tdep = gdbarch_tdep<msp430_gdbarch_tdep> (gdbarch);
int code_model = tdep->code_model;
if (TYPE_LENGTH (valtype) > 8
int write_pass;
int sp_off = 0;
CORE_ADDR cfa;
- msp430_gdbarch_tdep *tdep = (msp430_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ msp430_gdbarch_tdep *tdep = gdbarch_tdep<msp430_gdbarch_tdep> (gdbarch);
int code_model = tdep->code_model;
struct type *func_type = value_type (function);
stub_name = bms.minsym->linkage_name ();
- msp430_gdbarch_tdep *tdep = (msp430_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ msp430_gdbarch_tdep *tdep = gdbarch_tdep<msp430_gdbarch_tdep> (gdbarch);
if (tdep->code_model == MSP_SMALL_CODE_MODEL
&& msp430_in_return_stub (gdbarch, pc, stub_name))
{
if (ca && gdbarch_bfd_arch_info (ca)->arch == bfd_arch_msp430)
{
msp430_gdbarch_tdep *ca_tdep
- = (msp430_gdbarch_tdep *) gdbarch_tdep (ca);
+ = gdbarch_tdep<msp430_gdbarch_tdep> (ca);
elf_flags = ca_tdep->elf_flags;
isa = ca_tdep->isa;
arches = gdbarch_list_lookup_by_info (arches->next, &info))
{
msp430_gdbarch_tdep *candidate_tdep
- = (msp430_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
+ = gdbarch_tdep<msp430_gdbarch_tdep> (arches->gdbarch);
if (candidate_tdep->elf_flags != elf_flags
|| candidate_tdep->isa != isa
static int
nds32_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int num)
{
- nds32_gdbarch_tdep *tdep = (nds32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ nds32_gdbarch_tdep *tdep = gdbarch_tdep<nds32_gdbarch_tdep> (gdbarch);
const int FSR = 38;
const int FDR = FSR + 32;
readable_regcache *regcache, int regnum,
gdb_byte *buf)
{
- nds32_gdbarch_tdep *tdep = (nds32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ nds32_gdbarch_tdep *tdep = gdbarch_tdep<nds32_gdbarch_tdep> (gdbarch);
gdb_byte reg_buf[8];
int offset, fdr_regnum;
enum register_status status;
struct regcache *regcache, int regnum,
const gdb_byte *buf)
{
- nds32_gdbarch_tdep *tdep = (nds32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ nds32_gdbarch_tdep *tdep = gdbarch_tdep<nds32_gdbarch_tdep> (gdbarch);
gdb_byte reg_buf[8];
int offset, fdr_regnum;
nds32_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc,
CORE_ADDR limit_pc, struct nds32_frame_cache *cache)
{
- nds32_gdbarch_tdep *tdep = (nds32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ nds32_gdbarch_tdep *tdep = gdbarch_tdep<nds32_gdbarch_tdep> (gdbarch);
int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
/* Current scanning status. */
int in_prologue_bb = 0;
nds32_analyze_epilogue (struct gdbarch *gdbarch, CORE_ADDR pc,
struct nds32_frame_cache *cache)
{
- nds32_gdbarch_tdep *tdep = (nds32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ nds32_gdbarch_tdep *tdep = gdbarch_tdep<nds32_gdbarch_tdep> (gdbarch);
int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
CORE_ADDR limit_pc;
uint32_t insn, insn_len;
static int
nds32_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR addr)
{
- nds32_gdbarch_tdep *tdep = (nds32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ nds32_gdbarch_tdep *tdep = gdbarch_tdep<nds32_gdbarch_tdep> (gdbarch);
int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
int insn_type = INSN_NORMAL;
int ret_found = 0;
int i;
ULONGEST regval;
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- nds32_gdbarch_tdep *tdep = (nds32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ nds32_gdbarch_tdep *tdep = gdbarch_tdep<nds32_gdbarch_tdep> (gdbarch);
struct type *func_type = value_type (function);
int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
int abi_split = nds32_abi_split (tdep->elf_abi);
struct regcache *regcache, gdb_byte *valbuf)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- nds32_gdbarch_tdep *tdep = (nds32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ nds32_gdbarch_tdep *tdep = gdbarch_tdep<nds32_gdbarch_tdep> (gdbarch);
int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
int calling_use_fpr;
int len;
struct regcache *regcache, const gdb_byte *valbuf)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- nds32_gdbarch_tdep *tdep = (nds32_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ nds32_gdbarch_tdep *tdep = gdbarch_tdep<nds32_gdbarch_tdep> (gdbarch);
int abi_use_fpr = nds32_abi_use_fpr (tdep->elf_abi);
int calling_use_fpr;
int len;
best_arch = gdbarch_list_lookup_by_info (best_arch->next, &info))
{
nds32_gdbarch_tdep *idep
- = (nds32_gdbarch_tdep *) gdbarch_tdep (best_arch->gdbarch);
+ = gdbarch_tdep<nds32_gdbarch_tdep> (best_arch->gdbarch);
if (idep->elf_abi != elf_abi)
continue;
static void
nios2_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- nios2_gdbarch_tdep *tdep = (nios2_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ nios2_gdbarch_tdep *tdep = gdbarch_tdep<nios2_gdbarch_tdep> (gdbarch);
linux_init_abi (info, gdbarch, 0);
nios2_get_next_pc (struct regcache *regcache, CORE_ADDR pc)
{
struct gdbarch *gdbarch = regcache->arch ();
- nios2_gdbarch_tdep *tdep = (nios2_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ nios2_gdbarch_tdep *tdep = gdbarch_tdep<nios2_gdbarch_tdep> (gdbarch);
unsigned long mach = gdbarch_bfd_arch_info (gdbarch)->mach;
unsigned int insn;
const struct nios2_opcode *op = nios2_fetch_insn (gdbarch, pc, &insn);
nios2_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
- nios2_gdbarch_tdep *tdep = (nios2_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ nios2_gdbarch_tdep *tdep = gdbarch_tdep<nios2_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR jb_addr = get_frame_register_unsigned (frame, NIOS2_R4_REGNUM);
gdb_byte buf[4];
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
enum type_code rv_type = valtype->code ();
unsigned int rv_size = TYPE_LENGTH (valtype);
- or1k_gdbarch_tdep *tdep = (or1k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ or1k_gdbarch_tdep *tdep = gdbarch_tdep<or1k_gdbarch_tdep> (gdbarch);
int bpw = tdep->bytes_per_word;
/* Deal with struct/union as addresses. If an array won't fit in a
{
const CGEN_INSN *insn;
CGEN_FIELDS tmp_fields;
- or1k_gdbarch_tdep *tdep = (or1k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ or1k_gdbarch_tdep *tdep = gdbarch_tdep<or1k_gdbarch_tdep> (gdbarch);
insn = cgen_lookup_insn (tdep->gdb_cgen_cpu_desc,
NULL,
int heap_offset = 0;
CORE_ADDR heap_sp = sp - 128;
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- or1k_gdbarch_tdep *tdep = (or1k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ or1k_gdbarch_tdep *tdep = gdbarch_tdep<or1k_gdbarch_tdep> (gdbarch);
int bpa = tdep->bytes_per_address;
int bpw = tdep->bytes_per_word;
struct type *func_type = value_type (function);
static void
or1k_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
{
- or1k_gdbarch_tdep *tdep = (or1k_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ or1k_gdbarch_tdep *tdep = gdbarch_tdep<or1k_gdbarch_tdep> (gdbarch);
if (NULL == tdep)
return; /* Nothing to report */
static int
getfpregs_supplies (struct gdbarch *gdbarch, int regno)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_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 ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int i, regnum;
/* The stack pointer shouldn't be zero. */
void *cb_data,
const struct regcache *regcache)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (tdep->wordsize == 4)
cb (".reg", 148, 148, &ppc32_fbsd_gregset, NULL, cb_data);
ppcfbsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
struct trad_frame_cache *cache;
CORE_ADDR addr, base, func;
gdb_byte buf[PPC_INSN_SIZE];
ppcfbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
CORE_ADDR lm_addr, CORE_ADDR offset)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
struct regcache *regcache;
int tp_offset, tp_regnum;
static void
ppcfbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
/* Generic FreeBSD support. */
fbsd_init_abi (info, gdbarch);
ppc_register_u_addr (struct gdbarch *gdbarch, int regno)
{
int u_addr = -1;
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_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 ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_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 ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_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 ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int i;
if (have_ptrace_getsetregs)
fetch_fp_regs (struct regcache *regcache, int tid)
{
struct gdbarch *gdbarch = regcache->arch ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int i;
if (have_ptrace_getsetfpregs)
fetch_ppc_registers (struct regcache *regcache, int tid)
{
struct gdbarch *gdbarch = regcache->arch ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_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 ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_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 ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_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 ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_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 ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int i;
if (have_ptrace_getsetfpregs)
store_ppc_registers (const struct regcache *regcache, int tid)
{
struct gdbarch *gdbarch = regcache->arch ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
store_gp_regs (regcache, tid, -1);
if (tdep->ppc_fp0_regnum >= 0)
{
unsigned int insnbuf[POWERPC32_PLT_CHECK_LEN];
struct gdbarch *gdbarch = get_frame_arch (frame);
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR target = 0;
int scan_limit, i;
const struct regset *
ppc_linux_cgprregset (struct gdbarch *gdbarch)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (tdep->wordsize == 4)
{
int regnum, void *buf, size_t len)
{
struct gdbarch *gdbarch = regcache->arch ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
const struct regset *cgprregset = ppc_linux_cgprregset (gdbarch);
void *cb_data,
const struct regcache *regcache)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int have_altivec = tdep->ppc_vr0_regnum != -1;
int have_vsx = tdep->ppc_vsr0_upper_regnum != -1;
int have_ppr = tdep->ppc_ppr_regnum != -1;
CORE_ADDR fpregs;
int i;
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
base = get_frame_register_unsigned (this_frame,
thread_info *thread)
{
struct regcache *regcache = get_thread_regcache (thread);
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
/* Make sure we're in a 32- or 64-bit machine */
ppc_linux_syscall_record (struct regcache *regcache)
{
struct gdbarch *gdbarch = regcache->arch ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
ULONGEST scnum;
enum gdb_syscall syscall_gdb;
int ret;
const int SIGNAL_FRAMESIZE = 128;
const int sizeof_rt_sigframe = 1440 * 2 + 8 * 2 + 4 * 6 + 8 + 8 + 128 + 512;
ULONGEST sp;
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int i;
for (i = 3; i <= 12; i++)
ppc_linux_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
struct tdesc_arch_data *tdesc_data = info.tdesc_data;
static const char *const stap_integer_prefixes[] = { "i", NULL };
static const char *const stap_register_indirection_prefixes[] = { "(",
static int
getregs_supplies (struct gdbarch *gdbarch, int regnum)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_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)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_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 ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int i;
/* The stack pointer shouldn't be zero. */
CORE_ADDR func)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
CORE_ADDR addr, base;
int i;
static int
getfpregs_supplies (struct gdbarch *gdbarch, int regnum)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_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 ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
struct switchframe sf;
struct callframe cf;
int i, regnum;
ppcobsd_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct trad_frame_cache *cache;
CORE_ADDR addr, base, func;
function_call_return_method return_method,
CORE_ADDR struct_addr)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function));
ULONGEST saved_sp;
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
gdb_assert (valtype->code () == TYPE_CODE_DECFLOAT);
gdb_byte *readbuf, const gdb_byte *writebuf,
int broken_gcc)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int opencl_abi = func_type? ppc_sysv_use_opencl_abi (func_type) : 0;
const bfd_byte *val, int len, int align,
struct ppc64_sysv_argpos *argpos)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int offset = 0;
/* Enforce alignment of stack location, if requested. */
ppc64_sysv_abi_push_integer (struct gdbarch *gdbarch, ULONGEST val,
struct ppc64_sysv_argpos *argpos)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
gdb_byte buf[PPC_MAX_REGISTER_SIZE];
struct type *type, const bfd_byte *val,
struct ppc64_sysv_argpos *argpos)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (tdep->soft_float)
return;
ppc64_sysv_abi_push_vreg (struct gdbarch *gdbarch, const bfd_byte *val,
struct ppc64_sysv_argpos *argpos)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (argpos->regcache && argpos->vreg <= 13)
argpos->regcache->cooked_write (tdep->ppc_vr0_regnum + argpos->vreg, val);
struct type *type, const bfd_byte *val,
struct ppc64_sysv_argpos *argpos)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (type->code () == TYPE_CODE_FLT
&& TYPE_LENGTH (type) == 16
CORE_ADDR struct_addr)
{
CORE_ADDR func_addr = find_function_addr (function, NULL);
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function));
ULONGEST back_chain;
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf, int index)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
/* Integers live in GPRs starting at r3. */
if ((valtype->code () == TYPE_CODE_INT
struct type *valtype, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
struct type *func_type = function ? value_type (function) : NULL;
int opencl_abi = func_type? ppc_sysv_use_opencl_abi (func_type) : 0;
struct type *eltype;
{
struct gdbarch *gdbarch = get_frame_arch (frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
CORE_ADDR tocp;
if (execution_direction == EXEC_REVERSE)
static void
riscv_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
linux_init_abi (info, gdbarch, 0);
int
riscv_isa_xlen (struct gdbarch *gdbarch)
{
- riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
return tdep->isa_features.xlen;
}
int
riscv_abi_xlen (struct gdbarch *gdbarch)
{
- riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
return tdep->abi_features.xlen;
}
int
riscv_isa_flen (struct gdbarch *gdbarch)
{
- riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
return tdep->isa_features.flen;
}
int
riscv_abi_flen (struct gdbarch *gdbarch)
{
- riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
return tdep->abi_features.flen;
}
bool
riscv_abi_embedded (struct gdbarch *gdbarch)
{
- riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
return tdep->abi_features.embedded;
}
static bool
riscv_has_fp_abi (struct gdbarch *gdbarch)
{
- riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
return tdep->abi_features.flen > 0;
}
will show up in 'info register all'. Unless, we identify the
duplicate copies of these registers (in riscv_tdesc_unknown_reg) and
then hide the registers here by giving them no name. */
- riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
if (tdep->duplicate_fflags_regnum == regnum)
return NULL;
if (tdep->duplicate_frm_regnum == regnum)
static struct type *
riscv_fpreg_d_type (struct gdbarch *gdbarch)
{
- riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
if (tdep->riscv_fpreg_d_type == nullptr)
{
static bool
riscv_is_unknown_csr (struct gdbarch *gdbarch, int regnum)
{
- riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
return (regnum >= tdep->unknown_csrs_first_regnum
&& regnum < (tdep->unknown_csrs_first_regnum
+ tdep->unknown_csrs_count));
record their register numbers here. */
if (strcmp (tdesc_feature_name (feature), riscv_freg_feature.name ()) == 0)
{
- riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
int *regnum_ptr = nullptr;
if (strcmp (reg_name, "fflags") == 0)
about register groups in riscv_register_reggroup_p. */
if (strcmp (tdesc_feature_name (feature), riscv_csr_feature.name ()) == 0)
{
- riscv_gdbarch_tdep *tdep = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ riscv_gdbarch_tdep *tdep = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
if (tdep->unknown_csrs_first_regnum == -1)
tdep->unknown_csrs_first_regnum = possible_regnum;
gdb_assert (tdep->unknown_csrs_first_regnum
we are looking for. If it doesn't then we can't reuse this
gdbarch. */
riscv_gdbarch_tdep *other_tdep
- = (riscv_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
+ = gdbarch_tdep<riscv_gdbarch_tdep> (arches->gdbarch);
if (other_tdep->isa_features != features
|| other_tdep->abi_features != abi_features)
{
struct gdbarch *gdbarch = regcache->arch ();
const riscv_gdbarch_tdep *tdep
- = (riscv_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ = gdbarch_tdep<riscv_gdbarch_tdep> (gdbarch);
struct riscv_insn insn;
CORE_ADDR next_pc;
static struct type *
rl78_psw_type (struct gdbarch *gdbarch)
{
- rl78_gdbarch_tdep *tdep = (rl78_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ rl78_gdbarch_tdep *tdep = gdbarch_tdep<rl78_gdbarch_tdep> (gdbarch);
if (tdep->rl78_psw_type == NULL)
{
static struct type *
rl78_register_type (struct gdbarch *gdbarch, int reg_nr)
{
- rl78_gdbarch_tdep *tdep = (rl78_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ rl78_gdbarch_tdep *tdep = gdbarch_tdep<rl78_gdbarch_tdep> (gdbarch);
if (reg_nr == RL78_PC_REGNUM)
return tdep->rl78_code_pointer;
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
ULONGEST valtype_len = TYPE_LENGTH (valtype);
- rl78_gdbarch_tdep *tdep = (rl78_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ rl78_gdbarch_tdep *tdep = gdbarch_tdep<rl78_gdbarch_tdep> (gdbarch);
int is_g10 = tdep->elf_flags & E_FLAG_RL78_G10;
if (valtype_len > 8)
arches = gdbarch_list_lookup_by_info (arches->next, &info))
{
rl78_gdbarch_tdep *tdep
- = (rl78_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
+ = gdbarch_tdep<rl78_gdbarch_tdep> (arches->gdbarch);
if (tdep->elf_flags != elf_flags)
continue;
static int
regmap (struct gdbarch *gdbarch, int regno, int *isfloat)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
*isfloat = 0;
if (tdep->ppc_gp0_regnum <= regno
else
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
/* Read 32 general purpose registers. */
for (regno = tdep->ppc_gp0_regnum;
else
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
/* Write general purpose registers first. */
for (regno = tdep->ppc_gp0_regnum;
LONGEST backchain;
CORE_ADDR base, base_orig, func;
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct trad_frame_cache *this_trad_cache;
void *cb_data,
const struct regcache *regcache)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (tdep->wordsize == 4)
cb (".reg", 592, 592, &rs6000_aix32_regset, NULL, cb_data);
else
function_call_return_method return_method,
CORE_ADDR struct_addr)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int ii;
int len = 0;
struct type *valtype, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
/* The calling convention this function implements assumes the
CORE_ADDR addr,
struct target_ops *targ)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct obj_section *s;
CORE_ADDR pc, CORE_ADDR safety)
{
struct gdbarch *gdbarch = regcache->arch ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR dest;
int immediate;
rs6000_aix_extract_ld_info (struct gdbarch *gdbarch,
const gdb_byte *ldi_buf)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct type *ptr_type = builtin_type (gdbarch)->builtin_data_ptr;
const struct ld_info_desc desc
static void
rs6000_aix_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
/* RS6000/AIX does not support PT_STEP. Has to be simulated. */
set_gdbarch_software_single_step (gdbarch, rs6000_software_single_step);
function_call_return_method return_method,
CORE_ADDR struct_addr)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int ii;
int len = 0;
struct type *valtype, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
/* The calling convention this function implements assumes the
int
vsx_register_p (struct gdbarch *gdbarch, int regno)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (tdep->ppc_vsr0_regnum < 0)
return 0;
else
int
altivec_register_p (struct gdbarch *gdbarch, int regno)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (tdep->ppc_vr0_regnum < 0 || tdep->ppc_vrsave_regnum < 0)
return 0;
else
int
spe_register_p (struct gdbarch *gdbarch, int regno)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
/* Is it a reference to EV0 -- EV31, and do we have those? */
if (IS_SPE_PSEUDOREG (tdep, regno))
int
ppc_floating_point_unit_p (struct gdbarch *gdbarch)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
return (tdep->ppc_fp0_regnum >= 0
&& tdep->ppc_fpscr_regnum >= 0);
int
ppc_altivec_support_p (struct gdbarch *gdbarch)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
return (tdep->ppc_vr0_regnum >= 0
&& tdep->ppc_vrsave_regnum >= 0);
static void
init_sim_regno_table (struct gdbarch *arch)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (arch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (arch);
int total_regs = gdbarch_num_regs (arch);
int *sim_regno = GDBARCH_OBSTACK_CALLOC (arch, total_regs, int);
int i;
static int
rs6000_register_sim_regno (struct gdbarch *gdbarch, int reg)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int sim_regno;
if (tdep->sim_regno == NULL)
int regnum, const void *gregs, size_t len)
{
struct gdbarch *gdbarch = regcache->arch ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
const struct ppc_reg_offsets *offsets
= (const struct ppc_reg_offsets *) regset->regmap;
size_t offset;
if (!ppc_floating_point_unit_p (gdbarch))
return;
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
offsets = (const struct ppc_reg_offsets *) regset->regmap;
if (regnum == -1)
{
int regnum, void *gregs, size_t len)
{
struct gdbarch *gdbarch = regcache->arch ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
const struct ppc_reg_offsets *offsets
= (const struct ppc_reg_offsets *) regset->regmap;
size_t offset;
if (!ppc_floating_point_unit_p (gdbarch))
return;
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
offsets = (const struct ppc_reg_offsets *) regset->regmap;
if (regnum == -1)
{
rs6000_in_function_epilogue_frame_p (struct frame_info *curfrm,
struct gdbarch *gdbarch, CORE_ADDR pc)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
bfd_byte insn_buf[PPC_INSN_SIZE];
CORE_ADDR scan_pc, func_start, func_end, epilogue_start, epilogue_end;
if (insn & 0x1)
{
/* Link register needs to be set to the next instruction's PC. */
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
regcache_cooked_write_unsigned (regs,
tdep->ppc_lr_regnum,
from + PPC_INSN_SIZE);
int num_skip_non_prologue_insns = 0;
int r0_contains_arg = 0;
const struct bfd_arch_info *arch_info = gdbarch_bfd_arch_info (gdbarch);
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
memset (fdata, 0, sizeof (struct rs6000_framedata));
rs6000_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
unsigned int ii, op;
int rel;
static struct type *
rs6000_builtin_type_vec64 (struct gdbarch *gdbarch)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (!tdep->ppc_builtin_type_vec64)
{
static struct type *
rs6000_builtin_type_vec128 (struct gdbarch *gdbarch)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (!tdep->ppc_builtin_type_vec128)
{
static const char *
rs6000_register_name (struct gdbarch *gdbarch, int regno)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
/* The upper half "registers" have names in the XML description,
but we present only the low GPRs and the full 64-bit registers
static struct type *
rs6000_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
/* These are the e500 pseudo-registers. */
if (IS_SPE_PSEUDOREG (tdep, regnum))
rs6000_pseudo_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
const struct reggroup *group)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (IS_V_ALIAS_PSEUDOREG (tdep, regnum))
return 0;
rs6000_convert_register_p (struct gdbarch *gdbarch, int regnum,
struct type *type)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
return (tdep->ppc_fp0_regnum >= 0
&& regnum >= tdep->ppc_fp0_regnum
struct regcache *regcache, int ev_reg, void *buffer)
{
struct gdbarch *arch = regcache->arch ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (arch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (arch);
int reg_index;
gdb_byte *byte_buffer = (gdb_byte *) buffer;
enum register_status status;
int ev_reg, gdb_byte *buffer)
{
struct gdbarch *arch = regcache->arch ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int reg_index;
enum register_status status;
dfp_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache,
int reg_nr, gdb_byte *buffer)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int reg_index, fp0;
enum register_status status;
dfp_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
int reg_nr, const gdb_byte *buffer)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int reg_index, fp0;
if (IS_DFP_PSEUDOREG (tdep, reg_nr))
readable_regcache *regcache, int reg_nr,
gdb_byte *buffer)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
gdb_assert (IS_V_ALIAS_PSEUDOREG (tdep, reg_nr));
return regcache->raw_read (tdep->ppc_vr0_regnum
struct regcache *regcache,
int reg_nr, const gdb_byte *buffer)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
gdb_assert (IS_V_ALIAS_PSEUDOREG (tdep, reg_nr));
regcache->raw_write (tdep->ppc_vr0_regnum
vsx_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache,
int reg_nr, gdb_byte *buffer)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int reg_index, vr0, fp0, vsr0_upper;
enum register_status status;
vsx_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
int reg_nr, const gdb_byte *buffer)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int reg_index, vr0, fp0, vsr0_upper;
if (IS_VSX_PSEUDOREG (tdep, reg_nr))
efp_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache,
int reg_nr, gdb_byte *buffer)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int reg_index, vr0;
if (IS_EFP_PSEUDOREG (tdep, reg_nr))
efp_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
int reg_nr, const gdb_byte *buffer)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int reg_index, vr0;
int offset = gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG ? 0 : 8;
int reg_nr, gdb_byte *buffer)
{
struct gdbarch *regcache_arch = regcache->arch ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
gdb_assert (regcache_arch == gdbarch);
int reg_nr, const gdb_byte *buffer)
{
struct gdbarch *regcache_arch = regcache->arch ();
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
gdb_assert (regcache_arch == gdbarch);
dfp_ax_pseudo_register_collect (struct gdbarch *gdbarch,
struct agent_expr *ax, int reg_nr)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int reg_index, fp0;
if (IS_DFP_PSEUDOREG (tdep, reg_nr))
v_alias_pseudo_register_collect (struct gdbarch *gdbarch,
struct agent_expr *ax, int reg_nr)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
gdb_assert (IS_V_ALIAS_PSEUDOREG (tdep, reg_nr));
ax_reg_mask (ax, tdep->ppc_vr0_regnum
vsx_ax_pseudo_register_collect (struct gdbarch *gdbarch,
struct agent_expr *ax, int reg_nr)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int reg_index, vr0, fp0, vsr0_upper;
if (IS_VSX_PSEUDOREG (tdep, reg_nr))
efp_ax_pseudo_register_collect (struct gdbarch *gdbarch,
struct agent_expr *ax, int reg_nr)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int reg_index, vr0;
if (IS_EFP_PSEUDOREG (tdep, reg_nr))
rs6000_ax_pseudo_register_collect (struct gdbarch *gdbarch,
struct agent_expr *ax, int reg_nr)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (IS_SPE_PSEUDOREG (tdep, reg_nr))
{
int reg_index = reg_nr - tdep->ppc_ev0_regnum;
struct agent_expr *ax, struct axs_value *value,
CORE_ADDR scope)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
value->type = register_type (gdbarch, tdep->ppc_lr_regnum);
value->kind = axs_lvalue_register;
value->u.reg = tdep->ppc_lr_regnum;
static int
rs6000_stab_reg_to_regnum (struct gdbarch *gdbarch, int num)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (0 <= num && num <= 31)
return tdep->ppc_gp0_regnum + num;
static int
rs6000_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int num)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (0 <= num && num <= 31)
return tdep->ppc_gp0_regnum + num;
{
struct rs6000_frame_cache *cache;
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct rs6000_framedata fdata;
int wordsize = tdep->wordsize;
{
struct rs6000_frame_cache *cache;
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (*this_cache)
return (struct rs6000_frame_cache *) *this_cache;
struct dwarf2_frame_state_reg *reg,
struct frame_info *this_frame)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
/* PPC32 and PPC64 ABI's are the same regarding volatile and
non-volatile registers. We will use the same code for both. */
ppc_process_record_op4 (struct gdbarch *gdbarch, struct regcache *regcache,
CORE_ADDR addr, uint32_t insn)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int ext = PPC_FIELD (insn, 21, 11);
int vra = PPC_FIELD (insn, 11, 5);
ppc_process_record_op6 (struct gdbarch *gdbarch, struct regcache *regcache,
CORE_ADDR addr, uint32_t insn)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int subtype = PPC_FIELD (insn, 28, 4);
CORE_ADDR ea = 0;
ppc_process_record_op19 (struct gdbarch *gdbarch, struct regcache *regcache,
CORE_ADDR addr, uint32_t insn)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int ext = PPC_EXTOP (insn);
switch (ext & 0x01f)
{
int RA_opcode = PPC_RA(insn);
int as = PPC_FIELD (insn, 6, 3);
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
switch (RA_opcode)
{
ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache,
CORE_ADDR addr, uint32_t insn)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int ext = PPC_EXTOP (insn);
int tmp, nr, nb = 0, i;
CORE_ADDR at_dcsz, ea = 0;
ppc_process_record_op59 (struct gdbarch *gdbarch, struct regcache *regcache,
CORE_ADDR addr, uint32_t insn)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int ext = PPC_EXTOP (insn);
int at = PPC_FIELD (insn, 6, 3);
struct regcache *regcache,
CORE_ADDR addr, uint32_t insn)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int RA_opcode = PPC_RA(insn);
switch (RA_opcode)
ppc_process_record_op60 (struct gdbarch *gdbarch, struct regcache *regcache,
CORE_ADDR addr, uint32_t insn)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int ext = PPC_EXTOP (insn);
switch (ext >> 2)
ppc_process_record_op61 (struct gdbarch *gdbarch, struct regcache *regcache,
CORE_ADDR addr, uint32_t insn)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
ULONGEST ea = 0;
int size;
ppc_process_record_op63 (struct gdbarch *gdbarch, struct regcache *regcache,
CORE_ADDR addr, uint32_t insn)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int ext = PPC_EXTOP (insn);
int tmp;
struct regcache *regcache,
uint32_t insn_prefix, uint32_t insn_suffix)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int type = PPC_FIELD (insn_prefix, 6, 2);
int ST1 = PPC_FIELD (insn_prefix, 8, 1);
int type = PPC_FIELD (insn_prefix, 6, 2);
int ST4 = PPC_FIELD (insn_prefix, 8, 4);
int at = PPC_FIELD (insn_suffix, 6, 3);
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (type == 3)
{
CORE_ADDR addr, uint32_t insn_prefix,
uint32_t insn_suffix)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
ULONGEST iaddr = 0;
int size;
int R = PPC_BIT (insn_prefix, 11);
int type = PPC_FIELD (insn_prefix, 6, 2);
int ST1 = PPC_FIELD (insn_prefix, 8, 1);
int ST4 = PPC_FIELD (insn_prefix, 8, 4);
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (type == 1)
{
{
int type = PPC_FIELD (insn_prefix, 6, 2);
int ST4 = PPC_FIELD (insn_prefix, 8, 4);
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (type == 1)
{
int type = PPC_FIELD (insn_prefix, 6, 2);
int ST1 = PPC_FIELD (insn_prefix, 8, 1);
int ST4 = PPC_FIELD (insn_prefix, 8, 4);
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (type == 1)
{
uint32_t insn_prefix,
uint32_t insn_suffix)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
ULONGEST ea = 0;
int size;
int R = PPC_BIT (insn_prefix, 11);
uint32_t insn_prefix,
uint32_t insn_suffix)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
ULONGEST ea = 0;
int size;
int R = PPC_BIT (insn_prefix, 11);
{
int type = PPC_FIELD (insn_prefix, 6, 2);
int ST1 = PPC_FIELD (insn_prefix, 8, 1);
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
int op6;
/* D-form has uses a 5-bit opcode in the instruction suffix */
ppc_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
CORE_ADDR addr)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
uint32_t insn, insn_suffix;
int op6, tmp, i;
meaningful, because 64-bit CPUs can run in 32-bit mode. So, perform
separate word size check. */
ppc_gdbarch_tdep *tdep
- = (ppc_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
+ = gdbarch_tdep<ppc_gdbarch_tdep> (arches->gdbarch);
if (tdep && tdep->elf_abi != elf_abi)
continue;
if (tdep && tdep->soft_float != soft_float)
static void
rs6000_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
{
- ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
if (tdep == NULL)
return;
arches = gdbarch_list_lookup_by_info (arches->next, &info))
{
rx_gdbarch_tdep *tdep
- = (rx_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
+ = gdbarch_tdep<rx_gdbarch_tdep> (arches->gdbarch);
if (tdep->elf_flags != elf_flags)
continue;
s390_write_pc (struct regcache *regcache, CORE_ADDR pc)
{
struct gdbarch *gdbarch = regcache->arch ();
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
regcache_cooked_write_unsigned (regcache, tdep->pc_regnum, pc);
void *cb_data,
const struct regcache *regcache)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
const int gregset_size = (tdep->abi == ABI_LINUX_S390 ?
s390_sizeof_gregset : s390x_sizeof_gregset);
void **this_prologue_cache)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
int word_size = gdbarch_ptr_bit (gdbarch) / 8;
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct s390_sigtramp_unwind_cache *info;
thread_info *thread)
{
struct regcache *regs = get_thread_regcache (thread);
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
ULONGEST pc;
ULONGEST svc_number = -1;
s390_all_but_pc_registers_record (struct regcache *regcache)
{
struct gdbarch *gdbarch = regcache->arch ();
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
int i;
for (i = 0; i < 16; i++)
s390_linux_syscall_record (struct regcache *regcache, LONGEST syscall_native)
{
struct gdbarch *gdbarch = regcache->arch ();
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
int ret;
enum gdb_syscall syscall_gdb;
s390_linux_record_signal (struct gdbarch *gdbarch, struct regcache *regcache,
enum gdb_signal signal)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
/* There are two kinds of signal frames on s390. rt_sigframe is always
the larger one, so don't even bother with sigframe. */
const int sizeof_rt_sigframe = (tdep->abi == ABI_LINUX_ZSERIES ?
static void
s390_linux_init_abi_any (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
tdep->s390_syscall_record = s390_linux_syscall_record;
static void
s390_linux_init_abi_31 (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
tdep->abi = ABI_LINUX_S390;
static void
s390_linux_init_abi_64 (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
tdep->abi = ABI_LINUX_ZSERIES;
static int
s390_register_call_saved (struct gdbarch *gdbarch, int regnum)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
switch (tdep->abi)
{
struct regcache *regcache,
CORE_ADDR addr)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
int sz = register_size (gdbarch, S390_PSWA_REGNUM);
gdb_byte *reg = (gdb_byte *) alloca (sz);
ULONGEST pswm, pswa;
static int
s390_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
int gdb_reg = -1;
/* In a 32-on-64 debug scenario, debug info refers to the full
s390_value_from_register (struct gdbarch *gdbarch, struct type *type,
int regnum, struct frame_id frame_id)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
struct value *value = default_value_from_register (gdbarch, type,
regnum, frame_id);
check_typedef (type);
static const char *
s390_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
if (regnum == tdep->pc_regnum)
return "pc";
static struct type *
s390_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
if (regnum == tdep->pc_regnum)
return builtin_type (gdbarch)->builtin_func_ptr;
s390_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache,
int regnum, gdb_byte *buf)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int regsize = register_size (gdbarch, regnum);
ULONGEST val;
s390_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
int regnum, const gdb_byte *buf)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int regsize = register_size (gdbarch, regnum);
ULONGEST val, psw;
s390_pseudo_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
const struct reggroup *group)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
/* We usually save/restore the whole PSW, which includes PC and CC.
However, some older gdbservers may not support saving/restoring
s390_ax_pseudo_register_collect (struct gdbarch *gdbarch,
struct agent_expr *ax, int regnum)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
if (regnum == tdep->pc_regnum)
{
ax_reg_mask (ax, S390_PSWA_REGNUM);
s390_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
struct agent_expr *ax, int regnum)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
if (regnum == tdep->pc_regnum)
{
ax_reg (ax, S390_PSWA_REGNUM);
function_call_return_method return_method,
CORE_ADDR struct_addr)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
int word_size = gdbarch_ptr_bit (gdbarch) / 8;
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int i;
break;
case TYPE_CODE_ARRAY:
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
rvc = (tdep->vector_abi == S390_VECTOR_ABI_128
&& TYPE_LENGTH (type) <= 16 && type->is_vector ())
? RETURN_VALUE_REGISTER_CONVENTION
static CORE_ADDR
s390_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
ULONGEST pc;
pc = frame_unwind_register_unsigned (next_frame, tdep->pc_regnum);
return gdbarch_addr_bits_remove (gdbarch, pc);
s390_unwind_pseudo_register (struct frame_info *this_frame, int regnum)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
struct type *type = register_type (gdbarch, regnum);
/* Unwind PC via PSW address. */
s390_record_address_mask (struct gdbarch *gdbarch, struct regcache *regcache,
CORE_ADDR val)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
ULONGEST pswm, pswa;
int am;
if (tdep->abi == ABI_LINUX_S390)
uint8_t vx, uint8_t el, uint8_t es, uint16_t bd,
int8_t dh, CORE_ADDR *res)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
ULONGEST x;
gdb_byte buf[16];
static int
s390_record_gpr_g (struct gdbarch *gdbarch, struct regcache *regcache, int i)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
if (record_full_arch_list_add_reg (regcache, S390_R0_REGNUM + i))
return -1;
if (tdep->abi == ABI_LINUX_S390)
static int
s390_record_gpr_h (struct gdbarch *gdbarch, struct regcache *regcache, int i)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
if (tdep->abi == ABI_LINUX_S390)
{
if (record_full_arch_list_add_reg (regcache, S390_R0_UPPER_REGNUM + i))
s390_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
CORE_ADDR addr)
{
- s390_gdbarch_tdep *tdep = (s390_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ s390_gdbarch_tdep *tdep = gdbarch_tdep<s390_gdbarch_tdep> (gdbarch);
uint16_t insn[3] = {0};
/* Instruction as bytes. */
uint8_t ibyte[6];
arches = gdbarch_list_lookup_by_info (arches->next, &info))
{
s390_gdbarch_tdep *tmp
- = (s390_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
+ = gdbarch_tdep<s390_gdbarch_tdep> (arches->gdbarch);
if (!tmp)
continue;
set_gdbarch_fetch_tls_load_module_address (gdbarch,
svr4_fetch_objfile_link_map);
- sh_gdbarch_tdep *tdep = (sh_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sh_gdbarch_tdep *tdep = gdbarch_tdep<sh_gdbarch_tdep> (gdbarch);
/* Remember regset characteristics. The sizes should match
elf_gregset_t and elf_fpregset_t from Linux. */
shnbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
- sh_gdbarch_tdep *tdep = (sh_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sh_gdbarch_tdep *tdep = gdbarch_tdep<sh_gdbarch_tdep> (gdbarch);
nbsd_init_abi (info, gdbarch);
tdep->core_gregmap = (struct sh_corefile_regmap *)regmap;
static struct type *
sh_littlebyte_bigword_type (struct gdbarch *gdbarch)
{
- sh_gdbarch_tdep *tdep = (sh_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sh_gdbarch_tdep *tdep = gdbarch_tdep<sh_gdbarch_tdep> (gdbarch);
if (tdep->sh_littlebyte_bigword_type == NULL)
tdep->sh_littlebyte_bigword_type
int regnum, const void *regs, size_t len)
{
struct gdbarch *gdbarch = regcache->arch ();
- sh_gdbarch_tdep *tdep = (sh_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sh_gdbarch_tdep *tdep = gdbarch_tdep<sh_gdbarch_tdep> (gdbarch);
const struct sh_corefile_regmap *regmap = (regset == &sh_corefile_gregset
? tdep->core_gregmap
: tdep->core_fpregmap);
int regnum, void *regs, size_t len)
{
struct gdbarch *gdbarch = regcache->arch ();
- sh_gdbarch_tdep *tdep = (sh_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sh_gdbarch_tdep *tdep = gdbarch_tdep<sh_gdbarch_tdep> (gdbarch);
const struct sh_corefile_regmap *regmap = (regset == &sh_corefile_gregset
? tdep->core_gregmap
: tdep->core_fpregmap);
void *cb_data,
const struct regcache *regcache)
{
- sh_gdbarch_tdep *tdep = (sh_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sh_gdbarch_tdep *tdep = gdbarch_tdep<sh_gdbarch_tdep> (gdbarch);
if (tdep->core_gregmap != NULL)
cb (".reg", tdep->sizeof_gregset, tdep->sizeof_gregset,
sparc_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
{
gdbarch *arch = regcache->arch ();
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (arch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (arch);
ULONGEST psr;
regcache_cooked_write_unsigned (regcache, tdep->pc_regnum, pc);
static void
sparc32_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
linux_init_abi (info, gdbarch, 0);
void
sparc32nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
nbsd_init_abi (info, gdbarch);
static void
sparc32_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
tdep->gregset = &sparc32_sol2_gregset;
tdep->sizeof_gregset = 152;
static struct type *
sparc_psr_type (struct gdbarch *gdbarch)
{
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
if (!tdep->sparc_psr_type)
{
static struct type *
sparc_fsr_type (struct gdbarch *gdbarch)
{
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
if (!tdep->sparc_fsr_type)
{
sparc_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc,
CORE_ADDR current_pc, struct sparc_frame_cache *cache)
{
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
unsigned long insn;
int offset = 0;
int dest = -1;
/* Trap instruction (TRAP). */
gdbarch *arch = regcache->arch ();
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (arch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (arch);
return tdep->step_trap (frame, insn);
}
sparc_software_single_step (struct regcache *regcache)
{
struct gdbarch *arch = regcache->arch ();
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (arch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (arch);
CORE_ADDR npc, nnpc;
CORE_ADDR pc, orig_npc;
sparc_write_pc (struct regcache *regcache, CORE_ADDR pc)
{
gdbarch *arch = regcache->arch ();
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (arch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (arch);
regcache_cooked_write_unsigned (regcache, tdep->pc_regnum, pc);
regcache_cooked_write_unsigned (regcache, tdep->npc_regnum, pc + 4);
void *cb_data,
const struct regcache *regcache)
{
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
cb (".reg", tdep->sizeof_gregset, tdep->sizeof_gregset, tdep->gregset, NULL,
cb_data);
static void
sparc64fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
/* Generic FreeBSD support. */
fbsd_init_abi (info, gdbarch);
sparc64_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
{
gdbarch *arch = regcache->arch ();
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (arch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (arch);
ULONGEST state;
regcache_cooked_write_unsigned (regcache, tdep->pc_regnum, pc);
static void
sparc64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
linux_init_abi (info, gdbarch, 0);
static void
sparc64nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
nbsd_init_abi (info, gdbarch);
static void
sparc64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
tdep->gregset = &sparc64obsd_gregset;
tdep->sizeof_gregset = 288;
static void
sparc64_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
tdep->gregset = &sparc64_sol2_gregset;
tdep->sizeof_gregset = 304;
static struct type *
sparc64_pstate_type (struct gdbarch *gdbarch)
{
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
if (!tdep->sparc64_pstate_type)
{
static struct type *
sparc64_ccr_type (struct gdbarch *gdbarch)
{
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
if (tdep->sparc64_ccr_type == NULL)
{
static struct type *
sparc64_fsr_type (struct gdbarch *gdbarch)
{
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
if (!tdep->sparc64_fsr_type)
{
static struct type *
sparc64_fprs_type (struct gdbarch *gdbarch)
{
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
if (!tdep->sparc64_fprs_type)
{
void
sparc64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- sparc_gdbarch_tdep *tdep = (sparc_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ sparc_gdbarch_tdep *tdep = gdbarch_tdep<sparc_gdbarch_tdep> (gdbarch);
tdep->pc_regnum = SPARC64_PC_REGNUM;
tdep->npc_regnum = SPARC64_NPC_REGNUM;
static unsigned int
tic6x_register_sigcontext_offset (unsigned int regnum, struct gdbarch *gdbarch)
{
- tic6x_gdbarch_tdep *tdep = (tic6x_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ tic6x_gdbarch_tdep *tdep = gdbarch_tdep<tic6x_gdbarch_tdep> (gdbarch);
if (regnum == TIC6X_A4_REGNUM || regnum == TIC6X_A4_REGNUM + 2
|| regnum == TIC6X_A4_REGNUM + 4)
+ TIC6X_SIGINFO_SIZE
+ 4 + 4 /* uc_flags and *uc_link in struct ucontext. */
+ TIC6X_STACK_T_SIZE);
- tic6x_gdbarch_tdep *tdep = (tic6x_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ tic6x_gdbarch_tdep *tdep = gdbarch_tdep<tic6x_gdbarch_tdep> (gdbarch);
unsigned int reg_offset;
unsigned int i;
static void
tic6x_uclinux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- tic6x_gdbarch_tdep *tdep = (tic6x_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ tic6x_gdbarch_tdep *tdep = gdbarch_tdep<tic6x_gdbarch_tdep> (gdbarch);
linux_init_abi (info, gdbarch, 0);
static const gdb_byte *
tic6x_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
{
- tic6x_gdbarch_tdep *tdep = (tic6x_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ tic6x_gdbarch_tdep *tdep = gdbarch_tdep<tic6x_gdbarch_tdep> (gdbarch);
*size = kind;
if (inst == TIC6X_INST_SWE)
{
tic6x_gdbarch_tdep *tdep
- = (tic6x_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ = gdbarch_tdep<tic6x_gdbarch_tdep> (gdbarch);
if (tdep->syscall_next_pc != NULL)
return tdep->syscall_next_pc (get_current_frame ());
arches = gdbarch_list_lookup_by_info (arches->next, &info))
{
tic6x_gdbarch_tdep *tdep
- = (tic6x_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
+ = gdbarch_tdep<tic6x_gdbarch_tdep> (arches->gdbarch);
if (has_gp != tdep->has_gp)
continue;
{
int i;
struct type *fld_type, *tgt_type;
- v850_gdbarch_tdep *tdep = (v850_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ v850_gdbarch_tdep *tdep = gdbarch_tdep<v850_gdbarch_tdep> (gdbarch);
if (tdep->abi == V850_ABI_RH850)
{
int argnum;
int arg_space = 0;
int stack_offset;
- v850_gdbarch_tdep *tdep = (v850_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ v850_gdbarch_tdep *tdep = gdbarch_tdep<v850_gdbarch_tdep> (gdbarch);
if (tdep->abi == V850_ABI_RH850)
stack_offset = 0;
arches = gdbarch_list_lookup_by_info (arches->next, &info))
{
v850_gdbarch_tdep *tdep
- = (v850_gdbarch_tdep *) gdbarch_tdep (arches->gdbarch);
+ = gdbarch_tdep<v850_gdbarch_tdep> (arches->gdbarch);
if (tdep->e_flags != e_flags || tdep->e_machine != e_machine)
continue;
char *context_offset = context_ptr + windows_process.mappings[r];
struct gdbarch *gdbarch = regcache->arch ();
- i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_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);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1)
regcache->raw_collect (gdbarch_pc_regnum (gdbarch), ®s->pc);
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);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1)
regcache->raw_supply (gdbarch_pc_regnum (gdbarch), ®s->pc);
static void
xtensa_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
if (tdep->num_nopriv_regs < tdep->num_regs)
{
static int
windowing_enabled (struct gdbarch *gdbarch, unsigned int ps)
{
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
/* If we know CALL0 ABI is set explicitly, say it is Call0. */
if (tdep->call_abi == CallAbiCall0Only)
static int
arreg_number (struct gdbarch *gdbarch, int a_regnum, ULONGEST wb)
{
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
int arreg;
arreg = a_regnum - tdep->a0_base;
static int
areg_number (struct gdbarch *gdbarch, int ar_regnum, unsigned int wb)
{
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
int areg;
areg = ar_regnum - tdep->ar_base;
xtensa_find_register_by_name (struct gdbarch *gdbarch, const char *name)
{
int i;
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
for (i = 0; i < gdbarch_num_cooked_regs (gdbarch); i++)
if (strcasecmp (tdep->regmap[i].name, name) == 0)
static const char *
xtensa_register_name (struct gdbarch *gdbarch, int regnum)
{
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
/* Return the name stored in the register map. */
if (regnum >= 0 && regnum < gdbarch_num_cooked_regs (gdbarch))
static struct type *
xtensa_register_type (struct gdbarch *gdbarch, int regnum)
{
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
/* Return signed integer for ARx and Ax registers. */
if ((regnum >= tdep->ar_base
xtensa_reg_to_regnum (struct gdbarch *gdbarch, int regnum)
{
int i;
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
if (regnum >= 0 && regnum < 16)
return tdep->a0_base + regnum;
{
DEBUGTRACE ("xtensa_pseudo_register_read (... regnum = %d (%s) ...)\n",
regnum, xtensa_register_name (gdbarch, regnum));
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
/* Read aliases a0..a15, if this is a Windowed ABI. */
if (tdep->isa_use_windowed_registers
{
DEBUGTRACE ("xtensa_pseudo_register_write (... regnum = %d (%s) ...)\n",
regnum, xtensa_register_name (gdbarch, regnum));
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
/* Renumber register, if aliases a0..a15 on Windowed ABI. */
if (tdep->isa_use_windowed_registers
int regnum,
const struct reggroup *group)
{
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
xtensa_register_t* reg = &tdep->regmap[regnum];
xtensa_register_type_t type = reg->type;
xtensa_register_group_t rg = reg->group;
{
const xtensa_elf_gregset_t *regs = (const xtensa_elf_gregset_t *) gregs;
struct gdbarch *gdbarch = rc->arch ();
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
int i;
DEBUGTRACE ("xtensa_supply_gregset (..., regnum==%d, ...)\n", regnum);
xtensa_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
{
CORE_ADDR pc, fp;
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
/* THIS-FRAME is a dummy frame. Return a frame ID of that frame. */
{
#define RETURN_FP goto done
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
unsigned int fp_regnum = tdep->a0_base + 1;
CORE_ADDR start_addr;
xtensa_isa isa;
if (windowed)
{
LONGEST op1;
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
/* Get WINDOWBASE, WINDOWSTART, and PS registers. */
wb = get_frame_register_unsigned (this_frame,
struct xtensa_frame_cache *cache;
ULONGEST saved_reg = 0;
int done = 1;
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
if (*this_cache == NULL)
*this_cache = xtensa_frame_cache (this_frame, this_cache);
gdb_assert(len > 0);
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
if (tdep->call_abi != CallAbiCall0Only)
{
/* First, we have to find the caller window in the register file. */
DEBUGTRACE ("xtensa_store_return_value (...)\n");
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
if (tdep->call_abi != CallAbiCall0Only)
{
regcache_raw_read_unsigned
CORE_ADDR struct_addr)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
int size, onstack_size;
gdb_byte *buf = (gdb_byte *) alloca (16);
CORE_ADDR ra, ps;
static int
xtensa_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
{
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
if (tdep->isa_use_density_instructions)
return 2;
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
unsigned litbase, litaddr, litval;
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
switch (opclass)
{
CORE_ADDR body_pc=UINT_MAX; /* PC, where prologue analysis stopped. */
CORE_ADDR sp, fp, ra;
int fp_regnum = C0_SP, c0_hasfp = 0, c0_frmsz = 0, prev_sp = 0, to_stk;
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
sp = get_frame_register_unsigned
(this_frame, tdep->a0_base + 1);
static void
execute_l32e (struct gdbarch *gdbarch, int at, int as, int offset, CORE_ADDR wb)
{
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
int atreg = arreg_number (gdbarch, tdep->a0_base + at, wb);
int asreg = arreg_number (gdbarch, tdep->a0_base + as, wb);
CORE_ADDR addr = xtensa_read_register (asreg) + offset;
static void
execute_s32e (struct gdbarch *gdbarch, int at, int as, int offset, CORE_ADDR wb)
{
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
int atreg = arreg_number (gdbarch, tdep->a0_base + at, wb);
int asreg = arreg_number (gdbarch, tdep->a0_base + as, wb);
CORE_ADDR addr = xtensa_read_register (asreg) + offset;
xtensa_opcode opc;
int insn_num = 0;
void (*func) (struct gdbarch *, int, int, int, CORE_ADDR);
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
uint32_t at, as, offset;
CORE_ADDR ps, wb, ws, ra;
int epc1_regnum, i, regnum;
xtensa_exception_handler_t eh_type;
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
/* Read PS, WB, and WS from the hardware. Note that PS register
must be present, if Windowed ABI is supported. */
CORE_ADDR end_func;
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
if ((tdep->call_abi == CallAbiCall0Only)
&& call0_ret (start_pc, prologue_sal.end))
return start_pc;
static void
xtensa_verify_config (struct gdbarch *gdbarch)
{
- xtensa_gdbarch_tdep *tdep = (xtensa_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ xtensa_gdbarch_tdep *tdep = gdbarch_tdep<xtensa_gdbarch_tdep> (gdbarch);
string_file log;
/* Verify that we got a reasonable number of AREGS. */
struct z80_unwind_cache *info)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- z80_gdbarch_tdep *tdep = (z80_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ z80_gdbarch_tdep *tdep = gdbarch_tdep<z80_gdbarch_tdep> (gdbarch);
int addr_len = tdep->addr_length;
gdb_byte prologue[32]; /* max prologue is 24 bytes: __interrupt with local array */
int pos = 0;
gdb_byte buf[sizeof(void*)];
struct z80_unwind_cache *info;
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- z80_gdbarch_tdep *tdep = (z80_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ z80_gdbarch_tdep *tdep = gdbarch_tdep<z80_gdbarch_tdep> (gdbarch);
int addr_len = tdep->addr_length;
if (*this_prologue_cache)
ULONGEST pc;
gdb_byte buf[3];
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- z80_gdbarch_tdep *tdep = (z80_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ z80_gdbarch_tdep *tdep = gdbarch_tdep<z80_gdbarch_tdep> (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
read_memory (info->saved_regs[Z80_PC_REGNUM].addr (),
}
else /* kind is non-RST address, use CALL instead, but it is dungerous */
{
- z80_gdbarch_tdep *tdep = (z80_gdbarch_tdep *) gdbarch_tdep (gdbarch);
+ z80_gdbarch_tdep *tdep = gdbarch_tdep<z80_gdbarch_tdep> (gdbarch);
gdb_byte *p = break_insn;
*p++ = 0xcd;
*p++ = (kind >> 0) & 0xff;