diff options
Diffstat (limited to 'gdb/gdbserver/linux-i386-ipa.c')
-rw-r--r-- | gdb/gdbserver/linux-i386-ipa.c | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/gdb/gdbserver/linux-i386-ipa.c b/gdb/gdbserver/linux-i386-ipa.c index 11dc038..4860012 100644 --- a/gdb/gdbserver/linux-i386-ipa.c +++ b/gdb/gdbserver/linux-i386-ipa.c @@ -21,6 +21,7 @@ #include "server.h" #include <sys/mman.h> #include "tracepoint.h" +#include "linux-x86-tdesc.h" /* GDB register numbers. */ @@ -47,10 +48,6 @@ enum i386_gdb_regnum #define i386_num_regs 16 -/* Defined in auto-generated file i386-linux.c. */ -void init_registers_i386_linux (void); -extern const struct target_desc *tdesc_i386_linux; - #define FT_CR_EAX 15 #define FT_CR_ECX 14 #define FT_CR_EDX 13 @@ -247,10 +244,38 @@ initialize_fast_tracepoint_trampoline_buffer (void) } } +/* Return target_desc to use for IPA, given the tdesc index passed by + gdbserver. */ + +const struct target_desc * +get_ipa_tdesc (int idx) +{ + switch (idx) + { + case X86_TDESC_MMX: + return tdesc_i386_mmx_linux; + case X86_TDESC_SSE: + return tdesc_i386_linux; + case X86_TDESC_AVX: + return tdesc_i386_avx_linux; + case X86_TDESC_MPX: + return tdesc_i386_mpx_linux; + case X86_TDESC_AVX512: + return tdesc_i386_avx512_linux; + default: + internal_error (__FILE__, __LINE__, + "unknown ipa tdesc index: %d", idx); + return tdesc_i386_linux; + } +} + void initialize_low_tracepoint (void) { + init_registers_i386_mmx_linux (); init_registers_i386_linux (); - ipa_tdesc = tdesc_i386_linux; + init_registers_i386_avx_linux (); + init_registers_i386_mpx_linux (); + init_registers_i386_avx512_linux (); initialize_fast_tracepoint_trampoline_buffer (); } |