21#include "opcode/i386.h"
49#include "gdbsupport/x86-xstate.h"
68#include <unordered_set>
77 "eax",
"ecx",
"edx",
"ebx",
78 "esp",
"ebp",
"esi",
"edi",
79 "eip",
"eflags",
"cs",
"ss",
80 "ds",
"es",
"fs",
"gs",
81 "st0",
"st1",
"st2",
"st3",
82 "st4",
"st5",
"st6",
"st7",
83 "fctrl",
"fstat",
"ftag",
"fiseg",
84 "fioff",
"foseg",
"fooff",
"fop",
85 "xmm0",
"xmm1",
"xmm2",
"xmm3",
86 "xmm4",
"xmm5",
"xmm6",
"xmm7",
92 "zmm0",
"zmm1",
"zmm2",
"zmm3",
93 "zmm4",
"zmm5",
"zmm6",
"zmm7"
98 "zmm0h",
"zmm1h",
"zmm2h",
"zmm3h",
99 "zmm4h",
"zmm5h",
"zmm6h",
"zmm7h"
104 "k0",
"k1",
"k2",
"k3",
105 "k4",
"k5",
"k6",
"k7"
110 "ymm0",
"ymm1",
"ymm2",
"ymm3",
111 "ymm4",
"ymm5",
"ymm6",
"ymm7",
116 "ymm0h",
"ymm1h",
"ymm2h",
"ymm3h",
117 "ymm4h",
"ymm5h",
"ymm6h",
"ymm7h",
122 "bnd0raw",
"bnd1raw",
"bnd2raw",
"bnd3raw",
"bndcfgu",
"bndstatus"
134 "bnd0",
"bnd1",
"bnd2",
"bnd3"
141 "mm0",
"mm1",
"mm2",
"mm3",
142 "mm4",
"mm5",
"mm6",
"mm7"
149 "al",
"cl",
"dl",
"bl",
150 "ah",
"ch",
"dh",
"bh"
157 "ax",
"cx",
"dx",
"bx",
227 if (zmm0h_regnum < 0)
266 if (ymm0h_regnum < 0)
294 if (ymm16h_regnum < 0)
307 if (ymm16_regnum < 0)
337 if (num_xmm_regs == 0)
352 if (num_xmm_avx512_regs == 0)
479 internal_error (_(
"invalid regnum"));
493 if (reg >= 0 && reg <= 7)
503 else if (reg >= 12 && reg <= 19)
508 else if (reg >= 21 && reg <= 28)
515 return reg - 21 + ymm0_regnum;
519 else if (reg >= 29 && reg <= 36)
542 if (reg >= 0 && reg <= 9)
547 else if (reg >= 11 && reg <= 18)
552 else if (reg >= 21 && reg <= 36)
627i386_skip_prefixes (gdb_byte *insn,
size_t max_len)
629 gdb_byte *end = insn + max_len;
635 case DATA_PREFIX_OPCODE:
636 case ADDR_PREFIX_OPCODE:
637 case CS_PREFIX_OPCODE:
638 case DS_PREFIX_OPCODE:
639 case ES_PREFIX_OPCODE:
640 case FS_PREFIX_OPCODE:
641 case GS_PREFIX_OPCODE:
642 case SS_PREFIX_OPCODE:
643 case LOCK_PREFIX_OPCODE:
644 case REPE_PREFIX_OPCODE:
645 case REPNE_PREFIX_OPCODE:
666 if ((insn[1] & 0x38) == 0x20)
670 if ((insn[1] & 0x38) == 0x28)
703 if ((insn[1] & 0x38) == 0x10)
707 if ((insn[1] & 0x38) == 0x18)
751 if ((insn[0] == 0xcd && insn[1] == 0x80)
753 || (insn[0] == 0x0f && insn[1] == 0x34)
755 || (insn[0] == 0x0f && insn[1] == 0x05))
807 CORE_ADDR from, CORE_ADDR to,
811 std::unique_ptr<i386_displaced_step_copy_insn_closure> closure
813 gdb_byte *buf = closure->buf.data ();
824 insn = i386_skip_prefixes (buf, len);
826 insn[syscall_length] = NOP_OPCODE;
845 CORE_ADDR from, CORE_ADDR to,
854 ULONGEST insn_offset = to - from;
858 gdb_byte *insn = closure->
buf.data ();
860 gdb_byte *insn_start = insn;
877 gdb_byte *opcode = i386_skip_prefixes (insn, max_insn_len);
913 && orig_eip != to + (insn - insn_start) + insn_len
918 && orig_eip != to + (insn - insn_start) + insn_len + 1)
922 ULONGEST eip = (orig_eip - insn_offset) & 0xffffffffUL;
948 const ULONGEST retaddr_len = 4;
952 retaddr = (retaddr - insn_offset) & 0xffffffffUL;
970 CORE_ADDR *to, CORE_ADDR oldloc)
974 int offset = 0, rel32, newrel;
976 gdb_byte *insn = buf;
991 gdb_byte push_buf[16];
992 unsigned int ret_addr;
995 ret_addr = oldloc + insn_length;
1006 newrel = (oldloc - *to) + rel32;
1020 if (insn[0] == 0xe9)
1023 else if (insn[0] == 0x0f && (insn[1] & 0xf0) == 0x80)
1029 newrel = (oldloc - *to) + rel32;
1042#ifdef I386_REGNO_TO_SYMMETRY
1043#error "The Sequent Symmetry is no longer supported."
1052#define I386_NUM_SAVED_REGS I386_NUM_GREGS
1147 delta += data16 + 2;
1174 static gdb_byte proto1[3] = { 0x87, 0x04, 0x24 };
1175 static gdb_byte proto2[4] = { 0x87, 0x44, 0x24, 0x00 };
1179 if (current_pc <=
pc)
1191 if (memcmp (buf, proto1, 3) != 0 && memcmp (buf, proto2, 4) != 0)
1194 if (current_pc ==
pc)
1200 if (current_pc ==
pc + 1)
1206 if (buf[1] == proto1[1])
1232 if (op == 0x68 || op == 0x6a)
1246 if (buf[0] == 0xe8 && buf[6] == 0xc4 && buf[7] == 0x4)
1247 pc += delta +
sizeof (buf);
1287 int offset, offset_and;
1288 static int regnums[8] = {
1304 if (buf[0] == 0x8d && buf[2] == 0x24 && buf[3] == 0x4)
1307 if ((buf[1] & 0xc7) != 0x44)
1311 reg = (buf[1] >> 3) & 7;
1318 if ((buf[0] & 0xf8) != 0x50)
1325 if (buf[1] != 0x8d || buf[3] != 0x24 || buf[4] != 0x8)
1329 if ((buf[2] & 0xc7) != 0x44)
1334 if (reg != ((buf[2] >> 3) & 7))
1341 if (reg == 4 || reg == 5)
1345 if (buf[offset + 1] != 0xe4
1346 || (buf[offset] != 0x81 && buf[offset] != 0x83))
1349 offset_and = offset;
1350 offset += buf[offset] == 0x81 ? 6 : 3;
1354 if (buf[offset] != 0xff
1355 || buf[offset + 2] != 0xfc
1356 || (buf[offset + 1] & 0xf8) != 0x70)
1361 if (reg != (buf[offset + 1] & 7))
1364 if (current_pc >
pc + offset_and)
1367 return std::min (
pc + offset + 3, current_pc);
1371#define I386_MAX_MATCHED_INSN_LEN 6
1391 if ((op & pattern.
mask[0]) == pattern.
insn[0])
1394 int insn_matched = 1;
1397 gdb_assert (pattern.
len > 1);
1403 for (i = 1; i < pattern.
len; i++)
1405 if ((buf[i - 1] & pattern.
mask[i]) != pattern.
insn[i])
1408 return insn_matched;
1422 for (pattern = insn_patterns; pattern->
len > 0; pattern++)
1437 CORE_ADDR current_pc;
1446 ix =
insn - insn_patterns;
1447 for (i = ix - 1; i >= 0; i--)
1449 current_pc -= insn_patterns[i].
len;
1455 current_pc = pc +
insn->len;
1456 for (
insn = insn_patterns + ix + 1;
insn->len > 0;
insn++)
1461 current_pc +=
insn->len;
1481 { 2, { 0xb0, 0x00 }, { 0xfa, 0x00 } },
1483 { 2, { 0xb2, 0x00 }, { 0xfb, 0x00 } },
1485 { 5, { 0xb8 }, { 0xfe } },
1487 { 5, { 0xba }, { 0xff } },
1496 { 5, { 0xa1 }, { 0xff } },
1498 { 6, { 0x89, 0x05 }, {0xff, 0xf7 } },
1500 { 6, { 0x89, 0x15 }, {0xff, 0xff } },
1508 { 2, { 0x29, 0xc0 }, { 0xfd, 0xff } },
1510 { 2, { 0x29, 0xc9 }, { 0xfd, 0xff } },
1512 { 2, { 0x29, 0xd2 }, { 0xfd, 0xff } },
1514 { 2, { 0x31, 0xc0 }, { 0xfd, 0xff } },
1516 { 2, { 0x31, 0xc9 }, { 0xfd, 0xff } },
1518 { 2, { 0x31, 0xd2 }, { 0xfd, 0xff } },
1526 static const gdb_byte endbr32[] = { 0xf3, 0x0f, 0x1e, 0xfb };
1528 gdb_byte buf[
sizeof (endbr32)];
1535 if (memcmp (buf, endbr32,
sizeof (endbr32)) != 0)
1538 return pc +
sizeof (endbr32);
1573 else if (op == 0x8b)
1598 CORE_ADDR pc, CORE_ADDR limit,
1632 while (pc + skip < limit)
1642 if (limit <= pc + skip)
1719 else if (op == 0x81)
1730 else if (op == 0x8d)
1745 else if (op == 0xc8)
1763 CORE_ADDR offset = 0;
1769 for (i = 0; i < 8 && pc < current_pc; i++)
1773 if (op < 0x50 || op > 0x57)
1814 CORE_ADDR pc, CORE_ADDR current_pc,
1834 static gdb_byte pic_pat[6] =
1843 CORE_ADDR func_addr;
1847 CORE_ADDR post_prologue_pc
1854 if (post_prologue_pc
1859 return std::max (start_pc, post_prologue_pc);
1882 for (i = 0; i < 6; i++)
1887 if (pic_pat[i] != op)
1903 else if (op == 0x9d)
1913 if (delta > 0 && op == 0x81
1950 CORE_ADDR call_dest;
1953 call_dest = call_dest & 0xffffffffU;
2001 if (cache->
base == 0)
2031 cache->
base = ((cache->
saved_sp - 4) & 0xfffffff0) - 4;
2037 else if (cache->
pc != 0
2089 *this_cache = cache;
2095 catch (
const gdb_exception_error &ex)
2097 if (ex.error != NOT_AVAILABLE_ERROR)
2112 else if (cache->
base == 0)
2130 return UNWIND_UNAVAILABLE;
2133 if (cache->
base == 0)
2134 return UNWIND_OUTERMOST;
2136 return UNWIND_NO_REASON;
2139static struct value *
2145 gdb_assert (
regnum >= 0);
2240 void **this_prologue_cache)
2259 *this_cache = cache;
2275 catch (
const gdb_exception_error &ex)
2277 if (ex.error != NOT_AVAILABLE_ERROR)
2292 return UNWIND_UNAVAILABLE;
2294 return UNWIND_NO_REASON;
2311static struct value *
2313 void **this_cache,
int regnum)
2345 { 5, { 0xb8 }, { 0xfe } },
2348 { 5, { 0xe9 }, { 0xff } },
2358 { 5, { 0x68 }, { 0xff } },
2361 { 5, { 0xe9 }, { 0xff } },
2472 catch (
const gdb_exception_error &ex)
2474 if (ex.error != NOT_AVAILABLE_ERROR)
2478 *this_cache = cache;
2490 return UNWIND_UNAVAILABLE;
2492 return UNWIND_NO_REASON;
2511static struct value *
2513 void **this_cache,
int regnum)
2524 void **this_prologue_cache)
2597 return sp & -(CORE_ADDR)16;
2611 CORE_ADDR sp, jb_addr;
2619 if (jb_pc_offset == -1)
2645 if ((
type->
code () == TYPE_CODE_DECFLOAT
2649 if (
type->
code () == TYPE_CODE_ARRAY)
2651 if (
type->
code () == TYPE_CODE_STRUCT
2652 ||
type->
code () == TYPE_CODE_UNION)
2671 CORE_ADDR *real_pc, CORE_ADDR *bp_addr,
2688 int nargs,
struct value **args, CORE_ADDR sp,
2690 CORE_ADDR struct_addr,
bool thiscall)
2709 for (write_pass = 0; write_pass < 2; write_pass++)
2711 int args_space_used = 0;
2720 args_space_used += 4;
2726 for (i = thiscall ? 1 : 0; i < nargs; i++)
2733 args_space_used = align_up (args_space_used, 16);
2744 args_space_used += align_up (len, 4);
2749 args_space = align_up (args_space, 16);
2750 args_space += align_up (len, 4);
2790 struct objfile *objf =
nullptr;
2791 asection *asect =
nullptr;
2796 if (func_section !=
nullptr)
2799 if (objf !=
nullptr)
2802 asect = bfd_get_section_by_name (objf->
obfd.get (),
".got.plt");
2803 if (asect ==
nullptr)
2804 asect = bfd_get_section_by_name (objf->
obfd.get (),
".got");
2807 if (asect !=
nullptr)
2812 if (osect !=
nullptr)
2842 struct value **args, CORE_ADDR sp,
2844 CORE_ADDR struct_addr)
2847 nargs, args, sp, return_method,
2848 struct_addr,
false);
2854#define LOW_RETURN_REGNUM I386_EAX_REGNUM
2855#define HIGH_RETURN_REGNUM I386_EDX_REGNUM
2869 if (((
type->
code () == TYPE_CODE_FLT) && len == 2)
2870 || ((
type->
code () == TYPE_CODE_COMPLEX) && len == 4))
2875 else if (
type->
code () == TYPE_CODE_FLT)
2879 warning (_(
"Cannot find floating-point return value."));
2880 memset (valbuf, 0, len);
2896 if (len <= low_size)
2899 memcpy (valbuf, buf, len);
2901 else if (len <= (low_size + high_size))
2904 memcpy (valbuf, buf, low_size);
2906 memcpy (valbuf + low_size, buf, len - low_size);
2909 internal_error (_(
"Cannot extract return value of %d bytes long."),
2924 if (
type->
code () == TYPE_CODE_FLT)
2931 warning (_(
"Cannot set floating-point return value."));
2964 if (len <= low_size)
2966 else if (len <= (low_size + high_size))
2973 internal_error (_(
"Cannot store return value of %d bytes long."), len);
3003 gdb_assert (
code == TYPE_CODE_STRUCT
3004 ||
code == TYPE_CODE_UNION
3005 ||
code == TYPE_CODE_ARRAY);
3017 if (
type->
code () == TYPE_CODE_FLT)
3018 return (len == 4 || len == 8 || len == 12);
3021 return (len == 1 || len == 2 || len == 4 || len == 8);
3033 gdb_byte *readbuf,
const gdb_byte *writebuf)
3037 if (((
code == TYPE_CODE_STRUCT
3038 ||
code == TYPE_CODE_UNION
3039 ||
code == TYPE_CODE_ARRAY)
3137 "__gdb_builtin_type_bound128", TYPE_CODE_STRUCT);
3142 t->
set_name (
"builtin_type_bound128");
3163 union __gdb_builtin_type_vec512i
3165 int128_t v4_int128[4];
3166 int64_t v8_int64[8];
3167 int32_t v16_int32[16];
3168 int16_t v32_int16[32];
3169 int8_t v64_int8[64];
3170 double v8_double[8];
3171 float v16_float[16];
3172 float16_t v32_half[32];
3173 bfloat16_t v32_bfloat16[32];
3180 "__gdb_builtin_type_vec512i", TYPE_CODE_UNION);
3201 t->
set_name (
"builtin_type_vec512i");
3222 union __gdb_builtin_type_vec256i
3224 int128_t v2_int128[2];
3225 int64_t v4_int64[4];
3226 int32_t v8_int32[8];
3227 int16_t v16_int16[16];
3228 int8_t v32_int8[32];
3229 double v4_double[4];
3231 float16_t v16_half[16];
3232 bfloat16_t v16_bfloat16[16];
3239 "__gdb_builtin_type_vec256i", TYPE_CODE_UNION);
3260 t->
set_name (
"builtin_type_vec256i");
3279 union __gdb_builtin_type_vec64i
3282 int32_t v2_int32[2];
3283 int16_t v4_int16[4];
3291 "__gdb_builtin_type_vec64i", TYPE_CODE_UNION);
3302 t->
set_name (
"builtin_type_vec64i");
3338 internal_error (_(
"invalid regnum"));
3355 tos = (fstat >> 11) & 0x7;
3356 fpreg = (mmxreg + tos) % 8;
3369 struct value *result_value)
3372 enum register_status
status;
3402 LONGEST upper, lower;
3409 memcpy (buf, &lower,
size);
3422 memcpy (buf, raw_buf, 8);
3436 memcpy (buf, raw_buf, 16);
3444 memcpy (buf + 16, raw_buf, 16);
3455 memcpy (buf, raw_buf, 16);
3464 memcpy (buf + 16, raw_buf, 16);
3473 memcpy (buf + 32, raw_buf, 32);
3485 memcpy (buf, raw_buf, 16);
3492 memcpy (buf + 16, raw_buf, 16);
3503 memcpy (buf, raw_buf, 16);
3510 memcpy (buf + 16, raw_buf, 16);
3522 memcpy (buf, raw_buf, 2);
3534 else if (gpnum >= 4)
3535 memcpy (buf, raw_buf + 1, 1);
3537 memcpy (buf, raw_buf, 1);
3540 internal_error (_(
"invalid regnum"));
3544static struct value *
3549 struct value *result;
3562 int regnum,
const gdb_byte *buf)
3583 ULONGEST upper, lower;
3599 memcpy (raw_buf, &lower, 8);
3600 memcpy (raw_buf + 8, &upper, 8);
3658 memcpy (raw_buf, buf, 2);
3670 memcpy (raw_buf + 1, buf, 1);
3672 memcpy (raw_buf, buf, 1);
3677 internal_error (_(
"invalid regnum"));
3696 for (i = 0; i < 8; i++)
3759 internal_error (_(
"invalid regnum"));
3776 static int next_regnum[] =
3787 if (
regnum >= 0 &&
regnum <
sizeof (next_regnum) /
sizeof (next_regnum[0]))
3788 return next_regnum[
regnum];
3807 if (len > 4 && len % 4 == 0)
3809 int last_regnum =
regnum;
3817 if (last_regnum != -1)
3830 int *optimizedp,
int *unavailablep)
3837 optimizedp, unavailablep);
3841 gdb_assert (len > 4 && len % 4 == 0);
3845 gdb_assert (
regnum != -1);
3849 gdb::make_array_view (to,
3852 optimizedp, unavailablep))
3860 *optimizedp = *unavailablep = 0;
3869 struct type *
type,
const gdb_byte *from)
3881 gdb_assert (len > 4 && len % 4 == 0);
3885 gdb_assert (
regnum != -1);
3901 int regnum,
const void *gregs,
size_t len)
3905 const gdb_byte *regs = (
const gdb_byte *) gregs;
3926 int regnum,
void *gregs,
size_t len)
3930 gdb_byte *regs = (gdb_byte *) gregs;
3949 int regnum,
const void *fpregs,
size_t len)
3972 int regnum,
void *fpregs,
size_t len)
4021 CORE_ADDR pc,
char *
name)
4029 unsigned long indirect =
4033 const char *symname = indsym ? indsym->
linkage_name () : 0;
4037 if (startswith (symname,
"__imp_")
4038 || startswith (symname,
"_imp_"))
4057 return (
name && strcmp (
"_sigtramp",
name) == 0);
4094 return (
name && (strcmp (
"_sigreturn",
name) == 0
4095 || strcmp (
"sigvechandler",
name) == 0));
4124 || (isdigit (*s) && s[1] ==
'(' && s[2] ==
'%')
4125 || (*s ==
'(' && s[1] ==
'%')
4126 || (*s ==
'%' && isalpha (s[1])));
4141 const char *s = p->
arg;
4143 if (isdigit (*s) || *s ==
'-' || *s ==
'+')
4147 long displacements[3];
4152 got_minus[0] =
false;
4158 got_minus[0] =
true;
4161 if (!isdigit ((
unsigned char) *s))
4164 displacements[0] = strtol (s, &endp, 10);
4167 if (*s !=
'+' && *s !=
'-')
4173 got_minus[1] =
false;
4179 got_minus[1] =
true;
4182 if (!isdigit ((
unsigned char) *s))
4185 displacements[1] = strtol (s, &endp, 10);
4188 if (*s !=
'+' && *s !=
'-')
4194 got_minus[2] =
false;
4200 got_minus[2] =
true;
4203 if (!isdigit ((
unsigned char) *s))
4206 displacements[2] = strtol (s, &endp, 10);
4209 if (*s !=
'(' || s[1] !=
'%')
4215 while (isalnum (*s))
4221 len = s - start - 1;
4222 std::string regname (start, len);
4225 error (_(
"Invalid register name `%s' on expression `%s'."),
4229 for (i = 0; i < 3; i++)
4231 LONGEST this_val = displacements[i];
4233 this_val = -this_val;
4239 using namespace expr;
4243 = make_operation<long_const_operation> (long_type,
value);
4246 = make_operation<register_operation> (std::move (regname));
4248 reg = make_operation<unop_cast_operation> (std::move (reg), void_ptr);
4251 = make_operation<add_operation> (std::move (reg), std::move (offset));
4253 sum = make_operation<unop_cast_operation> (std::move (sum),
4255 return make_operation<unop_ind_operation> (std::move (sum));
4274 const char *s = p->
arg;
4276 if (isdigit (*s) || *s ==
'(' || *s ==
'-' || *s ==
'+')
4278 bool offset_minus =
false;
4280 bool size_minus =
false;
4291 offset_minus =
true;
4294 if (offset_minus && !isdigit (*s))
4301 offset = strtol (s, &endp, 10);
4305 if (*s !=
'(' || s[1] !=
'%')
4311 while (isalnum (*s))
4314 if (*s !=
',' || s[1] !=
'%')
4317 len_base = s - start;
4318 std::string base (start, len_base);
4321 error (_(
"Invalid register name `%s' on expression `%s'."),
4327 while (isalnum (*s))
4330 len_index = s - start;
4331 std::string index (start, len_index);
4335 error (_(
"Invalid register name `%s' on expression `%s'."),
4338 if (*s !=
',' && *s !=
')')
4354 size = strtol (s, &endp, 10);
4364 using namespace expr;
4367 operation_up reg = make_operation<register_operation> (std::move (base));
4374 = make_operation<long_const_operation> (long_type, offset);
4375 reg = make_operation<add_operation> (std::move (reg),
4380 = make_operation<register_operation> (std::move (index));
4387 = make_operation<long_const_operation> (long_type,
size);
4388 ind_reg = make_operation<mul_operation> (std::move (ind_reg),
4393 = make_operation<add_operation> (std::move (reg),
4394 std::move (ind_reg));
4397 sum = make_operation<unop_cast_operation> (std::move (sum),
4399 return make_operation<unop_ind_operation> (std::move (sum));
4423 if (result ==
nullptr)
4434 const std::string ®name,
int regnum)
4436 static const std::unordered_set<std::string> reg_assoc
4437 = {
"ax",
"bx",
"cx",
"dx",
4438 "si",
"di",
"bp",
"sp" };
4445 && reg_assoc.find (regname) != reg_assoc.end ())
4446 return "e" + regname;
4460 return "(x86_64|i.86)";
4479 static const char *
const stap_integer_prefixes[] = {
"$", NULL };
4480 static const char *
const stap_register_prefixes[] = {
"%", NULL };
4481 static const char *
const stap_register_indirection_prefixes[] = {
"(",
4483 static const char *
const stap_register_indirection_suffixes[] = {
")",
4493 stap_register_indirection_prefixes);
4495 stap_register_indirection_suffixes);
4555 int fp_regnum_p, mmx_regnum_p, xmm_regnum_p, mxcsr_regnum_p,
4556 ymm_regnum_p, ymmh_regnum_p, ymm_avx512_regnum_p, ymmh_avx512_regnum_p,
4557 bndr_regnum_p, bnd_regnum_p, zmm_regnum_p, zmmh_regnum_p,
4558 mpx_ctrl_regnum_p, xmm_avx512_regnum_p,
4559 avx512_p, avx_p, sse_p, pkru_regnum_p;
4574 return mmx_regnum_p;
4581 return xmm_regnum_p || xmm_avx512_regnum_p || mxcsr_regnum_p;
4587 avx512_p = ((tdep->
xcr0 & X86_XSTATE_AVX_AVX512_MASK)
4588 == X86_XSTATE_AVX_AVX512_MASK);
4589 avx_p = ((tdep->
xcr0 & X86_XSTATE_AVX_AVX512_MASK)
4590 == X86_XSTATE_AVX_MASK) && !avx512_p;
4591 sse_p = ((tdep->
xcr0 & X86_XSTATE_AVX_AVX512_MASK)
4592 == X86_XSTATE_SSE_MASK) && !avx512_p && ! avx_p;
4595 return (mmx_regnum_p
4596 || (zmm_regnum_p && avx512_p)
4597 || ((ymm_regnum_p || ymm_avx512_regnum_p) && avx_p)
4598 || ((xmm_regnum_p || xmm_avx512_regnum_p) && sse_p)
4612 && (((xmm_regnum_p || xmm_avx512_regnum_p) && !sse_p)
4613 || ((ymm_regnum_p || ymm_avx512_regnum_p) && !avx_p)
4615 || ymmh_avx512_regnum_p
4621 && ((bnd_regnum_p && (tdep->
xcr0 & X86_XSTATE_MPX_MASK))))
4622 return bnd_regnum_p;
4626 && ((bndr_regnum_p && (tdep->
xcr0 & X86_XSTATE_MPX_MASK))))
4631 && ((mpx_ctrl_regnum_p && (tdep->
xcr0 & X86_XSTATE_MPX_MASK))))
4632 return mpx_ctrl_regnum_p;
4635 return (!fp_regnum_p
4639 && !xmm_avx512_regnum_p
4642 && !ymm_avx512_regnum_p
4643 && !ymmh_avx512_regnum_p
4646 && !mpx_ctrl_regnum_p
4667#define PREFIX_REPZ 0x01
4668#define PREFIX_REPNZ 0x02
4669#define PREFIX_LOCK 0x04
4670#define PREFIX_DATA 0x08
4671#define PREFIX_ADDR 0x10
4753 uint8_t base = irp->
rm;
4761 scale = (
byte >> 6) & 3;
4762 index = ((
byte >> 3) & 7) | irp->
rex_x;
4770 if ((base & 7) == 5)
4785 *addr = (int8_t) buf[0];
4803 if (irp->
aflag == 2)
4808 *addr = (uint32_t) (offset64 + *addr);
4810 if (havesib && (index != 4 || scale != 0))
4814 if (irp->
aflag == 2)
4815 *addr += offset64 << scale;
4817 *addr = (uint32_t) (*addr + (offset64 << scale));
4824 *addr = (uint32_t) *addr;
4847 *addr = (int8_t) buf[0];
4863 *addr = (uint32_t) (*addr + offset64);
4867 *addr = (uint32_t) (*addr + offset64);
4873 *addr = (uint32_t) (*addr + offset64);
4877 *addr = (uint32_t) (*addr + offset64);
4883 *addr = (uint32_t) (*addr + offset64);
4887 *addr = (uint32_t) (*addr + offset64);
4893 *addr = (uint32_t) (*addr + offset64);
4897 *addr = (uint32_t) (*addr + offset64);
4903 *addr = (uint32_t) (*addr + offset64);
4909 *addr = (uint32_t) (*addr + offset64);
4915 *addr = (uint32_t) (*addr + offset64);
4921 *addr = (uint32_t) (*addr + offset64);
4946Process record ignores the memory change of instruction at address %s\n\
4947because it can't get the value of the segment register.\n\
4948Do you want to stop the program?"),
4987#define I386_SAVE_FPU_REGS 0xfffd
4988#define I386_SAVE_FPU_ENV 0xfffe
4989#define I386_SAVE_FPU_ENV_REG_STACK 0xffff
5055#define I386_RECORD_FULL_ARCH_LIST_ADD_REG(regnum) \
5056 record_full_arch_list_add_reg (ir.regcache, ir.regmap[(regnum)])
5060 CORE_ADDR input_addr)
5076 ir.
addr = input_addr;
5082 ir.
regmap = tdep->record_regmap;
5098 case REPE_PREFIX_OPCODE:
5101 case REPNE_PREFIX_OPCODE:
5104 case LOCK_PREFIX_OPCODE:
5107 case CS_PREFIX_OPCODE:
5110 case SS_PREFIX_OPCODE:
5113 case DS_PREFIX_OPCODE:
5116 case ES_PREFIX_OPCODE:
5119 case FS_PREFIX_OPCODE:
5122 case GS_PREFIX_OPCODE:
5125 case DATA_PREFIX_OPCODE:
5128 case ADDR_PREFIX_OPCODE:
5150 rex_w = (opcode8 >> 3) & 1;
5151 rex_r = (opcode8 & 0x4) << 1;
5152 ir.
rex_x = (opcode8 & 0x2) << 2;
5153 ir.
rex_b = (opcode8 & 0x1) << 3;
5179 opcode = (uint32_t) opcode8;
5187 opcode = (uint32_t) opcode8 | 0x0f00;
5239 if (((opcode >> 3) & 7) !=
OP_CMPL)
5241 if ((opcode & 1) == 0)
5246 switch ((opcode >> 1) & 3)
5289 if ((opcode & 1) == 0)
5333 if ((opcode & 1) == 0)
5340 if (ir.
mod != 3 && ir.
reg == 0)
5376 opcode = opcode << 8 | ir.
modrm;
5386 if (ir.
reg >= 2 && opcode == 0xfe)
5389 opcode = opcode << 8 | ir.
modrm;
5396 if ((opcode & 1) == 0)
5439 opcode = opcode << 8 | ir.
modrm;
5469 else if (opcode == 0x6b)
5480 if ((opcode & 1) == 0)
5509 if ((opcode & 1) == 0)
5540 if (ir.
reg == 6 || ir.
reg == 7)
5559 opcode = opcode << 8 | ir.
modrm;
5724 if ((opcode & 1) == 0)
5734 if (opcode == 0xc6 || opcode == 0xc7)
5741 if (opcode == 0xc6 || opcode == 0xc7)
5751 if ((opcode & 1) == 0)
5769 opcode = opcode << 8 | ir.
modrm;
5805 opcode = opcode << 8 | ir.
modrm;
5828 opcode = opcode << 8 | ir.
modrm;
5852Process record ignores the memory change of instruction at address %s\n\
5853because it can't get the value of the segment register.\n\
5854Do you want to stop the program?"),
5861 if ((opcode & 1) == 0)
5900 ? ((opcode & 0x7) | ir.
rex_b)
5901 : ((opcode & 0x7) & 0x3));
5928 if ((opcode & 1) == 0)
5971 opcode = opcode << 8 | ir.
modrm;
6003 if ((opcode & 1) == 0)
6009 if (ir.
mod != 3 && (opcode == 0xd2 || opcode == 0xd3))
6052 ir.
reg |= ((opcode & 7) << 3);
6132 switch (ir.
reg >> 4)
6151 switch (ir.
reg >> 4)
6156 if (3 == (ir.
reg & 7))
6167 if ((3 == (ir.
reg & 7))
6168 || (5 == (ir.
reg & 7))
6169 || (7 == (ir.
reg & 7)))
6180 if (3 == (ir.
reg & 7))
6189 if ((3 <= (ir.
reg & 7)) && (6 <= (ir.
reg & 7)))
6276 opcode = opcode << 8 | ir.
modrm;
6291 if (0x0c == (ir.
modrm >> 4))
6293 if ((ir.
modrm & 0x0f) <= 7)
6306 if ((ir.
modrm & 0x0f) - 0x08)
6310 ((ir.
modrm & 0x0f) - 0x08)))
6363 if (0xe9 == ir.
modrm)
6368 else if ((0x0c == ir.
modrm >> 4) || (0x0d == ir.
modrm >> 4))
6373 if (((ir.
modrm & 0x0f) > 0) && ((ir.
modrm & 0x0f) <= 7))
6380 else if ((ir.
modrm & 0x0f) - 0x08)
6384 ((ir.
modrm & 0x0f) - 0x08)))
6390 if (0xe3 == ir.
modrm)
6395 else if ((0x0c == ir.
modrm >> 4) || (0x0d == ir.
modrm >> 4))
6400 if (((ir.
modrm & 0x0f) > 0) && ((ir.
modrm & 0x0f) <= 7))
6407 else if ((ir.
modrm & 0x0f) - 0x08)
6411 ((ir.
modrm & 0x0f) - 0x08)))
6417 if ((0x0c == ir.
modrm >> 4)
6418 || (0x0d == ir.
modrm >> 4)
6419 || (0x0f == ir.
modrm >> 4))
6421 if ((ir.
modrm & 0x0f) <= 7)
6432 ((ir.
modrm & 0x0f) - 0x08)))
6438 if (0x0c == ir.
modrm >> 4)
6444 else if ((0x0d == ir.
modrm >> 4) || (0x0e == ir.
modrm >> 4))
6446 if ((ir.
modrm & 0x0f) <= 7)
6462 if ((0x0c == ir.
modrm >> 4)
6463 || (0x0e == ir.
modrm >> 4)
6464 || (0x0f == ir.
modrm >> 4)
6465 || (0xd9 == ir.
modrm))
6472 if (0xe0 == ir.
modrm)
6478 else if ((0x0f == ir.
modrm >> 4) || (0x0e == ir.
modrm >> 4))
6501 if ((opcode & 1) == 0)
6515 if (ir.
aflag && (es != ds))
6521Process record ignores the memory change of instruction at address %s\n\
6522because it can't get the value of the segment register.\n\
6523Do you want to stop the program?"),
6536 if (opcode == 0xa4 || opcode == 0xa5)
6762 opcode = opcode << 8 | ir.
modrm;
6801 addr64 += ((int16_t)
addr >> 4) << 4;
6804 addr64 += ((int32_t)
addr >> 5) << 5;
6807 addr64 += ((int64_t)
addr >> 6) << 6;
6852 opcode = (uint32_t) opcode8;
6860 _(
"Process record does not support instruction "
6874 if (interrupt != 0x80
6875 || tdep->i386_intx80_record == NULL)
6878 _(
"Process record does not support "
6879 "instruction int 0x%02x.\n"),
6884 ret = tdep->i386_intx80_record (ir.
regcache);
6893 _(
"Process record does not support "
6894 "instruction into.\n"));
6905 _(
"Process record does not support "
6906 "instruction bound.\n"));
6942 _(
"Process record does not support "
6943 "instruction wrmsr.\n"));
6950 _(
"Process record does not support "
6951 "instruction rdmsr.\n"));
6969 if (tdep->i386_sysenter_record == NULL)
6972 _(
"Process record does not support "
6973 "instruction sysenter.\n"));
6977 ret = tdep->i386_sysenter_record (ir.
regcache);
6985 _(
"Process record does not support "
6986 "instruction sysexit.\n"));
6994 if (tdep->i386_syscall_record == NULL)
6997 _(
"Process record does not support "
6998 "instruction syscall.\n"));
7002 ret = tdep->i386_syscall_record (ir.
regcache);
7010 _(
"Process record does not support "
7011 "instruction sysret.\n"));
7025 _(
"Process record does not support "
7026 "instruction hlt.\n"));
7056 opcode = opcode << 8 | ir.
modrm;
7074 opcode = opcode << 8 | ir.
modrm;
7082Process record ignores the memory change of instruction at address %s\n\
7083because it can't get the value of the segment register.\n\
7084Do you want to stop the program?"),
7121 opcode = opcode << 8 | ir.
modrm;
7134Process record ignores the memory change of instruction at address %s\n\
7135because it can't get the value of the segment register.\n\
7136Do you want to stop the program?"),
7174 else if (ir.
rm == 1)
7182 opcode = opcode << 8 | ir.
modrm;
7211 opcode = opcode << 8 | ir.
modrm;
7220 opcode = opcode << 8 | ir.
modrm;
7236 ? (ir.
reg | rex_r) : ir.
rm);
7259 if (ir.
mod == 3 && ir.
reg == 3)
7262 opcode = opcode << 8 | ir.
modrm;
7281 if ((ir.
modrm & 0xc0) != 0xc0)
7284 opcode = opcode << 8 | ir.
modrm;
7301 opcode = opcode << 8 | ir.
modrm;
7311 if ((ir.
modrm & 0xc0) != 0xc0 || ir.
reg == 4
7312 || ir.
reg == 5 || ir.
reg >= 8)
7315 opcode = opcode << 8 | ir.
modrm;
7373 goto no_support_3dnow_data;
7378no_support_3dnow_data:
7379 opcode = (opcode << 8) | opcode8;
7460 opcode = (opcode << 8) | ir.
modrm;
7616 opcode = (uint32_t) opcode8 | opcode << 8;
7617 goto reswitch_prefix_add;
7826 if ((opcode & 0xfffffffc) == 0x660f3a60)
7850 if (opcode == 0x0f13 || opcode == 0x660f13
7851 || opcode == 0x0f17 || opcode == 0x660f17)
7891 if (opcode == 0x0fe7)
8145 _(
"Process record does not support instruction 0x%02x "
8146 "at address %s.\n"),
8147 (
unsigned int) (opcode),
8156 0, 0, 0, 0, 0, 0, 0, 0,
8187 else if (jumplen == 0)
8206 *msg = string_printf (_(
"; instruction is only %d bytes long, "
8207 "need at least %d bytes for the jump"),
8223static const struct floatformat **
8225 const char *
name,
int len)
8227 if (len == 128 &&
name)
8228 if (strcmp (
name,
"__float128") == 0
8229 || strcmp (
name,
"_Float128") == 0
8230 || strcmp (
name,
"complex _Float128") == 0
8231 || strcmp (
name,
"complex(kind=16)") == 0
8232 || strcmp (
name,
"complex*32") == 0
8233 || strcmp (
name,
"COMPLEX*32") == 0
8234 || strcmp (
name,
"quad complex") == 0
8235 || strcmp (
name,
"real(kind=16)") == 0
8236 || strcmp (
name,
"real*16") == 0
8237 || strcmp (
name,
"REAL*16") == 0)
8248 const struct tdesc_feature *feature_core;
8250 const struct tdesc_feature *feature_sse, *feature_avx, *feature_mpx,
8251 *feature_avx512, *feature_pkeys, *feature_segments;
8252 int i, num_regs, valid_p;
8259 if (feature_core == NULL)
8289 tdep->
xcr0 = X86_XSTATE_AVX_AVX512_MASK;
8331 if (!feature_avx512)
8332 tdep->
xcr0 = X86_XSTATE_AVX_MASK;
8347 else if (feature_sse)
8348 tdep->
xcr0 = X86_XSTATE_SSE_MASK;
8351 tdep->
xcr0 = X86_XSTATE_X87_MASK;
8356 for (i = 0; i < num_regs; i++)
8364 for (; i < num_regs; i++)
8371 tdep->
xcr0 |= X86_XSTATE_MPX_MASK;
8386 if (feature_segments)
8398 tdep->
xcr0 |= X86_XSTATE_PKRU;
8426 if ((
type->
code () == TYPE_CODE_INT
8638 tdesc = info.target_desc;
8641 tdep->
tdesc = tdesc;
8722 tdesc = tdep->
tdesc;
8743 mm0_regnum = ymm0_regnum;
8771 bnd0_regnum = mm0_regnum;
8784 tdep-> bnd0_regnum = -1;
8812 [2][2][2][2][2][2] = {};
8815 tdesc = &i386_tdescs[(xcr0 & X86_XSTATE_SSE) ? 1 : 0]
8816 [(xcr0 & X86_XSTATE_AVX) ? 1 : 0]
8817 [(xcr0 & X86_XSTATE_MPX) ? 1 : 0]
8818 [(xcr0 & X86_XSTATE_AVX512) ? 1 : 0]
8819 [(xcr0 & X86_XSTATE_PKRU) ? 1 : 0]
8828#define MPX_BASE_MASK (~(ULONGEST) 0xfff)
8837 enum register_status regstatus;
8845 if (regstatus != REG_VALID)
8846 error (_(
"BNDCFGU register invalid, read status %d."), regstatus);
8861#define MPX_BD_MASK 0xfffffff00000ULL
8862#define MPX_BT_MASK 0x0000000ffff8
8863#define MPX_BD_MASK_32 0xfffff000
8864#define MPX_BT_MASK_32 0x00000ffc
8874 CORE_ADDR mpx_bd_mask, bd_ptr_r_shift, bd_ptr_l_shift;
8875 CORE_ADDR bt_mask, bt_select_r_shift, bt_select_l_shift;
8876 CORE_ADDR bd_entry_addr;
8886 bd_ptr_r_shift = 20;
8888 bt_select_r_shift = 3;
8889 bt_select_l_shift = 5;
8892 if (
sizeof (CORE_ADDR) == 4)
8893 error (_(
"bound table examination not supported\
8894 for 64-bit process with 32-bit GDB"));
8899 bd_ptr_r_shift = 12;
8901 bt_select_r_shift = 2;
8902 bt_select_l_shift = 4;
8906 offset1 = ((ptr & mpx_bd_mask) >> bd_ptr_r_shift) << bd_ptr_l_shift;
8907 bd_entry_addr = bd_base +
offset1;
8910 if ((bd_entry & 0x1) == 0)
8911 error (_(
"Invalid bounds directory entry at %s."),
8916 bt_addr = bd_entry & ~bt_select_r_shift;
8917 offset2 = ((ptr & bt_mask) >> bt_select_r_shift) << bt_select_l_shift;
8919 return bt_addr + offset2;
8930 CORE_ADDR onecompl = ~((CORE_ADDR) 0);
8931 int bounds_in_map = ((~bt_entry[1] == 0 && bt_entry[0] == onecompl) ? 1 : 0);
8933 if (bounds_in_map == 1)
8935 uiout->
text (
"Null bounds on map:");
8936 uiout->
text (
" pointer value = ");
8943 uiout->
text (
"{lbound = ");
8945 uiout->
text (
", ubound = ");
8949 uiout->
text (
"}: pointer value = ");
8953 size = ( (~(int64_t) bt_entry[1]) - (int64_t) bt_entry[0]);
8955 size = ( ~((int32_t) bt_entry[1]) - (int32_t) bt_entry[0]);
8962 uiout->
text (
", size = ");
8965 uiout->
text (
", metadata = ");
8976 CORE_ADDR bd_base = 0;
8978 CORE_ADDR bt_entry_addr = 0;
8979 CORE_ADDR bt_entry[4];
8987 gdb_printf (_(
"Intel Memory Protection Extensions not "
8988 "supported on this target.\n"));
8994 gdb_printf (_(
"Address of pointer variable expected.\n"));
9003 memset (bt_entry, 0,
sizeof (bt_entry));
9005 for (i = 0; i < 4; i++)
9007 + i * data_ptr_type->
length (),
9018 CORE_ADDR bd_base = 0;
9019 CORE_ADDR addr, lower, upper;
9020 CORE_ADDR bt_entry_addr = 0;
9021 CORE_ADDR bt_entry[2];
9022 const char *input = args;
9030 error (_(
"Intel Memory Protection Extensions not supported\
9034 error (_(
"Pointer value expected."));
9038 if (input[0] ==
',')
9040 if (input[0] ==
'\0')
9041 error (_(
"wrong number of arguments: missing lower and upper bound."));
9044 if (input[0] ==
',')
9046 if (input[0] ==
'\0')
9047 error (_(
"Wrong number of arguments; Missing upper bound."));
9052 for (i = 0; i < 2; i++)
9054 + i * data_ptr_type->
length (),
9056 bt_entry[0] = (uint64_t) lower;
9057 bt_entry[1] = ~(uint64_t) upper;
9059 for (i = 0; i < 2; i++)
9061 + i * data_ptr_type->
length (),
9062 data_ptr_type->
length (), byte_order,
9077Set the disassembly flavor."), _(
"\
9078Show the disassembly flavor."), _(
"\
9079The valid values are \"att\" and \"intel\", and the default value is \"att\"."),
9088Set the convention for returning small structs."), _(
"\
9089Show the convention for returning small structs."), _(
"\
9090Valid values are \"default\", \"pcc\" and \"reg\", and the default value\n\
9100 _(
"Set Intel Memory Protection Extensions specific variables."),
9101 _(
"Show Intel Memory Protection Extensions specific variables."),
9107 "Show the memory bounds for a given array/pointer storage\
9108 in the bound table.",
9114 "Set the memory bounds for a given array/pointer storage\
9115 in the bound table.",
void gdbarch_free(struct gdbarch *arch)
int default_print_insn(bfd_vma memaddr, disassemble_info *info)
const struct floatformat ** default_floatformat_for_type(struct gdbarch *gdbarch, const char *name, int len)
struct gdbarch * get_current_arch(void)
struct gdbarch * target_gdbarch(void)
static std::vector< const char * > arches
void gdbarch_register(enum bfd_architecture bfd_architecture, gdbarch_init_ftype *init, gdbarch_dump_tdep_ftype *dump_tdep)
int core_addr_lessthan(CORE_ADDR lhs, CORE_ADDR rhs)
struct gdbarch_list * gdbarch_list_lookup_by_info(struct gdbarch_list *arches, const struct gdbarch_info *info)
#define BP_MANIPULATION(BREAK_INSN)
void ax_reg_mask(struct agent_expr *ax, int reg)
void ax_simple(struct agent_expr *x, enum agent_op op)
void ax_const_l(struct agent_expr *x, LONGEST l)
void ax_reg(struct agent_expr *x, int reg)
bool find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr, const struct block **block)
enum register_status raw_read(int regnum, gdb_byte *buf)
void raw_collect(int regnum, void *buf) const override
void raw_supply(int regnum, const void *buf) override
void cooked_write(int regnum, const gdb_byte *buf)
void raw_write_part(int regnum, int offset, int len, const gdb_byte *buf)
void raw_write(int regnum, const gdb_byte *buf)
void field_core_addr(const char *fldname, struct gdbarch *gdbarch, CORE_ADDR address)
void field_string(const char *fldname, const char *string, const ui_file_style &style=ui_file_style())
void text(const char *string)
struct cmd_list_element * showlist
struct cmd_list_element * setlist
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **list)
set_show_commands add_setshow_enum_cmd(const char *name, enum command_class theclass, const char *const *enumlist, const char **var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
set_show_commands add_setshow_prefix_cmd(const char *name, command_class theclass, const char *set_doc, const char *show_doc, cmd_list_element **set_subcommands_list, cmd_list_element **show_subcommands_list, cmd_list_element **set_list, cmd_list_element **show_list)
void write_memory(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
CORE_ADDR read_memory_typed_address(CORE_ADDR addr, struct type *type)
ULONGEST read_memory_unsigned_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
void write_memory_unsigned_integer(CORE_ADDR addr, int len, enum bfd_endian byte_order, ULONGEST value)
void read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
LONGEST read_memory_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
ULONGEST read_code_unsigned_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
void read_code(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
LONGEST read_code_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
static void store_signed_integer(gdb_byte *addr, int len, enum bfd_endian byte_order, LONGEST val)
static void store_unsigned_integer(gdb_byte *addr, int len, enum bfd_endian byte_order, ULONGEST val)
CORE_ADDR extract_typed_address(const gdb_byte *buf, struct type *type)
static LONGEST extract_signed_integer(gdb::array_view< const gdb_byte > buf, enum bfd_endian byte_order)
static ULONGEST extract_unsigned_integer(gdb::array_view< const gdb_byte > buf, enum bfd_endian byte_order)
@ RETURN_VALUE_ABI_RETURNS_ADDRESS
@ RETURN_VALUE_REGISTER_CONVENTION
int gdb_buffered_insn_length(struct gdbarch *gdbarch, const gdb_byte *insn, int max_len, CORE_ADDR addr)
int gdb_insn_length(struct gdbarch *gdbarch, CORE_ADDR addr)
#define displaced_debug_printf(fmt,...)
std::unique_ptr< displaced_step_copy_insn_closure > displaced_step_copy_insn_closure_up
void dwarf2_append_unwinders(struct gdbarch *gdbarch)
struct value * parse_to_comma_and_eval(const char **expp)
CORE_ADDR parse_and_eval_address(const char *exp)
void frame_base_set_default(struct gdbarch *gdbarch, const struct frame_base *default_base)
int default_frame_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_prologue_cache)
struct value * frame_unwind_got_memory(frame_info_ptr frame, int regnum, CORE_ADDR addr)
struct value * frame_unwind_got_register(frame_info_ptr frame, int regnum, int new_regnum)
struct value * frame_unwind_got_constant(frame_info_ptr frame, int regnum, ULONGEST val)
void frame_unwind_append_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
int frame_relative_level(frame_info_ptr fi)
ULONGEST get_frame_register_unsigned(frame_info_ptr frame, int regnum)
CORE_ADDR get_frame_pc(frame_info_ptr frame)
void get_frame_register(frame_info_ptr frame, int regnum, gdb_byte *buf)
struct frame_id frame_id_build(CORE_ADDR stack_addr, CORE_ADDR code_addr)
struct gdbarch * get_frame_arch(frame_info_ptr this_frame)
void frame_unwind_register(frame_info_ptr next_frame, int regnum, gdb_byte *buf)
struct frame_id frame_id_build_unavailable_stack(CORE_ADDR code_addr)
CORE_ADDR get_frame_func(frame_info_ptr this_frame)
bool get_frame_register_bytes(frame_info_ptr frame, int regnum, CORE_ADDR offset, gdb::array_view< gdb_byte > buffer, int *optimizedp, int *unavailablep)
bool deprecated_frame_register_read(frame_info_ptr frame, int regnum, gdb_byte *myaddr)
void put_frame_register(frame_info_ptr frame, int regnum, const gdb_byte *buf)
#define FRAME_OBSTACK_ZALLOC(TYPE)
void set_gdbarch_stab_reg_to_regnum(struct gdbarch *gdbarch, gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum)
void set_gdbarch_insn_is_jump(struct gdbarch *gdbarch, gdbarch_insn_is_jump_ftype *insn_is_jump)
int gdbarch_pc_regnum(struct gdbarch *gdbarch)
void set_gdbarch_unwind_pc(struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype *unwind_pc)
void set_gdbarch_fetch_pointer_argument(struct gdbarch *gdbarch, gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument)
void set_gdbarch_ps_regnum(struct gdbarch *gdbarch, int ps_regnum)
void set_gdbarch_register_to_value(struct gdbarch *gdbarch, gdbarch_register_to_value_ftype *register_to_value)
void set_gdbarch_gen_return_address(struct gdbarch *gdbarch, gdbarch_gen_return_address_ftype *gen_return_address)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
void set_gdbarch_value_to_register(struct gdbarch *gdbarch, gdbarch_value_to_register_ftype *value_to_register)
void set_gdbarch_stap_parse_special_token(struct gdbarch *gdbarch, gdbarch_stap_parse_special_token_ftype *stap_parse_special_token)
void set_gdbarch_stap_integer_prefixes(struct gdbarch *gdbarch, const char *const *stap_integer_prefixes)
void set_gdbarch_breakpoint_kind_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_kind_from_pc_ftype *breakpoint_kind_from_pc)
void set_gdbarch_pseudo_register_read_value(struct gdbarch *gdbarch, gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value)
void set_gdbarch_frame_align(struct gdbarch *gdbarch, gdbarch_frame_align_ftype *frame_align)
void set_gdbarch_max_insn_length(struct gdbarch *gdbarch, ULONGEST max_insn_length)
void set_gdbarch_get_longjmp_target(struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype *get_longjmp_target)
void set_gdbarch_skip_prologue(struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue)
void set_gdbarch_register_name(struct gdbarch *gdbarch, gdbarch_register_name_ftype *register_name)
void set_gdbarch_push_dummy_code(struct gdbarch *gdbarch, gdbarch_push_dummy_code_ftype *push_dummy_code)
void set_gdbarch_skip_trampoline_code(struct gdbarch *gdbarch, gdbarch_skip_trampoline_code_ftype *skip_trampoline_code)
void set_gdbarch_bfloat16_format(struct gdbarch *gdbarch, const struct floatformat **bfloat16_format)
void set_gdbarch_stap_is_single_operand(struct gdbarch *gdbarch, gdbarch_stap_is_single_operand_ftype *stap_is_single_operand)
void set_gdbarch_return_value(struct gdbarch *gdbarch, gdbarch_return_value_ftype *return_value)
void set_gdbarch_decr_pc_after_break(struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break)
void set_gdbarch_gnu_triplet_regexp(struct gdbarch *gdbarch, gdbarch_gnu_triplet_regexp_ftype *gnu_triplet_regexp)
int gdbarch_num_regs(struct gdbarch *gdbarch)
void set_gdbarch_fp0_regnum(struct gdbarch *gdbarch, int fp0_regnum)
void set_gdbarch_inner_than(struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than)
void set_gdbarch_stap_register_indirection_prefixes(struct gdbarch *gdbarch, const char *const *stap_register_indirection_prefixes)
void set_gdbarch_sp_regnum(struct gdbarch *gdbarch, int sp_regnum)
void set_gdbarch_register_reggroup_p(struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *register_reggroup_p)
void set_gdbarch_ax_pseudo_register_collect(struct gdbarch *gdbarch, gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect)
void set_gdbarch_long_double_format(struct gdbarch *gdbarch, const struct floatformat **long_double_format)
void set_gdbarch_pc_regnum(struct gdbarch *gdbarch, int pc_regnum)
void set_gdbarch_call_dummy_location(struct gdbarch *gdbarch, enum call_dummy_location_type call_dummy_location)
void set_gdbarch_print_insn(struct gdbarch *gdbarch, gdbarch_print_insn_ftype *print_insn)
int gdbarch_long_double_bit(struct gdbarch *gdbarch)
void set_gdbarch_pseudo_register_write(struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype *pseudo_register_write)
void set_gdbarch_num_pseudo_regs(struct gdbarch *gdbarch, int num_pseudo_regs)
void set_gdbarch_dwarf2_reg_to_regnum(struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum)
bool gdbarch_iterate_over_regset_sections_p(struct gdbarch *gdbarch)
void set_gdbarch_insn_is_ret(struct gdbarch *gdbarch, gdbarch_insn_is_ret_ftype *insn_is_ret)
void set_gdbarch_convert_register_p(struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype *convert_register_p)
void set_gdbarch_type_align(struct gdbarch *gdbarch, gdbarch_type_align_ftype *type_align)
void set_gdbarch_fast_tracepoint_valid_at(struct gdbarch *gdbarch, gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at)
void set_gdbarch_insn_is_call(struct gdbarch *gdbarch, gdbarch_insn_is_call_ftype *insn_is_call)
void set_gdbarch_num_regs(struct gdbarch *gdbarch, int num_regs)
const struct bfd_arch_info * gdbarch_bfd_arch_info(struct gdbarch *gdbarch)
void set_gdbarch_long_double_bit(struct gdbarch *gdbarch, int long_double_bit)
void set_gdbarch_sw_breakpoint_from_kind(struct gdbarch *gdbarch, gdbarch_sw_breakpoint_from_kind_ftype *sw_breakpoint_from_kind)
int gdbarch_ptr_bit(struct gdbarch *gdbarch)
void set_gdbarch_sdb_reg_to_regnum(struct gdbarch *gdbarch, gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum)
void set_gdbarch_stap_register_prefixes(struct gdbarch *gdbarch, const char *const *stap_register_prefixes)
void set_gdbarch_dummy_id(struct gdbarch *gdbarch, gdbarch_dummy_id_ftype *dummy_id)
void set_gdbarch_relocate_instruction(struct gdbarch *gdbarch, gdbarch_relocate_instruction_ftype *relocate_instruction)
void set_gdbarch_print_float_info(struct gdbarch *gdbarch, gdbarch_print_float_info_ftype *print_float_info)
void set_gdbarch_stap_register_indirection_suffixes(struct gdbarch *gdbarch, const char *const *stap_register_indirection_suffixes)
ULONGEST gdbarch_max_insn_length(struct gdbarch *gdbarch)
void set_gdbarch_floatformat_for_type(struct gdbarch *gdbarch, gdbarch_floatformat_for_type_ftype *floatformat_for_type)
void set_gdbarch_push_dummy_call(struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call)
void set_gdbarch_in_indirect_branch_thunk(struct gdbarch *gdbarch, gdbarch_in_indirect_branch_thunk_ftype *in_indirect_branch_thunk)
void set_gdbarch_iterate_over_regset_sections(struct gdbarch *gdbarch, gdbarch_iterate_over_regset_sections_ftype *iterate_over_regset_sections)
void set_gdbarch_stap_adjust_register(struct gdbarch *gdbarch, gdbarch_stap_adjust_register_ftype *stap_adjust_register)
void set_gdbarch_frame_args_skip(struct gdbarch *gdbarch, CORE_ADDR frame_args_skip)
struct gdbarch * gdbarch_alloc(const struct gdbarch_info *info, struct gdbarch_tdep_base *tdep)
void() iterate_over_regset_sections_cb(const char *sect_name, int supply_size, int collect_size, const struct regset *regset, const char *human_name, void *cb_data)
static int gdbarch_num_cooked_regs(gdbarch *arch)
function_call_return_method
struct type * lookup_pointer_type(struct type *type)
int field_is_static(struct field *f)
struct type * arch_composite_type(struct gdbarch *gdbarch, const char *name, enum type_code code)
const struct floatformat * floatformats_ieee_quad[BFD_ENDIAN_UNKNOWN]
struct type * init_vector_type(struct type *elt_type, int n)
const struct floatformat * floatformats_bfloat16[BFD_ENDIAN_UNKNOWN]
void append_composite_type_field(struct type *t, const char *name, struct type *field)
const struct floatformat * floatformats_i387_ext[BFD_ENDIAN_UNKNOWN]
struct type * check_typedef(struct type *type)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int status
static void append_insns(CORE_ADDR *to, ULONGEST len, const gdb_byte *buf)
int i386_svr4_reg_to_regnum(struct gdbarch *gdbarch, int reg)
void i386_iterate_over_regset_sections(struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
bool i386_pkru_regnum_p(struct gdbarch *gdbarch, int regnum)
static CORE_ADDR i386_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)
static struct value * i386_frame_prev_register(frame_info_ptr this_frame, void **this_cache, int regnum)
static CORE_ADDR i386_analyze_struct_return(CORE_ADDR pc, CORE_ADDR current_pc, struct i386_frame_cache *cache)
int i386_sigtramp_p(frame_info_ptr this_frame)
int i386_bnd_regnum_p(struct gdbarch *gdbarch, int regnum)
static int i386_mmx_regnum_p(struct gdbarch *gdbarch, int regnum)
static int i386_match_insn_block(CORE_ADDR pc, struct i386_insn *insn_patterns)
static struct frame_id i386_dummy_id(struct gdbarch *gdbarch, frame_info_ptr this_frame)
static struct cmd_list_element * mpx_show_cmdlist
#define I386_MAX_MATCHED_INSN_LEN
static int i386_stack_frame_destroyed_p(struct gdbarch *gdbarch, CORE_ADDR pc)
static enum return_value_convention i386_return_value(struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
static enum unwind_stop_reason i386_frame_unwind_stop_reason(frame_info_ptr this_frame, void **this_cache)
static CORE_ADDR i386_push_dummy_code(struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache)
int i386_fp_regnum_p(struct gdbarch *gdbarch, int regnum)
int i386_zmm_regnum_p(struct gdbarch *gdbarch, int regnum)
struct type * i387_ext_type(struct gdbarch *gdbarch)
const char * i386_pseudo_register_name(struct gdbarch *gdbarch, int regnum)
static const reggroup * i386_mmx_reggroup
static int i386_call_p(const gdb_byte *insn)
int i386_register_reggroup_p(struct gdbarch *gdbarch, int regnum, const struct reggroup *group)
#define HIGH_RETURN_REGNUM
const struct regset i386_fpregset
static CORE_ADDR i386_frame_align(struct gdbarch *gdbarch, CORE_ADDR sp)
static int i386_absolute_call_p(const gdb_byte *insn)
static ULONGEST i386_type_align(struct gdbarch *gdbarch, struct type *type)
static CORE_ADDR i386_frame_base_address(frame_info_ptr this_frame, void **this_cache)
#define I386_SAVE_FPU_REGS
static int i386_validate_tdesc_p(i386_gdbarch_tdep *tdep, struct tdesc_arch_data *tdesc_data)
static int i386_fast_tracepoint_valid_at(struct gdbarch *gdbarch, CORE_ADDR addr, std::string *msg)
static int i386_mpx_ctrl_regnum_p(struct gdbarch *gdbarch, int regnum)
int i386_process_record(struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR input_addr)
int i386_stap_is_single_operand(struct gdbarch *gdbarch, const char *s)
static const char *const i386_ymmh_names[]
static int i386_jmp_p(const gdb_byte *insn)
static const char *const i386_zmm_names[]
static struct gdbarch * i386_gdbarch_init(struct gdbarch_info info, struct gdbarch_list *arches)
static CORE_ADDR i386_mpx_get_bt_entry(CORE_ADDR ptr, CORE_ADDR bd_base)
static int i386_convert_register_p(struct gdbarch *gdbarch, int regnum, struct type *type)
static void i386_mpx_info_bounds(const char *args, int from_tty)
static void i386_mpx_print_bounds(const CORE_ADDR bt_entry[4])
static const char *const i386_k_names[]
static int i386_record_lea_modrm_addr(struct i386_record_s *irp, uint64_t *addr)
static enum unwind_stop_reason i386_epilogue_frame_unwind_stop_reason(frame_info_ptr this_frame, void **this_cache)
void i386_svr4_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
static void i386_collect_gregset(const struct regset *regset, const struct regcache *regcache, int regnum, void *gregs, size_t len)
static void i386_store_return_value(struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
static CORE_ADDR i386_analyze_stack_align(CORE_ADDR pc, CORE_ADDR current_pc, struct i386_frame_cache *cache)
static const char *const i386_mpx_names[]
static i386_insn i386_frame_setup_skip_insns[]
static const char *const i386_mmx_names[]
static int i386_record_push(struct i386_record_s *irp, int size)
static CORE_ADDR i386_skip_noop(CORE_ADDR pc)
static CORE_ADDR i386_skip_endbr(CORE_ADDR pc)
int i386_dword_regnum_p(struct gdbarch *gdbarch, int regnum)
static std::string i386_stap_adjust_register(struct gdbarch *gdbarch, struct stap_parse_info *p, const std::string ®name, int regnum)
static int i386_print_insn(bfd_vma pc, struct disassemble_info *info)
static void i386_init_reggroups(void)
static void i386_relocate_instruction(struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR oldloc)
static int i386_record_lea_modrm(struct i386_record_s *irp)
const struct regset i386_gregset
int i386_ymm_avx512_regnum_p(struct gdbarch *gdbarch, int regnum)
static const char * i386_gnu_triplet_regexp(struct gdbarch *gdbarch)
static int i386_ymmh_regnum_p(struct gdbarch *gdbarch, int regnum)
int i386_k_regnum_p(struct gdbarch *gdbarch, int regnum)
const int num_lower_zmm_regs
static const char *const i386_pkeys_names[]
static int i386_ymmh_avx512_regnum_p(struct gdbarch *gdbarch, int regnum)
static i386_insn i386_tramp_chain_in_reg_insns[]
const struct target_desc * i386_target_description(uint64_t xcr0, bool segments)
constexpr gdb_byte i386_break_insn[]
static void i386_frame_this_id(frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id)
void i386_pseudo_register_read_into_value(struct gdbarch *gdbarch, readable_regcache *regcache, int regnum, struct value *result_value)
int i386_ymm_regnum_p(struct gdbarch *gdbarch, int regnum)
static void i386_extract_return_value(struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, gdb_byte *valbuf)
static int i386_ret_p(const gdb_byte *insn)
static int i386_match_pattern(CORE_ADDR pc, struct i386_insn pattern)
static CORE_ADDR i386_fetch_pointer_argument(frame_info_ptr frame, int argi, struct type *type)
static void i386_add_reggroups(struct gdbarch *gdbarch)
static i386_insn i386_tramp_chain_on_stack_insns[]
static const char att_flavor[]
static struct type * i386_zmm_type(struct gdbarch *gdbarch)
static const struct frame_unwind i386_stack_tramp_frame_unwind
#define LOW_RETURN_REGNUM
static bool i386_in_indirect_branch_thunk(struct gdbarch *gdbarch, CORE_ADDR pc)
static struct type * i386_mmx_type(struct gdbarch *gdbarch)
static int i386_get_longjmp_target(frame_info_ptr frame, CORE_ADDR *pc)
void i386_pseudo_register_write(struct gdbarch *gdbarch, struct regcache *regcache, int regnum, const gdb_byte *buf)
static int i386_dbx_reg_to_regnum(struct gdbarch *gdbarch, int reg)
static int i386_reg_struct_return_p(struct gdbarch *gdbarch, struct type *type)
static struct cmd_list_element * mpx_set_cmdlist
static const char * struct_convention
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)
static struct i386_frame_cache * i386_epilogue_frame_cache(frame_info_ptr this_frame, void **this_cache)
displaced_step_copy_insn_closure_up i386_displaced_step_copy_insn(struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
#define I386_SAVE_FPU_ENV_REG_STACK
static struct type * i386_bnd_type(struct gdbarch *gdbarch)
static struct value * i386_epilogue_frame_prev_register(frame_info_ptr this_frame, void **this_cache, int regnum)
static struct value * i386_sigtramp_frame_prev_register(frame_info_ptr this_frame, void **this_cache, int regnum)
static const char reg_struct_convention[]
CORE_ADDR i386_pe_skip_trampoline_code(frame_info_ptr frame, CORE_ADDR pc, char *name)
static const char * disassembly_flavor
static const struct frame_base i386_frame_base
static const char *const i386_zmmh_names[]
#define I386_NUM_SAVED_REGS
static int i386_stack_tramp_frame_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_cache)
static CORE_ADDR i386_skip_probe(CORE_ADDR pc)
static struct type * i386_ymm_type(struct gdbarch *gdbarch)
static int i386_insn_is_call(struct gdbarch *gdbarch, CORE_ADDR addr)
static int i386_record_floats(struct gdbarch *gdbarch, struct i386_record_s *ir, uint32_t iregnum)
int i386_fpc_regnum_p(struct gdbarch *gdbarch, int regnum)
static void i386_supply_fpregset(const struct regset *regset, struct regcache *regcache, int regnum, const void *fpregs, size_t len)
static unsigned long i386_mpx_bd_base(void)
static const char pcc_struct_convention[]
static CORE_ADDR i386_analyze_register_saves(CORE_ADDR pc, CORE_ADDR current_pc, struct i386_frame_cache *cache)
static void i386_collect_fpregset(const struct regset *regset, const struct regcache *regcache, int regnum, void *fpregs, size_t len)
#define I386_RECORD_FULL_ARCH_LIST_ADD_REG(regnum)
int i386_xmm_avx512_regnum_p(struct gdbarch *gdbarch, int regnum)
static const struct frame_unwind i386_sigtramp_frame_unwind
static CORE_ADDR i386_unwind_pc(struct gdbarch *gdbarch, frame_info_ptr next_frame)
static const char * i386_register_name(struct gdbarch *gdbarch, int regnum)
static void i386_epilogue_frame_this_id(frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id)
static const char *const i386_ymm_names[]
#define I386_SAVE_FPU_ENV
static const char *const valid_flavors[]
static int i386_bndr_regnum_p(struct gdbarch *gdbarch, int regnum)
static struct i386_frame_cache * i386_alloc_frame_cache(void)
static struct i386_insn * i386_match_insn(CORE_ADDR pc, struct i386_insn *insn_patterns)
static const reggroup * i386_sse_reggroup
static CORE_ADDR i386_skip_prologue(struct gdbarch *gdbarch, CORE_ADDR start_pc)
static void i386_gen_return_address(struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope)
static int i386_svr4_dwarf_reg_to_regnum(struct gdbarch *gdbarch, int reg)
static int i386_sigtramp_frame_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_prologue_cache)
static int i386_next_regnum(int regnum)
static expr::operation_up i386_stap_parse_special_token_three_arg_disp(struct gdbarch *gdbarch, struct stap_parse_info *p)
CORE_ADDR i386_skip_main_prologue(struct gdbarch *gdbarch, CORE_ADDR pc)
int i386_byte_regnum_p(struct gdbarch *gdbarch, int regnum)
int i386_xmm_regnum_p(struct gdbarch *gdbarch, int regnum)
static int i386_register_to_value(frame_info_ptr frame, int regnum, struct type *type, gdb_byte *to, int *optimizedp, int *unavailablep)
static const struct frame_unwind i386_frame_unwind
static int i386_syscall_p(const gdb_byte *insn, int *lengthp)
int i386_ax_pseudo_register_collect(struct gdbarch *gdbarch, struct agent_expr *ax, int regnum)
static const char intel_flavor[]
void i386_elf_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
static void i386_frame_cache_1(frame_info_ptr this_frame, struct i386_frame_cache *cache)
static CORE_ADDR i386_analyze_frame_setup(struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR limit, struct i386_frame_cache *cache)
static const struct floatformat ** i386_floatformat_for_type(struct gdbarch *gdbarch, const char *name, int len)
static int i386_absolute_jmp_p(const gdb_byte *insn)
static enum unwind_stop_reason i386_sigtramp_frame_unwind_stop_reason(frame_info_ptr this_frame, void **this_cache)
static const int i386_record_regmap[]
static void i386_value_to_register(frame_info_ptr frame, int regnum, struct type *type, const gdb_byte *from)
static CORE_ADDR i386_follow_jump(struct gdbarch *gdbarch, CORE_ADDR pc)
static int i386_record_modrm(struct i386_record_s *irp)
static struct i386_frame_cache * i386_sigtramp_frame_cache(frame_info_ptr this_frame, void **this_cache)
static int i386_insn_is_ret(struct gdbarch *gdbarch, CORE_ADDR addr)
void i386_displaced_step_fixup(struct gdbarch *gdbarch, struct displaced_step_copy_insn_closure *closure_, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
static const char *const i386_bnd_names[]
static int i386_epilogue_frame_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_prologue_cache)
static int i386_svr4_sigtramp_p(frame_info_ptr this_frame)
static const char *const i386_word_names[]
static int i386_16_byte_align_p(struct type *type)
static const char *const i386_register_names[]
static int i386_mxcsr_regnum_p(struct gdbarch *gdbarch, int regnum)
static void i386_mpx_set_bounds(const char *args, int from_tty)
expr::operation_up i386_stap_parse_special_token(struct gdbarch *gdbarch, struct stap_parse_info *p)
static const struct frame_unwind i386_epilogue_frame_unwind
static expr::operation_up i386_stap_parse_special_token_triplet(struct gdbarch *gdbarch, struct stap_parse_info *p)
static const char default_struct_convention[]
void _initialize_i386_tdep()
void i386_supply_gregset(const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len)
static int i386_in_stack_tramp_p(CORE_ADDR pc)
static const char *const i386_byte_names[]
static int i386_mmx_regnum_to_fp_regnum(readable_regcache *regcache, int regnum)
static struct value * i386_pseudo_register_read_value(struct gdbarch *gdbarch, readable_regcache *regcache, int regnum)
static int i386_insn_is_jump(struct gdbarch *gdbarch, CORE_ADDR addr)
static CORE_ADDR i386_svr4_sigcontext_addr(frame_info_ptr this_frame)
static const char *const valid_conventions[]
int i386_word_regnum_p(struct gdbarch *gdbarch, int regnum)
int i386_zmmh_regnum_p(struct gdbarch *gdbarch, int regnum)
static CORE_ADDR i386_analyze_prologue(struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR current_pc, struct i386_frame_cache *cache)
int i386_mpx_enabled(void)
static void i386_sigtramp_frame_this_id(frame_info_ptr this_frame, void **this_cache, struct frame_id *this_id)
struct type * i386_pseudo_register_type(struct gdbarch *gdbarch, int regnum)
#define I386_MAX_REGISTER_SIZE
#define I386_MAX_INSN_LEN
@ X86_RECORD_EFLAGS_REGNUM
target_desc * i386_create_target_description(uint64_t xcr0, bool is_linux, bool segments)
void i387_value_to_register(frame_info_ptr frame, int regnum, struct type *type, const gdb_byte *from)
void i387_supply_fxsave(struct regcache *regcache, int regnum, const void *fxsave)
void i387_collect_fxsave(const struct regcache *regcache, int regnum, void *fxsave)
void i387_reset_bnd_regs(struct gdbarch *gdbarch, struct regcache *regcache)
int i387_convert_register_p(struct gdbarch *gdbarch, int regnum, struct type *type)
void i387_supply_fsave(struct regcache *regcache, int regnum, const void *fsave)
void i387_collect_fsave(const struct regcache *regcache, int regnum, void *fsave)
int i387_register_to_value(frame_info_ptr frame, int regnum, struct type *type, gdb_byte *to, int *optimizedp, int *unavailablep)
void i387_print_float_info(struct gdbarch *gdbarch, struct ui_file *file, frame_info_ptr frame, const char *args)
#define I387_XMM0_REGNUM(tdep)
#define I387_ST0_REGNUM(tdep)
#define I387_YMM0_REGNUM(tdep)
#define I387_XMM16_REGNUM(tdep)
#define I387_NUM_MPX_REGS
#define I387_BND0R_REGNUM(tdep)
#define I387_NUM_BND_REGS
#define I387_YMM16H_REGNUM(tdep)
#define I387_SIZEOF_FSAVE
#define I387_NUM_PKEYS_REGS
#define I387_FSTAT_REGNUM(tdep)
#define I387_FOP_REGNUM(tdep)
#define I387_SIZEOF_FXSAVE
#define I387_FCTRL_REGNUM(tdep)
#define I387_NUM_XMM_AVX512_REGS(tdep)
#define I387_MXCSR_REGNUM(tdep)
#define I387_BNDCFGU_REGNUM(tdep)
#define I387_MM0_REGNUM(tdep)
#define I387_NUM_MPX_CTRL_REGS
#define I387_PKRU_REGNUM(tdep)
#define I387_FTAG_REGNUM(tdep)
#define I387_NUM_XMM_REGS(tdep)
CORE_ADDR find_function_addr(struct value *function, struct type **retval_type, struct type **function_type)
std::string displaced_step_dump_bytes(const gdb_byte *buf, size_t len)
obj_section * maint_obj_section_from_bfd_section(bfd *abfd, asection *asection, objfile *ofile)
CORE_ADDR find_solib_trampoline_target(frame_info_ptr frame, CORE_ADDR pc)
struct bound_minimal_symbol lookup_minimal_symbol_by_pc(CORE_ADDR pc)
std::unique_ptr< operation > operation_up
struct obj_section * find_pc_section(CORE_ADDR pc)
static int in_plt_section(CORE_ADDR pc)
void gdbarch_register_osabi(enum bfd_architecture arch, unsigned long machine, enum gdb_osabi osabi, void(*init_osabi)(struct gdbarch_info, struct gdbarch *))
void gdbarch_init_osabi(struct gdbarch_info info, struct gdbarch *gdbarch)
bool producer_is_llvm(const char *producer)
bool producer_is_icc_ge_19(const char *producer)
bool record_full_memory_query
int record_full_arch_list_add_reg(struct regcache *regcache, int regnum)
int record_full_arch_list_add_mem(CORE_ADDR addr, int len)
int record_full_arch_list_add_end(void)
unsigned int record_debug
int record_read_memory(struct gdbarch *gdbarch, CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
enum register_status regcache_raw_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
int register_size(struct gdbarch *gdbarch, int regnum)
enum register_status regcache_cooked_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
void regcache_raw_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
struct regcache * get_current_regcache(void)
void regcache_cooked_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
struct type * register_type(struct gdbarch *gdbarch, int regnum)
const reggroup *const general_reggroup
int default_register_reggroup_p(struct gdbarch *gdbarch, int regnum, const struct reggroup *group)
const reggroup * reggroup_new(const char *name, enum reggroup_type type)
const reggroup *const float_reggroup
const reggroup *const all_reggroup
void reggroup_add(struct gdbarch *gdbarch, const reggroup *group)
const reggroup *const vector_reggroup
void register_remote_support_xml(const char *xml)
struct minimal_symbol * minsym
struct type * builtin_double
struct type * builtin_int8
struct type * builtin_long
struct type * builtin_data_ptr
struct type * builtin_int64
struct type * builtin_int32
struct type * builtin_half
struct type * builtin_bfloat16
struct type * builtin_int128
struct type * builtin_int16
struct type * builtin_float
bool epilogue_unwind_valid() const
const char * producer() const
struct type * type() const
const char * linkage_name() const
CORE_ADDR saved_regs[I386_NUM_SAVED_REGS]
const char *const * mpx_register_names
struct type * i386_bnd_type
const struct regset * fpregset
const char *const * zmmh_register_names
struct type * i387_ext_type
const char *const * k_register_names
struct type * i386_mmx_type
const char *const * register_names
int(* sigtramp_p)(frame_info_ptr)
const char *const * xmm_avx512_register_names
gdbarch_register_reggroup_p_ftype * register_reggroup_p
CORE_ADDR(* sigcontext_addr)(frame_info_ptr)
const char *const * pkeys_register_names
const char *const * ymmh_register_names
struct type * i386_zmm_type
const struct target_desc * tdesc
const int * record_regmap
struct type * i386_ymm_type
const char *const * ymm16h_register_names
gdb_byte mask[I386_MAX_MATCHED_INSN_LEN]
gdb_byte insn[I386_MAX_MATCHED_INSN_LEN]
struct regcache * regcache
struct type * target_type() const
struct field & field(int idx) const
void set_name(const char *name)
void set_is_vector(bool is_vector)
struct compunit_symtab * find_pc_compunit_symtab(CORE_ADDR pc)
CORE_ADDR skip_prologue_using_sal(struct gdbarch *gdbarch, CORE_ADDR func_addr)
tdesc_arch_data_up tdesc_data_alloc(void)
const struct tdesc_feature * tdesc_find_feature(const struct target_desc *target_desc, const char *name)
int tdesc_numbered_register(const struct tdesc_feature *feature, struct tdesc_arch_data *data, int regno, const char *name)
static const registry< gdbarch >::key< tdesc_arch_data > tdesc_data
void tdesc_use_registers(struct gdbarch *gdbarch, const struct target_desc *target_desc, tdesc_arch_data_up &&early_data, tdesc_unknown_register_ftype unk_reg_cb)
void set_tdesc_pseudo_register_name(struct gdbarch *gdbarch, gdbarch_register_name_ftype *pseudo_name)
int tdesc_has_registers(const struct target_desc *target_desc)
void set_tdesc_pseudo_register_type(struct gdbarch *gdbarch, gdbarch_register_type_ftype *pseudo_type)
const char * tdesc_register_name(struct gdbarch *gdbarch, int regno)
struct type * tdesc_find_type(struct gdbarch *gdbarch, const char *id)
std::unique_ptr< tdesc_arch_data, tdesc_arch_data_deleter > tdesc_arch_data_up
void target_float_convert(const gdb_byte *from, const struct type *from_type, gdb_byte *to, const struct type *to_type)
int target_get_min_fast_tracepoint_insn_len()
int target_read_code(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
int target_write_memory(CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
int user_reg_map_name_to_regnum(struct gdbarch *gdbarch, const char *name, int len)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
int yquery(const char *ctlstr,...)
void gdb_printf(struct ui_file *stream, const char *format,...)
struct type * value_type(const struct value *value)
gdb::array_view< const gdb_byte > value_contents_all(struct value *value)
struct value * allocate_value(struct type *type)
CORE_ADDR value_as_address(struct value *val)
void mark_value_bytes_unavailable(struct value *value, LONGEST offset, LONGEST length)
gdb::array_view< gdb_byte > value_contents_raw(struct value *value)
struct type * value_enclosing_type(const struct value *value)
#define VALUE_REGNUM(val)
static void check(BOOL ok, const char *file, int line)
bool x86_in_indirect_branch_thunk(CORE_ADDR pc, const char *const *register_names, int lo, int hi)