diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-04-13 14:39:41 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-04-13 14:39:41 +0000 |
commit | 4d47af5cf28a3fef4e6eff90379e66fa5bb95321 (patch) | |
tree | 368b001b5d6ba1328ba6ad90a421705a301fa0e9 /gdb/gdbserver | |
parent | ecedbe58529baade20031120d417109fa8ece984 (diff) | |
download | gdb-4d47af5cf28a3fef4e6eff90379e66fa5bb95321.zip gdb-4d47af5cf28a3fef4e6eff90379e66fa5bb95321.tar.gz gdb-4d47af5cf28a3fef4e6eff90379e66fa5bb95321.tar.bz2 |
Enable x32 support in gdbserver
* Makefile.in (clean): Also remove x32.c x32-linux.c
x32-avx.c x32-avx-linux.c.
(x32.o): New target.
(x32.c): Likewise.
(x32-linux.o): Likewise.
(x32-linux.c): Likewise.
(x32-avx.o): Likewise.
(x32-avx.c): Likewise.
(x32-avx-linux.o): Likewise.
(x32-avx-linux.c): Likewise.
* configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
(srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
(srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
(srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
(srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
i386/x32-avx-linux.xml.
* linux-x86-low.c (init_registers_x32_linux): New prototype.
(init_registers_x32_avx_linux): Likwise.
(x86_linux_update_xmltarget): Call init_registers_x32_linux
or init_registers_x32_avx_linux if linux_is_elf64 is false.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 25 | ||||
-rw-r--r-- | gdb/gdbserver/Makefile.in | 14 | ||||
-rw-r--r-- | gdb/gdbserver/configure.srv | 10 | ||||
-rw-r--r-- | gdb/gdbserver/linux-x86-low.c | 12 |
4 files changed, 54 insertions, 7 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index bd74d76..0eb9f6c 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,28 @@ +2012-04-13 H.J. Lu <hongjiu.lu@intel.com> + + * Makefile.in (clean): Also remove x32.c x32-linux.c + x32-avx.c x32-avx-linux.c. + (x32.o): New target. + (x32.c): Likewise. + (x32-linux.o): Likewise. + (x32-linux.c): Likewise. + (x32-avx.o): Likewise. + (x32-avx.c): Likewise. + (x32-avx-linux.o): Likewise. + (x32-avx-linux.c): Likewise. + + * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o. + (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o. + (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml. + (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml. + (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml + i386/x32-avx-linux.xml. + + * linux-x86-low.c (init_registers_x32_linux): New prototype. + (init_registers_x32_avx_linux): Likwise. + (x86_linux_update_xmltarget): Call init_registers_x32_linux + or init_registers_x32_avx_linux if linux_is_elf64 is false. + 2012-04-13 Pedro Alves <palves@redhat.com> * Makefile.in (GNULIB_FLAGS_TO_PASS): New. diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index de6e636..710129d 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in @@ -314,6 +314,8 @@ clean: rm -f i386-avx.c i386-avx-linux.c rm -f amd64-avx.c amd64-avx-linux.c rm -f i386-mmx.c i386-mmx-linux.c + rm -f x32.c x32-linux.c + rm -f x32-avx.c x32-avx-linux.c @cd gnulib; $(MAKE) $(FLAGS_TO_PASS) $(GNULIB_FLAGS_TO_PASS) clean maintainer-clean realclean distclean: clean @@ -704,6 +706,18 @@ amd64-avx.c : $(srcdir)/../regformats/i386/amd64-avx.dat $(regdat_sh) amd64-avx-linux.o : amd64-avx-linux.c $(regdef_h) amd64-avx-linux.c : $(srcdir)/../regformats/i386/amd64-avx-linux.dat $(regdat_sh) $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx-linux.dat amd64-avx-linux.c +x32.o : x32.c $(regdef_h) +x32.c : $(srcdir)/../regformats/i386/x32.dat $(regdat_sh) + $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32.dat x32.c +x32-linux.o : x32-linux.c $(regdef_h) +x32-linux.c : $(srcdir)/../regformats/i386/x32-linux.dat $(regdat_sh) + $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32-linux.dat x32-linux.c +x32-avx.o : x32-avx.c $(regdef_h) +x32-avx.c : $(srcdir)/../regformats/i386/x32-avx.dat $(regdat_sh) + $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32-avx.dat x32-avx.c +x32-avx-linux.o : x32-avx-linux.c $(regdef_h) +x32-avx-linux.c : $(srcdir)/../regformats/i386/x32-avx-linux.dat $(regdat_sh) + $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32-avx-linux.dat x32-avx-linux.c reg-xtensa.o : reg-xtensa.c $(regdef_h) reg-xtensa.c : $(srcdir)/../regformats/reg-xtensa.dat $(regdat_sh) $(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-xtensa.dat reg-xtensa.c diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv index bdd9916..e6ae157 100644 --- a/gdb/gdbserver/configure.srv +++ b/gdb/gdbserver/configure.srv @@ -26,18 +26,18 @@ srv_hostio_err_objs="hostio-errno.o" srv_i386_regobj="i386.o i386-avx.o i386-mmx.o" srv_i386_linux_regobj="i386-linux.o i386-avx-linux.o i386-mmx-linux.o" -srv_amd64_regobj="amd64.o amd64-avx.o" -srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o" +srv_amd64_regobj="amd64.o amd64-avx.o x32.o x32-avx.o" +srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o x32-linux.o x32-avx-linux.o" ipa_i386_linux_regobj=i386-linux-ipa.o ipa_amd64_linux_regobj=amd64-linux-ipa.o srv_i386_32bit_xmlfiles="i386/32bit-core.xml i386/32bit-sse.xml i386/32bit-avx.xml" -srv_i386_64bit_xmlfiles="i386/64bit-core.xml i386/64bit-sse.xml i386/64bit-avx.xml" +srv_i386_64bit_xmlfiles="i386/64bit-core.xml i386/64bit-sse.xml i386/64bit-avx.xml i386/x32-core.xml" srv_i386_xmlfiles="i386/i386.xml i386/i386-avx.xml i386/i386-mmx.xml $srv_i386_32bit_xmlfiles" -srv_amd64_xmlfiles="i386/amd64.xml i386/amd64-avx.xml $srv_i386_64bit_xmlfiles" +srv_amd64_xmlfiles="i386/amd64.xml i386/amd64-avx.xml i386/x32.xml i386/x32-avx.xml $srv_i386_64bit_xmlfiles" srv_i386_linux_xmlfiles="i386/i386-linux.xml i386/i386-avx-linux.xml i386/i386-mmx-linux.xml i386/32bit-linux.xml $srv_i386_32bit_xmlfiles" -srv_amd64_linux_xmlfiles="i386/amd64-linux.xml i386/amd64-avx-linux.xml i386/64bit-linux.xml $srv_i386_64bit_xmlfiles" +srv_amd64_linux_xmlfiles="i386/amd64-linux.xml i386/amd64-avx-linux.xml i386/64bit-linux.xml i386/x32-linux.xml i386/x32-avx-linux.xml $srv_i386_64bit_xmlfiles" # Input is taken from the "${target}" variable. diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c index 1e65e97..4ea284e 100644 --- a/gdb/gdbserver/linux-x86-low.c +++ b/gdb/gdbserver/linux-x86-low.c @@ -41,6 +41,10 @@ void init_registers_i386_avx_linux (void); void init_registers_amd64_avx_linux (void); /* Defined in auto-generated file i386-mmx-linux.c. */ void init_registers_i386_mmx_linux (void); +/* Defined in auto-generated file x32-linux.c. */ +void init_registers_x32_linux (void); +/* Defined in auto-generated file x32-avx-linux.c. */ +void init_registers_x32_avx_linux (void); static unsigned char jump_insn[] = { 0xe9, 0, 0, 0, 0 }; static unsigned char small_jump_insn[] = { 0x66, 0xe9, 0, 0 }; @@ -1158,8 +1162,10 @@ x86_linux_update_xmltarget (void) #ifdef __x86_64__ if (num_xmm_registers == 8) init_registers_i386_linux (); - else + else if (linux_is_elf64) init_registers_amd64_linux (); + else + init_registers_x32_linux (); #else { # ifdef HAVE_PTRACE_GETFPXREGS @@ -1254,8 +1260,10 @@ x86_linux_update_xmltarget (void) /* I386 has 8 xmm regs. */ if (num_xmm_registers == 8) init_registers_i386_avx_linux (); - else + else if (linux_is_elf64) init_registers_amd64_avx_linux (); + else + init_registers_x32_avx_linux (); #else init_registers_i386_avx_linux (); #endif |