X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fi386-tdep.h;h=56cbf416d885d165b251e6e3900b1a816c288966;hb=refs%2Fheads%2Fconcurrent-displaced-stepping-2020-04-01;hp=99b89e747dfb4bd22d417ff3fccf74a4830a4470;hpb=badc00202024619e1c868b8cf70fe6351fc028c3;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h index 99b89e747d..56cbf416d8 100644 --- a/gdb/i386-tdep.h +++ b/gdb/i386-tdep.h @@ -1,6 +1,6 @@ /* Target-dependent code for the i386. - Copyright (C) 2001-2017 Free Software Foundation, Inc. + Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of GDB. @@ -20,6 +20,9 @@ #ifndef I386_TDEP_H #define I386_TDEP_H +#include "gdbarch.h" +#include "infrun.h" + struct frame_info; struct gdbarch; struct reggroup; @@ -198,6 +201,10 @@ struct gdbarch_tdep /* PKEYS register names. */ const char **pkeys_register_names; + /* Register number for %fsbase. Set this to -1 to indicate the + absence of segment base registers. */ + int fsbase_regnum; + /* Target description. */ const struct target_desc *tdesc; @@ -253,7 +260,7 @@ struct gdbarch_tdep /* Floating-point registers. */ -/* All FPU control regusters (except for FIOFF and FOOFF) are 16-bit +/* All FPU control registers (except for FIOFF and FOOFF) are 16-bit (at most) in the FPU, but are zero-extended to 32 bits in GDB's register cache. */ @@ -294,7 +301,9 @@ enum i386_regnum I386_K7_REGNUM = I386_K0_REGNUM + 7, I386_ZMM0H_REGNUM, /* %zmm0h */ I386_ZMM7H_REGNUM = I386_ZMM0H_REGNUM + 7, - I386_PKRU_REGNUM + I386_PKRU_REGNUM, + I386_FSBASE_REGNUM, + I386_GSBASE_REGNUM }; /* Register numbers of RECORD_REGMAP. */ @@ -335,6 +344,7 @@ enum record_i386_regnum #define I386_MPX_NUM_REGS (I386_BNDSTATUS_REGNUM + 1) #define I386_AVX512_NUM_REGS (I386_ZMM7H_REGNUM + 1) #define I386_PKEYS_NUM_REGS (I386_PKRU_REGNUM + 1) +#define I386_NUM_REGS (I386_GSBASE_REGNUM + 1) /* Size of the largest register. */ #define I386_MAX_REGISTER_SIZE 64 @@ -362,7 +372,7 @@ extern struct type *i386_pseudo_register_type (struct gdbarch *gdbarch, int regnum); extern void i386_pseudo_register_read_into_value (struct gdbarch *gdbarch, - struct regcache *regcache, + readable_regcache *regcache, int regnum, struct value *result); @@ -389,6 +399,19 @@ extern CORE_ADDR i386_pe_skip_trampoline_code (struct frame_info *frame, extern CORE_ADDR i386_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc); +/* The "push_dummy_call" gdbarch method, optionally with the thiscall + calling convention. */ +extern CORE_ADDR i386_thiscall_push_dummy_call (struct gdbarch *gdbarch, + struct value *function, + struct regcache *regcache, + CORE_ADDR bp_addr, + int nargs, struct value **args, + CORE_ADDR sp, + function_call_return_method + return_method, + CORE_ADDR struct_addr, + bool thiscall); + /* Return whether the THIS_FRAME corresponds to a sigtramp routine. */ extern int i386_sigtramp_p (struct frame_info *this_frame); @@ -416,11 +439,13 @@ extern void void *cb_data, const struct regcache *regcache); -extern struct displaced_step_closure *i386_displaced_step_copy_insn +typedef buf_displaced_step_copy_insn_closure i386_displaced_step_copy_insn_closure; + +extern displaced_step_copy_insn_closure_up i386_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs); extern void i386_displaced_step_fixup (struct gdbarch *gdbarch, - struct displaced_step_closure *closure, + struct displaced_step_copy_insn_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs); @@ -436,7 +461,8 @@ extern int i386_svr4_reg_to_regnum (struct gdbarch *gdbarch, int reg); extern int i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr); -extern const struct target_desc *i386_target_description (uint64_t xcr0); +extern const struct target_desc *i386_target_description (uint64_t xcr0, + bool segments); /* Return true iff the current target is MPX enabled. */ extern int i386_mpx_enabled (void);