diff options
Diffstat (limited to 'gdb/amd64-tdep.c')
-rw-r--r-- | gdb/amd64-tdep.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index de04bbd..7c67359 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -247,7 +247,7 @@ static const int amd64_dwarf_regmap_len = static int amd64_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg) { - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch); int ymm0_regnum = tdep->ymm0_regnum; int regnum = -1; @@ -331,7 +331,7 @@ static const char * const amd64_dword_names[] = static const char * amd64_pseudo_register_name (struct gdbarch *gdbarch, int regnum) { - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) 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)) @@ -353,7 +353,7 @@ amd64_pseudo_register_read_value (struct gdbarch *gdbarch, readable_regcache *regcache, int regnum) { - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch); value *result_value = allocate_value (register_type (gdbarch, regnum)); VALUE_LVAL (result_value) = lval_register; @@ -413,7 +413,7 @@ amd64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int regnum, const gdb_byte *buf) { - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch); if (i386_byte_regnum_p (gdbarch, regnum)) { @@ -465,7 +465,7 @@ static int amd64_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int regnum) { - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch); if (i386_byte_regnum_p (gdbarch, regnum)) { @@ -2739,7 +2739,7 @@ static struct amd64_frame_cache * amd64_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); struct amd64_frame_cache *cache; CORE_ADDR addr; @@ -2821,7 +2821,8 @@ amd64_sigtramp_frame_sniffer (const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache) { - struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (this_frame)); + gdbarch *arch = get_frame_arch (this_frame); + i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (arch); /* We shouldn't even bother if we don't have a sigcontext_addr handler. */ @@ -3021,7 +3022,7 @@ amd64_supply_fpregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *fpregs, size_t len) { struct gdbarch *gdbarch = regcache->arch (); - const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch); gdb_assert (len >= tdep->sizeof_fpregset); amd64_supply_fxsave (regcache, regnum, fpregs); @@ -3038,7 +3039,7 @@ amd64_collect_fpregset (const struct regset *regset, int regnum, void *fpregs, size_t len) { struct gdbarch *gdbarch = regcache->arch (); - const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + const i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch); gdb_assert (len >= tdep->sizeof_fpregset); amd64_collect_fxsave (regcache, regnum, fpregs); @@ -3062,7 +3063,8 @@ amd64_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc) gdb_byte buf[8]; CORE_ADDR jb_addr; struct gdbarch *gdbarch = get_frame_arch (frame); - int jb_pc_offset = gdbarch_tdep (gdbarch)->jb_pc_offset; + i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch); + int jb_pc_offset = tdep->jb_pc_offset; int len = TYPE_LENGTH (builtin_type (gdbarch)->builtin_func_ptr); /* If JB_PC_OFFSET is -1, we have no way to find out where the @@ -3105,7 +3107,7 @@ void amd64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch, const target_desc *default_tdesc) { - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) 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 }; @@ -3284,7 +3286,7 @@ amd64_none_init_abi (gdbarch_info info, gdbarch *arch) static struct type * amd64_x32_pseudo_register_type (struct gdbarch *gdbarch, int regnum) { - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch); switch (regnum - tdep->eax_regnum) { @@ -3302,7 +3304,7 @@ void amd64_x32_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch, const target_desc *default_tdesc) { - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch); amd64_init_abi (info, gdbarch, default_tdesc); @@ -3372,7 +3374,7 @@ amd64_supply_fxsave (struct regcache *regcache, int regnum, const void *fxsave) { struct gdbarch *gdbarch = regcache->arch (); - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch); i387_supply_fxsave (regcache, regnum, fxsave); @@ -3395,7 +3397,7 @@ amd64_supply_xsave (struct regcache *regcache, int regnum, const void *xsave) { struct gdbarch *gdbarch = regcache->arch (); - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch); i387_supply_xsave (regcache, regnum, xsave); @@ -3430,7 +3432,7 @@ amd64_collect_fxsave (const struct regcache *regcache, int regnum, void *fxsave) { struct gdbarch *gdbarch = regcache->arch (); - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch); gdb_byte *regs = (gdb_byte *) fxsave; i387_collect_fxsave (regcache, regnum, fxsave); @@ -3451,7 +3453,7 @@ amd64_collect_xsave (const struct regcache *regcache, int regnum, void *xsave, int gcore) { struct gdbarch *gdbarch = regcache->arch (); - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch); gdb_byte *regs = (gdb_byte *) xsave; i387_collect_xsave (regcache, regnum, xsave, gcore); |