33 #include "elf/common.h"
96 static struct target_desc *tdesc_amd64_linux_no_xml;
101 static unsigned char jump_insn[] = { 0xe9, 0, 0, 0, 0 };
107 <architecture>i386</architecture>\
108 <osabi>GNU/Linux</osabi>\
112 static const char *xmltarget_amd64_linux_no_xml =
"@<target>\
113 <architecture>i386:x86-64</architecture>\
114 <osabi>GNU/Linux</osabi>\
119 #include <sys/procfs.h>
120 #include <sys/ptrace.h>
123 #ifndef PTRACE_GET_THREAD_AREA
124 #define PTRACE_GET_THREAD_AREA 25
128 #ifndef PTRACE_ARCH_PRCTL
129 #define PTRACE_ARCH_PRCTL 30
135 #define ARCH_SET_GS 0x1001
136 #define ARCH_SET_FS 0x1002
137 #define ARCH_GET_FS 0x1003
138 #define ARCH_GET_GS 0x1004
155 RAX * 8, RCX * 8, RDX * 8, RBX * 8,
156 RSP * 8, RBP * 8, RSI * 8, RDI * 8,
157 RIP * 8, EFLAGS * 8, CS * 8, SS * 8,
158 DS * 8, ES * 8, FS * 8, GS * 8
161 #define I386_NUM_REGS (sizeof (i386_regmap) / sizeof (i386_regmap[0]))
164 #define ORIG_EAX ORIG_RAX
167 static const int x86_64_regmap[] =
169 RAX * 8, RBX * 8, RCX * 8, RDX * 8,
170 RSI * 8, RDI * 8, RBP * 8, RSP * 8,
171 R8 * 8, R9 * 8, R10 * 8, R11 * 8,
172 R12 * 8, R13 * 8, R14 * 8, R15 * 8,
173 RIP * 8, EFLAGS * 8, CS * 8, SS * 8,
174 DS * 8, ES * 8, FS * 8, GS * 8,
175 -1, -1, -1, -1, -1, -1, -1, -1,
176 -1, -1, -1, -1, -1, -1, -1, -1,
177 -1, -1, -1, -1, -1, -1, -1, -1,
179 -1, -1, -1, -1, -1, -1, -1, -1,
183 -1, -1, -1, -1, -1, -1, -1, -1,
184 -1, -1, -1, -1, -1, -1, -1, -1,
185 -1, -1, -1, -1, -1, -1, -1, -1,
186 -1, -1, -1, -1, -1, -1, -1, -1,
187 -1, -1, -1, -1, -1, -1, -1, -1,
188 -1, -1, -1, -1, -1, -1, -1, -1,
189 -1, -1, -1, -1, -1, -1, -1, -1,
190 -1, -1, -1, -1, -1, -1, -1, -1,
191 -1, -1, -1, -1, -1, -1, -1, -1
194 #define X86_64_NUM_REGS (sizeof (x86_64_regmap) / sizeof (x86_64_regmap[0]))
195 #define X86_64_USER_REGS (GS + 1)
201 static int i386_regmap[] =
203 EAX * 4, ECX * 4, EDX * 4, EBX * 4,
204 UESP * 4, EBP * 4, ESI * 4, EDI * 4,
205 EIP * 4, EFL * 4, CS * 4, SS * 4,
206 DS * 4, ES * 4, FS * 4, GS * 4
209 #define I386_NUM_REGS (sizeof (i386_regmap) / sizeof (i386_regmap[0]))
221 is_64bit_tdesc (
void)
235 lwpid_t lwpid,
int idx,
void **base)
238 int use_64bit = is_64bit_tdesc ();
260 unsigned int desc[4];
263 (
void *) (intptr_t) idx, (
unsigned long) &desc) < 0)
267 *base = (
void *) (uintptr_t) desc[1];
281 int use_64bit = is_64bit_tdesc ();
300 unsigned int desc[4];
302 const int reg_thread_area = 3;
307 idx = gs >> reg_thread_area;
311 (
void *) (
long) idx, (
unsigned long) &desc) < 0)
325 if (is_64bit_tdesc ())
336 if (is_64bit_tdesc ())
351 for (i = 0; i < X86_64_NUM_REGS; i++)
352 if (x86_64_regmap[i] != -1)
359 memset (buf, 0x00, X86_64_USER_REGS * 8);
366 ((
char *) buf) + ORIG_EAX *
REGSIZE);
377 for (i = 0; i < X86_64_NUM_REGS; i++)
378 if (x86_64_regmap[i] != -1)
388 ((
char *) buf) + ORIG_EAX *
REGSIZE);
448 #ifdef HAVE_PTRACE_GETREGS
449 { PTRACE_GETREGS, PTRACE_SETREGS, 0,
sizeof (elf_gregset_t),
455 # ifdef HAVE_PTRACE_GETFPXREGS
456 { PTRACE_GETFPXREGS, PTRACE_SETFPXREGS, 0,
sizeof (elf_fpxregset_t),
461 { PTRACE_GETFPREGS, PTRACE_SETFPREGS, 0,
sizeof (elf_fpregset_t),
465 { 0, 0, 0, -1, -1, NULL, NULL }
494 unsigned long newpc = pc;
499 unsigned int newpc = pc;
504 static const unsigned char x86_breakpoint[] = { 0xCC };
505 #define x86_breakpoint_len 1
678 typedef int compat_int_t;
679 typedef unsigned int compat_uptr_t;
681 typedef int compat_time_t;
682 typedef int compat_timer_t;
683 typedef int compat_clock_t;
685 struct compat_timeval
687 compat_time_t tv_sec;
691 typedef union compat_sigval
693 compat_int_t sival_int;
694 compat_uptr_t sival_ptr;
697 typedef struct compat_siginfo
705 int _pad[((128 /
sizeof (int)) - 3)];
719 compat_sigval_t _sigval;
727 compat_sigval_t _sigval;
736 compat_clock_t _utime;
737 compat_clock_t _stime;
756 typedef long __attribute__ ((__aligned__ (4))) compat_x32_clock_t;
758 typedef struct compat_x32_siginfo
766 int _pad[((128 /
sizeof (int)) - 3)];
780 compat_sigval_t _sigval;
788 compat_sigval_t _sigval;
797 compat_x32_clock_t _utime;
798 compat_x32_clock_t _stime;
816 #define cpt_si_pid _sifields._kill._pid
817 #define cpt_si_uid _sifields._kill._uid
818 #define cpt_si_timerid _sifields._timer._tid
819 #define cpt_si_overrun _sifields._timer._overrun
820 #define cpt_si_status _sifields._sigchld._status
821 #define cpt_si_utime _sifields._sigchld._utime
822 #define cpt_si_stime _sifields._sigchld._stime
823 #define cpt_si_ptr _sifields._rt._sigval.sival_ptr
824 #define cpt_si_addr _sifields._sigfault._addr
825 #define cpt_si_band _sifields._sigpoll._band
826 #define cpt_si_fd _sifields._sigpoll._fd
831 #define si_timerid si_timer1
834 #define si_overrun si_timer2
838 compat_siginfo_from_siginfo (compat_siginfo_t *to, siginfo_t *from)
840 memset (to, 0,
sizeof (*to));
842 to->si_signo = from->si_signo;
843 to->si_errno = from->si_errno;
844 to->si_code = from->si_code;
846 if (to->si_code == SI_TIMER)
848 to->cpt_si_timerid = from->si_timerid;
849 to->cpt_si_overrun = from->si_overrun;
850 to->cpt_si_ptr = (intptr_t) from->si_ptr;
852 else if (to->si_code == SI_USER)
854 to->cpt_si_pid = from->si_pid;
855 to->cpt_si_uid = from->si_uid;
857 else if (to->si_code < 0)
859 to->cpt_si_pid = from->si_pid;
860 to->cpt_si_uid = from->si_uid;
861 to->cpt_si_ptr = (intptr_t) from->si_ptr;
865 switch (to->si_signo)
868 to->cpt_si_pid = from->si_pid;
869 to->cpt_si_uid = from->si_uid;
870 to->cpt_si_status = from->si_status;
871 to->cpt_si_utime = from->si_utime;
872 to->cpt_si_stime = from->si_stime;
878 to->cpt_si_addr = (intptr_t) from->si_addr;
881 to->cpt_si_band = from->si_band;
882 to->cpt_si_fd = from->si_fd;
885 to->cpt_si_pid = from->si_pid;
886 to->cpt_si_uid = from->si_uid;
887 to->cpt_si_ptr = (intptr_t) from->si_ptr;
894 siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from)
896 memset (to, 0,
sizeof (*to));
898 to->si_signo = from->si_signo;
899 to->si_errno = from->si_errno;
900 to->si_code = from->si_code;
902 if (to->si_code == SI_TIMER)
904 to->si_timerid = from->cpt_si_timerid;
905 to->si_overrun = from->cpt_si_overrun;
906 to->si_ptr = (
void *) (intptr_t) from->cpt_si_ptr;
908 else if (to->si_code == SI_USER)
910 to->si_pid = from->cpt_si_pid;
911 to->si_uid = from->cpt_si_uid;
913 else if (to->si_code < 0)
915 to->si_pid = from->cpt_si_pid;
916 to->si_uid = from->cpt_si_uid;
917 to->si_ptr = (
void *) (intptr_t) from->cpt_si_ptr;
921 switch (to->si_signo)
924 to->si_pid = from->cpt_si_pid;
925 to->si_uid = from->cpt_si_uid;
926 to->si_status = from->cpt_si_status;
927 to->si_utime = from->cpt_si_utime;
928 to->si_stime = from->cpt_si_stime;
934 to->si_addr = (
void *) (intptr_t) from->cpt_si_addr;
937 to->si_band = from->cpt_si_band;
938 to->si_fd = from->cpt_si_fd;
941 to->si_pid = from->cpt_si_pid;
942 to->si_uid = from->cpt_si_uid;
943 to->si_ptr = (
void* ) (intptr_t) from->cpt_si_ptr;
950 compat_x32_siginfo_from_siginfo (compat_x32_siginfo_t *to,
953 memset (to, 0,
sizeof (*to));
955 to->si_signo = from->si_signo;
956 to->si_errno = from->si_errno;
957 to->si_code = from->si_code;
959 if (to->si_code == SI_TIMER)
961 to->cpt_si_timerid = from->si_timerid;
962 to->cpt_si_overrun = from->si_overrun;
963 to->cpt_si_ptr = (intptr_t) from->si_ptr;
965 else if (to->si_code == SI_USER)
967 to->cpt_si_pid = from->si_pid;
968 to->cpt_si_uid = from->si_uid;
970 else if (to->si_code < 0)
972 to->cpt_si_pid = from->si_pid;
973 to->cpt_si_uid = from->si_uid;
974 to->cpt_si_ptr = (intptr_t) from->si_ptr;
978 switch (to->si_signo)
981 to->cpt_si_pid = from->si_pid;
982 to->cpt_si_uid = from->si_uid;
983 to->cpt_si_status = from->si_status;
984 to->cpt_si_utime = from->si_utime;
985 to->cpt_si_stime = from->si_stime;
991 to->cpt_si_addr = (intptr_t) from->si_addr;
994 to->cpt_si_band = from->si_band;
995 to->cpt_si_fd = from->si_fd;
998 to->cpt_si_pid = from->si_pid;
999 to->cpt_si_uid = from->si_uid;
1000 to->cpt_si_ptr = (intptr_t) from->si_ptr;
1007 siginfo_from_compat_x32_siginfo (siginfo_t *to,
1008 compat_x32_siginfo_t *from)
1010 memset (to, 0,
sizeof (*to));
1012 to->si_signo = from->si_signo;
1013 to->si_errno = from->si_errno;
1014 to->si_code = from->si_code;
1016 if (to->si_code == SI_TIMER)
1018 to->si_timerid = from->cpt_si_timerid;
1019 to->si_overrun = from->cpt_si_overrun;
1020 to->si_ptr = (
void *) (intptr_t) from->cpt_si_ptr;
1022 else if (to->si_code == SI_USER)
1024 to->si_pid = from->cpt_si_pid;
1025 to->si_uid = from->cpt_si_uid;
1027 else if (to->si_code < 0)
1029 to->si_pid = from->cpt_si_pid;
1030 to->si_uid = from->cpt_si_uid;
1031 to->si_ptr = (
void *) (intptr_t) from->cpt_si_ptr;
1035 switch (to->si_signo)
1038 to->si_pid = from->cpt_si_pid;
1039 to->si_uid = from->cpt_si_uid;
1040 to->si_status = from->cpt_si_status;
1041 to->si_utime = from->cpt_si_utime;
1042 to->si_stime = from->cpt_si_stime;
1048 to->si_addr = (
void *) (intptr_t) from->cpt_si_addr;
1051 to->si_band = from->cpt_si_band;
1052 to->si_fd = from->cpt_si_fd;
1055 to->si_pid = from->cpt_si_pid;
1056 to->si_uid = from->cpt_si_uid;
1057 to->si_ptr = (
void* ) (intptr_t) from->cpt_si_ptr;
1075 unsigned int machine;
1080 if (!is_64bit_tdesc ())
1082 gdb_assert (
sizeof (siginfo_t) ==
sizeof (compat_siginfo_t));
1085 compat_siginfo_from_siginfo ((
struct compat_siginfo *) inf, native);
1087 siginfo_from_compat_siginfo (native, (
struct compat_siginfo *) inf);
1092 else if (!is_elf64 &&
sizeof (
void *) == 8)
1094 gdb_assert (
sizeof (siginfo_t) ==
sizeof (compat_x32_siginfo_t));
1097 compat_x32_siginfo_from_siginfo ((
struct compat_x32_siginfo *) inf,
1100 siginfo_from_compat_x32_siginfo (native,
1101 (
struct compat_x32_siginfo *) inf);
1131 #define I386_LINUX_XSAVE_XCR0_OFFSET 464
1136 int have_ptrace_getfpxregs =
1137 #ifdef HAVE_PTRACE_GETFPXREGS
1145 static int have_ptrace_getregset = -1;
1152 unsigned int machine;
1156 static uint64_t xcr0;
1157 struct regset_info *regset;
1163 if (
sizeof (
void *) == 4)
1166 error (
_(
"Can't debug 64-bit process with 32-bit GDBserver"));
1168 else if (machine == EM_X86_64)
1169 error (
_(
"Can't debug x86-64 process with 32-bit GDBserver"));
1173 #if !defined __x86_64__ && defined HAVE_PTRACE_GETFPXREGS
1174 if (machine == EM_386 && have_ptrace_getfpxregs == -1)
1176 elf_fpxregset_t fpxregs;
1178 if (ptrace (PTRACE_GETFPXREGS, tid, 0, (
long) &fpxregs) < 0)
1180 have_ptrace_getfpxregs = 0;
1181 have_ptrace_getregset = 0;
1185 have_ptrace_getfpxregs = 1;
1195 if (machine == EM_X86_64)
1196 return tdesc_amd64_linux_no_xml;
1202 if (have_ptrace_getregset == -1)
1207 iov.iov_base = xstateregs;
1208 iov.iov_len =
sizeof (xstateregs);
1212 (
unsigned int) NT_X86_XSTATE, (long) &iov) < 0)
1213 have_ptrace_getregset = 0;
1216 have_ptrace_getregset = 1;
1220 /
sizeof (uint64_t))];
1223 for (regset = x86_regsets;
1224 regset->fill_function != NULL; regset++)
1227 else if (regset->type != GENERAL_REGS)
1233 xcr0_features = (have_ptrace_getregset
1239 if (machine == EM_X86_64)
1318 int pid = *(
int *) data;
1367 if (query != NULL &&
startswith (query,
"xmlRegisters="))
1369 char *copy =
xstrdup (query + 13);
1372 for (p = strtok (copy,
","); p != NULL; p = strtok (NULL,
","))
1374 if (strcmp (p,
"i386") == 0)
1389 static struct regsets_info x86_regsets_info =
1397 static struct regs_info amd64_linux_regs_info =
1421 if (is_64bit_tdesc ())
1422 return &amd64_linux_regs_info;
1453 unsigned char *buf_org = buf;
1458 unsigned long ul = strtoul (op, &endptr, 16);
1467 return buf - buf_org;
1485 unsigned char *jjump_pad_insn,
1491 unsigned char buf[40];
1510 buf[i++] = 0x41; buf[i++] = 0x57;
1511 buf[i++] = 0x41; buf[i++] = 0x56;
1512 buf[i++] = 0x41; buf[i++] = 0x55;
1513 buf[i++] = 0x41; buf[i++] = 0x54;
1514 buf[i++] = 0x41; buf[i++] = 0x53;
1515 buf[i++] = 0x41; buf[i++] = 0x52;
1516 buf[i++] = 0x41; buf[i++] = 0x51;
1517 buf[i++] = 0x41; buf[i++] = 0x50;
1521 *((
unsigned long *)(buf + i)) = (
unsigned long) tpaddr;
1522 i +=
sizeof (
unsigned long);
1530 memcpy (buf + i, &tpoint, 8);
1534 "64 48 8b 04 25 00 00 00 00");
1541 memcpy (&buf[i], (
void *) &lockaddr, 8);
1560 memcpy (buf + i, &tpoint, 8);
1568 memcpy (buf + i, &collector, 8);
1577 memcpy (buf + i, &lockaddr, 8);
1593 buf[i++] = 0x41; buf[i++] = 0x58;
1594 buf[i++] = 0x41; buf[i++] = 0x59;
1595 buf[i++] = 0x41; buf[i++] = 0x5a;
1596 buf[i++] = 0x41; buf[i++] = 0x5b;
1597 buf[i++] = 0x41; buf[i++] = 0x5c;
1598 buf[i++] = 0x41; buf[i++] = 0x5d;
1599 buf[i++] = 0x41; buf[i++] = 0x5e;
1600 buf[i++] = 0x41; buf[i++] = 0x5f;
1613 *adjusted_insn_addr = buildaddr;
1615 *adjusted_insn_addr_end = buildaddr;
1619 loffset = (tpaddr + orig_size) - (buildaddr +
sizeof (jump_insn));
1620 if (loffset > INT_MAX || loffset < INT_MIN)
1623 "E.Jump back from jump pad too far from tracepoint "
1624 "(offset 0x%" PRIx64
" > int32).", loffset);
1628 offset = (int) loffset;
1629 memcpy (buf, jump_insn,
sizeof (jump_insn));
1630 memcpy (buf + 1, &offset, 4);
1637 loffset = *jump_entry - (tpaddr +
sizeof (
jump_insn));
1638 if (loffset > INT_MAX || loffset < INT_MIN)
1641 "E.Jump pad too far from tracepoint "
1642 "(offset 0x%" PRIx64
" > int32).", loffset);
1646 offset = (int) loffset;
1648 memcpy (buf, jump_insn,
sizeof (jump_insn));
1649 memcpy (buf + 1, &offset, 4);
1650 memcpy (jjump_pad_insn, buf,
sizeof (jump_insn));
1651 *jjump_pad_insn_size =
sizeof (
jump_insn);
1654 *jump_entry = buildaddr;
1674 unsigned char *jjump_pad_insn,
1680 unsigned char buf[0x100];
1690 *((
int *)(buf + i)) = (
int) tpaddr;
1709 memcpy (buf + i, &tpoint, 4);
1724 memcpy (&buf[i], (
void *) &lockaddr, 4);
1744 memcpy (&buf[i], (
void *) &tpoint, 4);
1749 offset = collector - (buildaddr +
sizeof (
jump_insn));
1750 memcpy (buf + 1, &offset, 4);
1764 memcpy (buf + i, &lockaddr, 4);
1794 *adjusted_insn_addr = buildaddr;
1796 *adjusted_insn_addr_end = buildaddr;
1799 offset = (tpaddr + orig_size) - (buildaddr +
sizeof (jump_insn));
1800 memcpy (buf, jump_insn,
sizeof (jump_insn));
1801 memcpy (buf + 1, &offset, 4);
1816 "E.Cannot allocate trampoline space needed for fast "
1817 "tracepoints on 4-byte instructions.");
1821 offset = *jump_entry - (*trampoline +
sizeof (
jump_insn));
1822 memcpy (buf, jump_insn,
sizeof (jump_insn));
1823 memcpy (buf + 1, &offset, 4);
1827 offset = (*trampoline - (tpaddr +
sizeof (
small_jump_insn))) & 0xffff;
1828 memcpy (buf, small_jump_insn,
sizeof (small_jump_insn));
1829 memcpy (buf + 2, &offset, 2);
1830 memcpy (jjump_pad_insn, buf,
sizeof (small_jump_insn));
1836 offset = *jump_entry - (tpaddr +
sizeof (
jump_insn));
1837 memcpy (buf, jump_insn,
sizeof (jump_insn));
1838 memcpy (buf + 1, &offset, 4);
1839 memcpy (jjump_pad_insn, buf,
sizeof (jump_insn));
1840 *jjump_pad_insn_size =
sizeof (
jump_insn);
1844 *jump_entry = buildaddr;
1857 unsigned char *jjump_pad_insn,
1864 if (is_64bit_tdesc ())
1865 return amd64_install_fast_tracepoint_jump_pad (tpoint, tpaddr,
1866 collector, lockaddr,
1867 orig_size, jump_entry,
1868 trampoline, trampoline_size,
1870 jjump_pad_insn_size,
1872 adjusted_insn_addr_end,
1877 collector, lockaddr,
1878 orig_size, jump_entry,
1879 trampoline, trampoline_size,
1881 jjump_pad_insn_size,
1883 adjusted_insn_addr_end,
1893 static int warned_about_fast_tracepoints = 0;
1898 if (is_64bit_tdesc ())
1918 if (!warned_about_fast_tracepoints)
1920 warning (
"4-byte fast tracepoints not available; %s\n", errbuf);
1921 warned_about_fast_tracepoints = 1;
1953 #define EMIT_ASM(NAME, INSNS) \
1956 extern unsigned char start_ ## NAME, end_ ## NAME; \
1957 add_insns (&start_ ## NAME, &end_ ## NAME - &start_ ## NAME); \
1958 __asm__ ("jmp end_" #NAME "\n" \
1959 "\t" "start_" #NAME ":" \
1961 "\t" "end_" #NAME ":"); \
1966 #define EMIT_ASM32(NAME,INSNS) \
1969 extern unsigned char start_ ## NAME, end_ ## NAME; \
1970 add_insns (&start_ ## NAME, &end_ ## NAME - &start_ ## NAME); \
1971 __asm__ (".code32\n" \
1972 "\t" "jmp end_" #NAME "\n" \
1973 "\t" "start_" #NAME ":\n" \
1975 "\t" "end_" #NAME ":\n" \
1981 #define EMIT_ASM32(NAME,INSNS) EMIT_ASM(NAME,INSNS)
1988 amd64_emit_prologue (
void)
1992 "movq %rsp,%rbp\n\t"
1993 "sub $0x20,%rsp\n\t"
1994 "movq %rdi,-8(%rbp)\n\t"
1995 "movq %rsi,-16(%rbp)");
2000 amd64_emit_epilogue (
void)
2003 "movq -16(%rbp),%rdi\n\t"
2004 "movq %rax,(%rdi)\n\t"
2011 amd64_emit_add (
void)
2014 "add (%rsp),%rax\n\t"
2015 "lea 0x8(%rsp),%rsp");
2019 amd64_emit_sub (
void)
2022 "sub %rax,(%rsp)\n\t"
2027 amd64_emit_mul (
void)
2033 amd64_emit_lsh (
void)
2039 amd64_emit_rsh_signed (
void)
2045 amd64_emit_rsh_unsigned (
void)
2051 amd64_emit_ext (
int arg)
2076 amd64_emit_log_not (
void)
2079 "test %rax,%rax\n\t"
2085 amd64_emit_bit_and (
void)
2088 "and (%rsp),%rax\n\t"
2089 "lea 0x8(%rsp),%rsp");
2093 amd64_emit_bit_or (
void)
2096 "or (%rsp),%rax\n\t"
2097 "lea 0x8(%rsp),%rsp");
2101 amd64_emit_bit_xor (
void)
2104 "xor (%rsp),%rax\n\t"
2105 "lea 0x8(%rsp),%rsp");
2109 amd64_emit_bit_not (
void)
2112 "xorq $0xffffffffffffffff,%rax");
2116 amd64_emit_equal (
void)
2119 "cmp %rax,(%rsp)\n\t"
2120 "je .Lamd64_equal_true\n\t"
2122 "jmp .Lamd64_equal_end\n\t"
2123 ".Lamd64_equal_true:\n\t"
2125 ".Lamd64_equal_end:\n\t"
2126 "lea 0x8(%rsp),%rsp");
2130 amd64_emit_less_signed (
void)
2133 "cmp %rax,(%rsp)\n\t"
2134 "jl .Lamd64_less_signed_true\n\t"
2136 "jmp .Lamd64_less_signed_end\n\t"
2137 ".Lamd64_less_signed_true:\n\t"
2139 ".Lamd64_less_signed_end:\n\t"
2140 "lea 0x8(%rsp),%rsp");
2144 amd64_emit_less_unsigned (
void)
2147 "cmp %rax,(%rsp)\n\t"
2148 "jb .Lamd64_less_unsigned_true\n\t"
2150 "jmp .Lamd64_less_unsigned_end\n\t"
2151 ".Lamd64_less_unsigned_true:\n\t"
2153 ".Lamd64_less_unsigned_end:\n\t"
2154 "lea 0x8(%rsp),%rsp");
2158 amd64_emit_ref (
int size)
2172 "movl (%rax),%eax");
2176 "movq (%rax),%rax");
2182 amd64_emit_if_goto (
int *offset_p,
int *size_p)
2188 ".byte 0x0f, 0x85, 0x0, 0x0, 0x0, 0x0");
2196 amd64_emit_goto (
int *offset_p,
int *size_p)
2199 ".byte 0xe9, 0x0, 0x0, 0x0, 0x0");
2209 int diff = (to - (from + size));
2210 unsigned char buf[
sizeof (int)];
2218 memcpy (buf, &diff,
sizeof (
int));
2223 amd64_emit_const (
LONGEST num)
2225 unsigned char buf[16];
2230 buf[i++] = 0x48; buf[i++] = 0xb8;
2231 memcpy (&buf[i], &num,
sizeof (num));
2240 unsigned char buf[16];
2250 offset64 = fn - (buildaddr + 1 + 4 );
2254 if (offset64 > INT_MAX || offset64 < INT_MIN)
2261 memcpy (buf + i, &fn, 8);
2268 int offset32 = offset64;
2269 memcpy (buf + i, &offset32, 4);
2278 amd64_emit_reg (
int reg)
2280 unsigned char buf[16];
2288 memcpy (&buf[i], ®,
sizeof (reg));
2296 amd64_emit_pop (
void)
2303 amd64_emit_stack_flush (
void)
2310 amd64_emit_zero_ext (
int arg)
2320 "and $0xffff,%rax");
2324 "mov $0xffffffff,%rcx\n\t"
2333 amd64_emit_swap (
void)
2342 amd64_emit_stack_adjust (
int n)
2344 unsigned char buf[16];
2362 amd64_emit_int_call_1 (
CORE_ADDR fn,
int arg1)
2364 unsigned char buf[16];
2371 memcpy (&buf[i], &arg1,
sizeof (arg1));
2375 amd64_emit_call (fn);
2381 amd64_emit_void_call_2 (
CORE_ADDR fn,
int arg1)
2383 unsigned char buf[16];
2390 memcpy (&buf[i], &arg1,
sizeof (arg1));
2399 amd64_emit_call (fn);
2406 amd64_emit_eq_goto (
int *offset_p,
int *size_p)
2409 "cmp %rax,(%rsp)\n\t"
2410 "jne .Lamd64_eq_fallthru\n\t"
2411 "lea 0x8(%rsp),%rsp\n\t"
2414 ".byte 0xe9, 0x0, 0x0, 0x0, 0x0\n\t"
2415 ".Lamd64_eq_fallthru:\n\t"
2416 "lea 0x8(%rsp),%rsp\n\t"
2426 amd64_emit_ne_goto (
int *offset_p,
int *size_p)
2429 "cmp %rax,(%rsp)\n\t"
2430 "je .Lamd64_ne_fallthru\n\t"
2431 "lea 0x8(%rsp),%rsp\n\t"
2434 ".byte 0xe9, 0x0, 0x0, 0x0, 0x0\n\t"
2435 ".Lamd64_ne_fallthru:\n\t"
2436 "lea 0x8(%rsp),%rsp\n\t"
2446 amd64_emit_lt_goto (
int *offset_p,
int *size_p)
2449 "cmp %rax,(%rsp)\n\t"
2450 "jnl .Lamd64_lt_fallthru\n\t"
2451 "lea 0x8(%rsp),%rsp\n\t"
2454 ".byte 0xe9, 0x0, 0x0, 0x0, 0x0\n\t"
2455 ".Lamd64_lt_fallthru:\n\t"
2456 "lea 0x8(%rsp),%rsp\n\t"
2466 amd64_emit_le_goto (
int *offset_p,
int *size_p)
2469 "cmp %rax,(%rsp)\n\t"
2470 "jnle .Lamd64_le_fallthru\n\t"
2471 "lea 0x8(%rsp),%rsp\n\t"
2474 ".byte 0xe9, 0x0, 0x0, 0x0, 0x0\n\t"
2475 ".Lamd64_le_fallthru:\n\t"
2476 "lea 0x8(%rsp),%rsp\n\t"
2486 amd64_emit_gt_goto (
int *offset_p,
int *size_p)
2489 "cmp %rax,(%rsp)\n\t"
2490 "jng .Lamd64_gt_fallthru\n\t"
2491 "lea 0x8(%rsp),%rsp\n\t"
2494 ".byte 0xe9, 0x0, 0x0, 0x0, 0x0\n\t"
2495 ".Lamd64_gt_fallthru:\n\t"
2496 "lea 0x8(%rsp),%rsp\n\t"
2506 amd64_emit_ge_goto (
int *offset_p,
int *size_p)
2509 "cmp %rax,(%rsp)\n\t"
2510 "jnge .Lamd64_ge_fallthru\n\t"
2511 ".Lamd64_ge_jump:\n\t"
2512 "lea 0x8(%rsp),%rsp\n\t"
2515 ".byte 0xe9, 0x0, 0x0, 0x0, 0x0\n\t"
2516 ".Lamd64_ge_fallthru:\n\t"
2517 "lea 0x8(%rsp),%rsp\n\t"
2528 amd64_emit_prologue,
2529 amd64_emit_epilogue,
2534 amd64_emit_rsh_signed,
2535 amd64_emit_rsh_unsigned,
2543 amd64_emit_less_signed,
2544 amd64_emit_less_unsigned,
2548 amd64_write_goto_address,
2553 amd64_emit_stack_flush,
2554 amd64_emit_zero_ext,
2556 amd64_emit_stack_adjust,
2557 amd64_emit_int_call_1,
2558 amd64_emit_void_call_2,
2584 "mov 12(%ebp),%ecx\n\t"
2585 "mov %eax,(%ecx)\n\t"
2586 "mov %ebx,0x4(%ecx)\n\t"
2597 "add (%esp),%eax\n\t"
2598 "adc 0x4(%esp),%ebx\n\t"
2599 "lea 0x8(%esp),%esp");
2606 "subl %eax,(%esp)\n\t"
2607 "sbbl %ebx,4(%esp)\n\t"
2645 "movl %eax,%ebx\n\t"
2651 "movl %eax,%ebx\n\t"
2656 "movl %eax,%ebx\n\t"
2669 "test %eax,%eax\n\t"
2679 "and (%esp),%eax\n\t"
2680 "and 0x4(%esp),%ebx\n\t"
2681 "lea 0x8(%esp),%esp");
2688 "or (%esp),%eax\n\t"
2689 "or 0x4(%esp),%ebx\n\t"
2690 "lea 0x8(%esp),%esp");
2697 "xor (%esp),%eax\n\t"
2698 "xor 0x4(%esp),%ebx\n\t"
2699 "lea 0x8(%esp),%esp");
2706 "xor $0xffffffff,%eax\n\t"
2707 "xor $0xffffffff,%ebx\n\t");
2714 "cmpl %ebx,4(%esp)\n\t"
2715 "jne .Li386_equal_false\n\t"
2716 "cmpl %eax,(%esp)\n\t"
2717 "je .Li386_equal_true\n\t"
2718 ".Li386_equal_false:\n\t"
2720 "jmp .Li386_equal_end\n\t"
2721 ".Li386_equal_true:\n\t"
2723 ".Li386_equal_end:\n\t"
2725 "lea 0x8(%esp),%esp");
2732 "cmpl %ebx,4(%esp)\n\t"
2733 "jl .Li386_less_signed_true\n\t"
2734 "jne .Li386_less_signed_false\n\t"
2735 "cmpl %eax,(%esp)\n\t"
2736 "jl .Li386_less_signed_true\n\t"
2737 ".Li386_less_signed_false:\n\t"
2739 "jmp .Li386_less_signed_end\n\t"
2740 ".Li386_less_signed_true:\n\t"
2742 ".Li386_less_signed_end:\n\t"
2744 "lea 0x8(%esp),%esp");
2751 "cmpl %ebx,4(%esp)\n\t"
2752 "jb .Li386_less_unsigned_true\n\t"
2753 "jne .Li386_less_unsigned_false\n\t"
2754 "cmpl %eax,(%esp)\n\t"
2755 "jb .Li386_less_unsigned_true\n\t"
2756 ".Li386_less_unsigned_false:\n\t"
2758 "jmp .Li386_less_unsigned_end\n\t"
2759 ".Li386_less_unsigned_true:\n\t"
2761 ".Li386_less_unsigned_end:\n\t"
2763 "lea 0x8(%esp),%esp");
2781 "movl (%eax),%eax");
2785 "movl 4(%eax),%ebx\n\t"
2786 "movl (%eax),%eax");
2801 ".byte 0x0f, 0x85, 0x0, 0x0, 0x0, 0x0");
2814 ".byte 0xe9, 0x0, 0x0, 0x0, 0x0");
2824 int diff = (to - (from + size));
2825 unsigned char buf[
sizeof (int)];
2834 memcpy (buf, &diff,
sizeof (
int));
2841 unsigned char buf[16];
2847 lo = num & 0xffffffff;
2848 memcpy (&buf[i], &lo,
sizeof (lo));
2850 hi = ((num >> 32) & 0xffffffff);
2854 memcpy (&buf[i], &hi,
sizeof (hi));
2859 buf[i++] = 0x31; buf[i++] = 0xdb;
2868 unsigned char buf[16];
2875 offset = ((int) fn) - (buildaddr + 5);
2876 memcpy (buf + 1, &offset, 4);
2884 unsigned char buf[16];
2893 memcpy (&buf[i], ®,
sizeof (reg));
2898 "mov %eax,4(%esp)\n\t"
2899 "mov 8(%ebp),%eax\n\t"
2904 "lea 0x8(%esp),%esp");
2930 "and $0xff,%eax\n\t"
2935 "and $0xffff,%eax\n\t"
2962 unsigned char buf[16];
2980 unsigned char buf[16];
2993 memcpy (&buf[i], &arg1,
sizeof (arg1));
3000 "lea 0x8(%esp),%esp");
3008 unsigned char buf[16];
3016 "sub $0x10,%esp\n\t"
3020 "mov %eax,4(%esp)\n\t"
3021 "mov %ebx,8(%esp)");
3028 memcpy (&buf[i], &arg1,
sizeof (arg1));
3034 "lea 0x10(%esp),%esp\n\t"
3045 "cmpl %eax,(%esp)\n\t"
3046 "jne .Leq_fallthru\n\t"
3047 "cmpl %ebx,4(%esp)\n\t"
3048 "jne .Leq_fallthru\n\t"
3049 "lea 0x8(%esp),%esp\n\t"
3053 ".byte 0xe9, 0x0, 0x0, 0x0, 0x0\n\t"
3054 ".Leq_fallthru:\n\t"
3055 "lea 0x8(%esp),%esp\n\t"
3070 "cmpl %eax,(%esp)\n\t"
3072 "cmpl %ebx,4(%esp)\n\t"
3073 "je .Lne_fallthru\n\t"
3075 "lea 0x8(%esp),%esp\n\t"
3079 ".byte 0xe9, 0x0, 0x0, 0x0, 0x0\n\t"
3080 ".Lne_fallthru:\n\t"
3081 "lea 0x8(%esp),%esp\n\t"
3095 "cmpl %ebx,4(%esp)\n\t"
3097 "jne .Llt_fallthru\n\t"
3098 "cmpl %eax,(%esp)\n\t"
3099 "jnl .Llt_fallthru\n\t"
3101 "lea 0x8(%esp),%esp\n\t"
3105 ".byte 0xe9, 0x0, 0x0, 0x0, 0x0\n\t"
3106 ".Llt_fallthru:\n\t"
3107 "lea 0x8(%esp),%esp\n\t"
3121 "cmpl %ebx,4(%esp)\n\t"
3123 "jne .Lle_fallthru\n\t"
3124 "cmpl %eax,(%esp)\n\t"
3125 "jnle .Lle_fallthru\n\t"
3127 "lea 0x8(%esp),%esp\n\t"
3131 ".byte 0xe9, 0x0, 0x0, 0x0, 0x0\n\t"
3132 ".Lle_fallthru:\n\t"
3133 "lea 0x8(%esp),%esp\n\t"
3147 "cmpl %ebx,4(%esp)\n\t"
3149 "jne .Lgt_fallthru\n\t"
3150 "cmpl %eax,(%esp)\n\t"
3151 "jng .Lgt_fallthru\n\t"
3153 "lea 0x8(%esp),%esp\n\t"
3157 ".byte 0xe9, 0x0, 0x0, 0x0, 0x0\n\t"
3158 ".Lgt_fallthru:\n\t"
3159 "lea 0x8(%esp),%esp\n\t"
3173 "cmpl %ebx,4(%esp)\n\t"
3175 "jne .Lge_fallthru\n\t"
3176 "cmpl %eax,(%esp)\n\t"
3177 "jnge .Lge_fallthru\n\t"
3179 "lea 0x8(%esp),%esp\n\t"
3183 ".byte 0xe9, 0x0, 0x0, 0x0, 0x0\n\t"
3184 ".Lge_fallthru:\n\t"
3185 "lea 0x8(%esp),%esp\n\t"
3241 if (is_64bit_tdesc ())
3242 return &amd64_emit_ops;
3312 tdesc_amd64_linux_no_xml->
xmltarget = xmltarget_amd64_linux_no_xml;
3324 initialize_regsets_info (&x86_regsets_info);
const struct target_desc * tdesc
void i387_xsave_to_cache(struct regcache *regcache, const void *buf)
#define X86_XSTATE_AVX_MASK
enum target_hw_bp_type raw_bkpt_type_to_target_hw_bp_type(enum raw_bkpt_type raw_type)
unsigned long x86_linux_dr_get_status(void)
struct thread_info * current_thread
void collect_register(struct regcache *regcache, int n, void *buf)
static void i386_emit_bit_or(void)
static void i386_emit_reg(int reg)
static int x86_stopped_by_watchpoint(void)
struct emit_ops i386_emit_ops
static void x86_store_fpregset(struct regcache *regcache, const void *buf)
static void i386_emit_bit_not(void)
const struct target_desc * tdesc_i386_linux
static void i386_write_goto_address(CORE_ADDR from, CORE_ADDR to, int size)
static void x86_fill_fpxregset(struct regcache *regcache, void *buf)
void init_registers_i386_mpx_linux(void)
#define X86_XSTATE_SSE_MASK
void supply_register_by_name(struct regcache *regcache, const char *name, const void *buf)
static void i386_emit_rsh_signed(void)
void i387_fxsave_to_cache(struct regcache *regcache, const void *buf)
static void x86_linux_new_fork(struct process_info *parent, struct process_info *child)
void initialize_low_arch(void)
struct aarch64_debug_reg_state debug_reg_state
#define X86_XSTATE_MPX_MASK
static void i386_emit_stack_flush(void)
void warning(const char *fmt,...)
void regcache_release(void)
static void x86_fill_xstateregset(struct regcache *regcache, void *buf)
void init_registers_amd64_avx512_linux(void)
struct lwp_info * find_lwp_pid(ptid_t ptid)
#define EMIT_ASM32(NAME, INSNS)
const struct target_desc * tdesc_i386_avx_linux
static void i386_emit_ext(int arg)
const struct target_desc * tdesc_i386_avx512_linux
struct process_info * find_process_pid(int pid)
static void i386_emit_goto(int *offset_p, int *size_p)
static void x86_store_gregset(struct regcache *regcache, const void *buf)
void i387_fsave_to_cache(struct regcache *regcache, const void *buf)
char * paddress(CORE_ADDR addr)
void for_each_inferior(struct inferior_list *list, void(*action)(struct inferior_list_entry *))
static void x86_fill_gregset(struct regcache *regcache, void *buf)
static unsigned char jump_insn[]
int x86_dr_remove_watchpoint(struct x86_debug_reg_state *state, enum target_hw_bp_type type, CORE_ADDR addr, int len)
void i386_emit_eq_goto(int *offset_p, int *size_p)
int x86_dr_stopped_data_address(struct x86_debug_reg_state *state, CORE_ADDR *addr_p)
static void i386_emit_if_goto(int *offset_p, int *size_p)
static struct regset_info x86_regsets[]
#define PTRACE_ARCH_PRCTL
static unsigned char small_jump_insn[]
void x86_linux_dr_set_control(unsigned long control)
static struct emit_ops * x86_emit_ops(void)
const struct target_desc * tdesc_x32_avx512_linux
struct target_ops * the_target
static int x86_supports_z_point_type(char z_type)
void init_registers_amd64_mpx_linux(void)
const struct target_desc * tdesc
#define X86_XSTATE_SIZE(XCR0)
static void i386_emit_int_call_1(CORE_ADDR fn, int arg1)
static void i386_emit_bit_xor(void)
char * xstrdup(const char *s)
int x86_dr_insert_watchpoint(struct x86_debug_reg_state *state, enum target_hw_bp_type type, CORE_ADDR addr, int len)
static int same_process_callback(struct inferior_list_entry *entry, void *data)
struct arch_process_info * arch_private
static void i386_emit_call(CORE_ADDR fn)
struct x86_debug_reg_state * x86_debug_reg_state(pid_t pid)
static void i386_emit_lsh(void)
void x86_linux_new_thread(struct lwp_info *lwp)
struct pt_watch_regs __attribute__
static int x86_cannot_fetch_register(int regno)
static void i386_emit_add(void)
void collect_register_by_name(struct regcache *regcache, const char *name, void *buf)
void init_registers_amd64_avx_linux(void)
void init_registers_x32_linux(void)
void init_registers_i386_mmx_linux(void)
static void i386_emit_ref(int size)
const struct target_desc * tdesc_i386_mpx_linux
CORE_ADDR current_insn_ptr
void copy_target_description(struct target_desc *dest, const struct target_desc *src)
static CORE_ADDR x86_get_pc(struct regcache *regcache)
const struct regs_info * x86_linux_regs_info(void)
static int i386_install_fast_tracepoint_jump_pad(CORE_ADDR tpoint, CORE_ADDR tpaddr, CORE_ADDR collector, CORE_ADDR lockaddr, ULONGEST orig_size, CORE_ADDR *jump_entry, CORE_ADDR *trampoline, ULONGEST *trampoline_size, unsigned char *jjump_pad_insn, ULONGEST *jjump_pad_insn_size, CORE_ADDR *adjusted_insn_addr, CORE_ADDR *adjusted_insn_addr_end, char *err)
static void i386_emit_swap(void)
void init_registers_i386_linux(void)
#define X86_XSTATE_SSE_SIZE
static void x86_set_pc(struct regcache *regcache, CORE_ADDR pc)
#define gdb_assert_not_reached(message)
ptid_t pid_to_ptid(int pid)
const struct target_desc * tdesc_amd64_avx512_linux
static void x86_store_xstateregset(struct regcache *regcache, const void *buf)
ps_err_e ps_get_thread_area(const struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base)
static void append_insns(CORE_ADDR *to, size_t len, const unsigned char *buf)
#define get_lwp_thread(lwp)
int register_size(const struct target_desc *tdesc, int n)
const struct target_desc * tdesc_amd64_avx_linux
static int startswith(const char *string, const char *pattern)
static int x86_cannot_store_register(int regno)
void i386_emit_lt_goto(int *offset_p, int *size_p)
static void i386_emit_mul(void)
static void x86_store_fpxregset(struct regcache *regcache, const void *buf)
void x86_linux_dr_set_addr(int regnum, CORE_ADDR addr)
struct process_info * current_process(void)
#define x86_breakpoint_len
void i386_emit_ge_goto(int *offset_p, int *size_p)
struct process_info_private * priv
struct inferior_list all_threads
int x86_dr_stopped_by_watchpoint(struct x86_debug_reg_state *state)
void init_registers_amd64_linux(void)
static void x86_fill_fpregset(struct regcache *regcache, void *buf)
struct inferior_list all_processes
static void x86_arch_setup(void)
static int x86_get_min_fast_tracepoint_insn_len(void)
static void i386_emit_const(LONGEST num)
int have_fast_tracepoint_trampoline_buffer(char *buf)
unsigned long long x86_xcr0
void i386_emit_ne_goto(int *offset_p, int *size_p)
int linux_pid_exe_is_elf_64_file(int pid, unsigned int *machine)
int write_inferior_memory(CORE_ADDR memaddr, const unsigned char *myaddr, int len)
void i387_cache_to_xsave(struct regcache *regcache, void *buf)
int ptid_get_pid(ptid_t ptid)
static void i386_emit_pop(void)
static struct usrregs_info i386_linux_usrregs_info
CORE_ADDR x86_linux_dr_get_addr(int regnum)
static int x86_install_fast_tracepoint_jump_pad(CORE_ADDR tpoint, CORE_ADDR tpaddr, CORE_ADDR collector, CORE_ADDR lockaddr, ULONGEST orig_size, CORE_ADDR *jump_entry, CORE_ADDR *trampoline, ULONGEST *trampoline_size, unsigned char *jjump_pad_insn, ULONGEST *jjump_pad_insn_size, CORE_ADDR *adjusted_insn_addr, CORE_ADDR *adjusted_insn_addr_end, char *err)
void x86_low_init_dregs(struct x86_debug_reg_state *state)
const struct target_desc * tdesc_i386_mmx_linux
static int x86_supports_tracepoints(void)
static void i386_emit_zero_ext(int arg)
void i387_cache_to_fsave(struct regcache *regcache, void *buf)
static const unsigned char x86_breakpoint[]
static void x86_arch_setup_process_callback(struct inferior_list_entry *entry)
#define X86_XSTATE_AVX512_MASK
static void i386_emit_rsh_unsigned(void)
int claim_trampoline_space(ULONGEST used, CORE_ADDR *trampoline)
static CORE_ADDR x86_stopped_data_address(void)
static const struct target_desc * x86_linux_read_description(void)
void i387_cache_to_fxsave(struct regcache *regcache, void *buf)
static struct arch_process_info * x86_linux_new_process(void)
static void i386_emit_less_signed(void)
void init_registers_i386_avx_linux(void)
void init_registers_x32_avx512_linux(void)
CORE_ADDR get_raw_reg_func_addr(void)
void i386_emit_gt_goto(int *offset_p, int *size_p)
static void i386_emit_less_unsigned(void)
int(* read_memory)(CORE_ADDR memaddr, unsigned char *myaddr, int len)
static void i386_emit_epilogue(void)
struct regcache * get_thread_regcache(struct thread_info *thread, int fetch)
const struct target_desc * tdesc_x32_linux
#define Z_PACKET_ACCESS_WP
static int x86_remove_point(enum raw_bkpt_type type, CORE_ADDR addr, int size, struct raw_breakpoint *bp)
unsigned long x86_linux_dr_get_control(void)
static struct target_desc * tdesc_i386_linux_no_xml
static void i386_emit_log_not(void)
#define PTRACE_GET_THREAD_AREA
static int x86_supports_range_stepping(void)
unsigned long long ULONGEST
static void i386_emit_stack_adjust(int n)
static void i386_emit_equal(void)
static void x86_linux_update_xmltarget(void)
static int x86_siginfo_fixup(siginfo_t *native, void *inf, int direction)
static struct regs_info i386_linux_regs_info
void i386_emit_le_goto(int *offset_p, int *size_p)
static void i386_emit_bit_and(void)
void init_registers_i386_avx512_linux(void)
void debug_printf(const char *fmt,...)
#define EMIT_ASM(NAME, INSNS)
const struct target_desc * tdesc_amd64_linux
static void x86_linux_process_qsupported(const char *query)
void init_registers_x32_avx_linux(void)
#define I386_LINUX_XSAVE_XCR0_OFFSET
static void i386_emit_void_call_2(CORE_ADDR fn, int arg1)
const struct target_desc * tdesc_x32_avx_linux
void supply_register(struct regcache *regcache, int n, const void *buf)
static void add_insns(unsigned char *start, int len)
static const char * xmltarget_i386_linux_no_xml
static int x86_get_thread_area(int lwpid, CORE_ADDR *addr)
void error(const char *fmt,...)
void x86_linux_prepare_to_resume(struct lwp_info *lwp)
static int x86_breakpoint_at(CORE_ADDR pc)
static void i386_emit_sub(void)
int relocate_instruction(CORE_ADDR *to, CORE_ADDR oldloc)
#define Z_PACKET_WRITE_WP
static int x86_insert_point(enum raw_bkpt_type type, CORE_ADDR addr, int size, struct raw_breakpoint *bp)
struct inferior_list_entry * find_inferior(struct inferior_list *list, int(*func)(struct inferior_list_entry *, void *), void *arg)
static void i386_emit_prologue(void)
static int push_opcode(unsigned char *buf, char *op)
#define X86_XSTATE_ALL_MASK
const struct target_desc * tdesc_amd64_mpx_linux