+2019-07-04 Alan Hayward <alan.hayward@arm.com>
+
+ * aarch64-tdep.c: Remove xml self tests.
+ * amd64-linux-tdep.c: Likewise.
+ * amd64-tdep.c: Likewise.
+ * i386-linux-tdep.c: Likewise.
+ * i386-tdep.c: Likewise.
+
2019-07-03 Pedro Alves <palves@redhat.com>
PR cli/24732
selftests::aarch64_analyze_prologue_test);
selftests::register_test ("aarch64-process-record",
selftests::aarch64_process_record_test);
- selftests::record_xml_tdesc ("aarch64.xml",
- aarch64_create_target_description (0, false));
#endif
}
GDB_OSABI_LINUX, amd64_linux_init_abi);
gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x64_32,
GDB_OSABI_LINUX, amd64_x32_linux_init_abi);
-
-#if GDB_SELF_TEST
- struct
- {
- const char *xml;
- uint64_t mask;
- } xml_masks[] = {
- { "i386/amd64-linux.xml", X86_XSTATE_SSE_MASK },
- { "i386/amd64-avx-linux.xml", X86_XSTATE_AVX_MASK },
- { "i386/amd64-mpx-linux.xml", X86_XSTATE_MPX_MASK },
- { "i386/amd64-avx-mpx-linux.xml", X86_XSTATE_AVX_MPX_MASK },
- { "i386/amd64-avx-avx512-linux.xml", X86_XSTATE_AVX_AVX512_MASK },
- { "i386/amd64-avx-mpx-avx512-pku-linux.xml",
- X86_XSTATE_AVX_MPX_AVX512_PKU_MASK },
- { "i386/x32-linux.xml", X86_XSTATE_SSE_MASK },
- { "i386/x32-avx-linux.xml", X86_XSTATE_AVX_MASK },
- { "i386/x32-avx-avx512-linux.xml", X86_XSTATE_AVX_AVX512_MASK },
- };
-
- for (auto &a : xml_masks)
- {
- auto tdesc = amd64_linux_read_description (a.mask,
- startswith (a.xml,
- "i386/x32"));
-
- selftests::record_xml_tdesc (a.xml, tdesc);
- }
-#endif /* GDB_SELF_TEST */
}
amd64_none_init_abi);
gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x64_32, GDB_OSABI_NONE,
amd64_x32_none_init_abi);
-
-#if GDB_SELF_TEST
- struct
- {
- const char *xml;
- uint64_t mask;
- } xml_masks[] = {
- { "i386/amd64.xml", X86_XSTATE_SSE_MASK },
- { "i386/amd64-avx.xml", X86_XSTATE_AVX_MASK },
- { "i386/amd64-mpx.xml", X86_XSTATE_MPX_MASK },
- { "i386/amd64-avx-mpx.xml", X86_XSTATE_AVX_MPX_MASK },
- { "i386/amd64-avx-avx512.xml", X86_XSTATE_AVX_AVX512_MASK },
- { "i386/amd64-avx-mpx-avx512-pku.xml",
- X86_XSTATE_AVX_MPX_AVX512_PKU_MASK },
- };
-
- for (auto &a : xml_masks)
- {
- auto tdesc = amd64_target_description (a.mask, true);
-
- selftests::record_xml_tdesc (a.xml, tdesc);
- }
-#endif /* GDB_SELF_TEST */
}
\f
+2019-07-04 Alan Hayward <alan.hayward@arm.com>
+
+ * configure.srv: Remove legacy xml.
+ * linux-aarch64-low.c (initialize_low_arch): Remove
+ initialize_low_tdesc call.
+ * linux-aarch64-tdesc-selftest.c: Remove file.
+ * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
+ * linux-x86-low.c (initialize_low_arch): Remove
+ initialize_low_tdesc call.
+ * linux-x86-tdesc-selftest.c: Remove file.
+ * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
+
2019-06-20 Tom de Vries <tdevries@suse.de>
* linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
# Default hostio_last_error implementation
srv_hostio_err_objs="hostio-errno.o"
-if $enable_unittests; then
- srv_i386_linux_regobj="i386-linux.o i386-avx-linux.o i386-avx-avx512-linux.o i386-avx-mpx-avx512-pku-linux.o i386-mpx-linux.o i386-avx-mpx-linux.o i386-mmx-linux.o linux-x86-tdesc-selftest.o"
- srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o amd64-avx-avx512-linux.o amd64-avx-mpx-avx512-pku-linux.o amd64-mpx-linux.o amd64-avx-mpx-linux.o x32-linux.o x32-avx-linux.o x32-avx-avx512-linux.o"
-else
- srv_i386_linux_regobj=""
- srv_amd64_linux_regobj=""
-fi
-
ipa_ppc_linux_regobj="powerpc-32l-ipa.o powerpc-altivec32l-ipa.o powerpc-cell32l-ipa.o powerpc-vsx32l-ipa.o powerpc-isa205-32l-ipa.o powerpc-isa205-altivec32l-ipa.o powerpc-isa205-vsx32l-ipa.o powerpc-isa205-ppr-dscr-vsx32l-ipa.o powerpc-isa207-vsx32l-ipa.o powerpc-isa207-htm-vsx32l-ipa.o powerpc-e500l-ipa.o powerpc-64l-ipa.o powerpc-altivec64l-ipa.o powerpc-cell64l-ipa.o powerpc-vsx64l-ipa.o powerpc-isa205-64l-ipa.o powerpc-isa205-altivec64l-ipa.o powerpc-isa205-vsx64l-ipa.o powerpc-isa205-ppr-dscr-vsx64l-ipa.o powerpc-isa207-vsx64l-ipa.o powerpc-isa207-htm-vsx64l-ipa.o"
# Linux object files. This is so we don't have to repeat
# Input is taken from the "${target}" variable.
case "${target}" in
- aarch64*-*-linux*)
- srv_regobj="arm-with-neon.o"
- if $enable_unittests; then
- srv_regobj="${srv_regobj} aarch64.o"
- srv_regobj="${srv_regobj} linux-aarch64-tdesc-selftest.o"
- fi
+ aarch64*-*-linux*) srv_regobj="arm-with-neon.o"
srv_tgtobj="linux-aarch64-low.o aarch64-linux-hw-point.o"
srv_tgtobj="$srv_tgtobj linux-aarch32-low.o"
srv_tgtobj="${srv_tgtobj} arch/arm.o"
srv_tgtobj="x86-low.o x86-dregs.o win32-low.o win32-i386-low.o"
srv_tgtobj="${srv_tgtobj} arch/i386.o"
;;
- i[34567]86-*-linux*) srv_regobj="$srv_i386_linux_regobj"
- if test "$gdb_cv_i386_is_x86_64" = yes ; then
- srv_regobj="$srv_regobj $srv_amd64_linux_regobj"
- srv_tgtobj="amd64-linux-siginfo.o"
- fi
- srv_tgtobj="${srv_tgtobj} arch/i386.o"
+ i[34567]86-*-linux*) srv_tgtobj="${srv_tgtobj} arch/i386.o"
srv_tgtobj="${srv_tgtobj} $srv_linux_obj linux-x86-low.o x86-low.o x86-dregs.o i387-fp.o"
srv_tgtobj="${srv_tgtobj} linux-x86-tdesc.o"
srv_tgtobj="${srv_tgtobj} linux-btrace.o x86-linux.o"
srv_linux_usrregs=yes
srv_linux_thread_db=yes
;;
- x86_64-*-linux*) srv_regobj="$srv_amd64_linux_regobj $srv_i386_linux_regobj"
- srv_tgtobj="$srv_linux_obj linux-x86-low.o x86-low.o x86-dregs.o i387-fp.o"
+ x86_64-*-linux*) srv_tgtobj="$srv_linux_obj linux-x86-low.o x86-low.o"
+ srv_tgtobj="${srv_tgtobj} x86-dregs.o i387-fp.o"
srv_tgtobj="${srv_tgtobj} arch/i386.o arch/amd64.o"
srv_tgtobj="${srv_tgtobj} linux-x86-tdesc.o"
srv_tgtobj="${srv_tgtobj} linux-btrace.o x86-linux.o"
initialize_regsets_info (&aarch64_regsets_info);
initialize_regsets_info (&aarch64_sve_regsets_info);
-
-#if GDB_SELF_TEST
- initialize_low_tdesc ();
-#endif
}
+++ /dev/null
-/* Copyright (C) 2017-2019 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#include "server.h"
-#include "tdesc.h"
-#include "common/selftest.h"
-#include "linux-aarch64-tdesc.h"
-
-/* Defined in auto-generated file features/aarch64.c. */
-void init_registers_aarch64 (void);
-extern const struct target_desc *tdesc_aarch64;
-
-namespace selftests {
-namespace tdesc {
-static void
-aarch64_tdesc_test ()
-{
- const target_desc *tdesc = aarch64_linux_read_description (0, false);
- SELF_CHECK (*tdesc == *tdesc_aarch64);
-}
-}
-} // namespace selftests
-
-void
-initialize_low_tdesc ()
-{
- init_registers_aarch64 ();
-
- selftests::register_test ("aarch64-tdesc",
- selftests::tdesc::aarch64_tdesc_test);
-}
const target_desc * aarch64_linux_read_description (uint64_t vq, bool pauth_p);
-#if GDB_SELF_TEST
-void initialize_low_tdesc ();
-#endif
-
#endif /* GDBSERVER_LINUX_AARCH64_TDESC_H */
tdesc_amd64_linux_no_xml->xmltarget = xmltarget_amd64_linux_no_xml;
#endif
-#if GDB_SELF_TEST
- initialize_low_tdesc ();
-#endif
-
tdesc_i386_linux_no_xml = allocate_target_description ();
copy_target_description (tdesc_i386_linux_no_xml,
i386_linux_read_description (X86_XSTATE_SSE_MASK));
+++ /dev/null
-/* Copyright (C) 2017-2019 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#include "server.h"
-#include "linux-x86-tdesc.h"
-#include "tdesc.h"
-#include "common/selftest.h"
-#include "common/x86-xstate.h"
-
-/* Defined in auto-generated file i386-linux.c. */
-void init_registers_i386_linux (void);
-extern const struct target_desc *tdesc_i386_linux;
-
-/* Defined in auto-generated file i386-mmx-linux.c. */
-void init_registers_i386_mmx_linux (void);
-extern const struct target_desc *tdesc_i386_mmx_linux;
-
-/* Defined in auto-generated file i386-avx-linux.c. */
-void init_registers_i386_avx_linux (void);
-extern const struct target_desc *tdesc_i386_avx_linux;
-
-/* Defined in auto-generated file i386-avx-mpx-linux.c. */
-void init_registers_i386_avx_mpx_linux (void);
-extern const struct target_desc *tdesc_i386_avx_mpx_linux;
-
-/* Defined in auto-generated file i386-avx-avx512-linux.c. */
-void init_registers_i386_avx_avx512_linux (void);
-extern const struct target_desc *tdesc_i386_avx_avx512_linux;
-
-/* Defined in auto-generated file i386-avx-mpx-avx512-linux.c. */
-void init_registers_i386_avx_mpx_avx512_pku_linux (void);
-extern const struct target_desc *tdesc_i386_avx_mpx_avx512_pku_linux;
-
-/* Defined in auto-generated file i386-mpx-linux.c. */
-void init_registers_i386_mpx_linux (void);
-extern const struct target_desc *tdesc_i386_mpx_linux;
-
-#ifdef __x86_64__
-
-/* Defined in auto-generated file amd64-linux.c. */
-void init_registers_amd64_linux (void);
-extern const struct target_desc *tdesc_amd64_linux;
-
-/* Defined in auto-generated file amd64-avx-linux.c. */
-void init_registers_amd64_avx_linux (void);
-extern const struct target_desc *tdesc_amd64_avx_linux;
-
-/* Defined in auto-generated file amd64-avx-avx512-linux.c. */
-void init_registers_amd64_avx_avx512_linux (void);
-extern const struct target_desc *tdesc_amd64_avx_avx512_linux;
-
-/* Defined in auto-generated file amd64-avx-mpx-avx512-pku-linux.c. */
-void init_registers_amd64_avx_mpx_avx512_pku_linux (void);
-extern const struct target_desc *tdesc_amd64_avx_mpx_avx512_pku_linux;
-
-/* Defined in auto-generated file amd64-avx-mpx-linux.c. */
-void init_registers_amd64_avx_mpx_linux (void);
-extern const struct target_desc *tdesc_amd64_avx_mpx_linux;
-
-/* Defined in auto-generated file amd64-mpx-linux.c. */
-void init_registers_amd64_mpx_linux (void);
-extern const struct target_desc *tdesc_amd64_mpx_linux;
-
-/* Defined in auto-generated file x32-linux.c. */
-void init_registers_x32_linux (void);
-extern const struct target_desc *tdesc_x32_linux;
-
-/* Defined in auto-generated file x32-avx-linux.c. */
-void init_registers_x32_avx_linux (void);
-extern const struct target_desc *tdesc_x32_avx_linux;
-
-/* Defined in auto-generated file x32-avx-avx512-linux.c. */
-void init_registers_x32_avx_avx512_linux (void);
-extern const struct target_desc *tdesc_x32_avx_avx512_linux;
-
-#endif
-
-namespace selftests {
-namespace tdesc {
-static void
-i386_tdesc_test ()
-{
- struct
- {
- unsigned int mask;
- const target_desc *tdesc;
- } tdesc_tests[] = {
- { X86_XSTATE_X87, tdesc_i386_mmx_linux },
- { X86_XSTATE_SSE_MASK, tdesc_i386_linux },
- { X86_XSTATE_AVX_MASK, tdesc_i386_avx_linux },
- { X86_XSTATE_MPX_MASK, tdesc_i386_mpx_linux },
- { X86_XSTATE_AVX_MPX_MASK, tdesc_i386_avx_mpx_linux },
- { X86_XSTATE_AVX_AVX512_MASK, tdesc_i386_avx_avx512_linux },
- { X86_XSTATE_AVX_MPX_AVX512_PKU_MASK, tdesc_i386_avx_mpx_avx512_pku_linux }
- };
-
- for (auto &elem : tdesc_tests)
- {
- const target_desc *tdesc = i386_linux_read_description (elem.mask);
-
- SELF_CHECK (*tdesc == *elem.tdesc);
- }
-}
-
-#ifdef __x86_64__
-
-static void
-amd64_tdesc_test ()
-{
- struct
- {
- unsigned int mask;
- const target_desc *tdesc[2];
- } tdesc_tests[] = {
- { X86_XSTATE_SSE_MASK, { tdesc_amd64_linux, tdesc_x32_linux } },
- { X86_XSTATE_AVX_MASK, { tdesc_amd64_avx_linux, tdesc_x32_avx_linux } },
- { X86_XSTATE_MPX_MASK, { tdesc_amd64_mpx_linux, tdesc_x32_avx_linux } },
- { X86_XSTATE_AVX_MPX_MASK, { tdesc_amd64_avx_mpx_linux,
- tdesc_x32_avx_linux } },
- { X86_XSTATE_AVX_AVX512_MASK, { tdesc_amd64_avx_avx512_linux,
- tdesc_x32_avx_avx512_linux } },
- { X86_XSTATE_AVX_MPX_AVX512_PKU_MASK,
- { tdesc_amd64_avx_mpx_avx512_pku_linux, tdesc_x32_avx_avx512_linux } },
- };
-
- for (auto &elem : tdesc_tests)
- {
- for (int i = 0; i < 2; i++)
- {
- const target_desc *tdesc = amd64_linux_read_description (elem.mask,
- i);
-
- SELF_CHECK (*tdesc == *elem.tdesc[i]);
- }
- }
-}
-
-#endif
-}
-} // namespace selftests
-
-void
-initialize_low_tdesc ()
-{
- init_registers_i386_linux ();
- init_registers_i386_mmx_linux ();
- init_registers_i386_avx_linux ();
- init_registers_i386_mpx_linux ();
- init_registers_i386_avx_mpx_linux ();
- init_registers_i386_avx_avx512_linux ();
- init_registers_i386_avx_mpx_avx512_pku_linux ();
-
- selftests::register_test ("i386-tdesc", selftests::tdesc::i386_tdesc_test);
-
-#ifdef __x86_64__
- init_registers_x32_linux ();
- init_registers_x32_avx_linux ();
- init_registers_x32_avx_avx512_linux ();
-
- init_registers_amd64_linux ();
- init_registers_amd64_avx_linux ();
- init_registers_amd64_mpx_linux ();
- init_registers_amd64_avx_mpx_linux ();
- init_registers_amd64_avx_avx512_linux ();
- init_registers_amd64_avx_mpx_avx512_pku_linux ();
-
- selftests::register_test ("amd64-tdesc", selftests::tdesc::amd64_tdesc_test);
-#endif
-}
const struct target_desc *i386_linux_read_description (uint64_t xcr0);
-void initialize_low_tdesc ();
-
#endif /* GDBSERVER_LINUX_X86_TDESC_H */
{
gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_LINUX,
i386_linux_init_abi);
-
-#if GDB_SELF_TEST
- struct
- {
- const char *xml;
- uint64_t mask;
- } xml_masks[] = {
- { "i386/i386-linux.xml", X86_XSTATE_SSE_MASK },
- { "i386/i386-mmx-linux.xml", X86_XSTATE_X87_MASK },
- { "i386/i386-avx-linux.xml", X86_XSTATE_AVX_MASK },
- { "i386/i386-mpx-linux.xml", X86_XSTATE_MPX_MASK },
- { "i386/i386-avx-mpx-linux.xml", X86_XSTATE_AVX_MPX_MASK },
- { "i386/i386-avx-avx512-linux.xml", X86_XSTATE_AVX_AVX512_MASK },
- { "i386/i386-avx-mpx-avx512-pku-linux.xml",
- X86_XSTATE_AVX_MPX_AVX512_PKU_MASK },
- };
-
- for (auto &a : xml_masks)
- {
- auto tdesc = i386_linux_read_description (a.mask);
-
- selftests::record_xml_tdesc (a.xml, tdesc);
- }
-#endif /* GDB_SELF_TEST */
}
/* Tell remote stub that we support XML target description. */
register_remote_support_xml ("i386");
-
-#if GDB_SELF_TEST
- struct
- {
- const char *xml;
- uint64_t mask;
- } xml_masks[] = {
- { "i386/i386.xml", X86_XSTATE_SSE_MASK },
- { "i386/i386-mmx.xml", X86_XSTATE_X87_MASK },
- { "i386/i386-avx.xml", X86_XSTATE_AVX_MASK },
- { "i386/i386-mpx.xml", X86_XSTATE_MPX_MASK },
- { "i386/i386-avx-mpx.xml", X86_XSTATE_AVX_MPX_MASK },
- { "i386/i386-avx-avx512.xml", X86_XSTATE_AVX_AVX512_MASK },
- { "i386/i386-avx-mpx-avx512-pku.xml",
- X86_XSTATE_AVX_MPX_AVX512_PKU_MASK },
- };
-
- for (auto &a : xml_masks)
- {
- auto tdesc = i386_target_description (a.mask, false);
-
- selftests::record_xml_tdesc (a.xml, tdesc);
- }
-#endif /* GDB_SELF_TEST */
}
+2019-07-04 Alan Hayward <alan.hayward@arm.com>
+
+ * gdb.server/unittest.exp: Allow 0 unit tests to run.
+
2019-07-03 Pedro Alves <palves@redhat.com>
* lib/gdb.exp (foreach_with_prefix): Use "catch" and
-i $server_spawn_id
-re "Ran ($decimal) unit tests, 0 failed" {
set num_ran $expect_out(1,string)
- gdb_assert "$num_ran > 0" $test
+ gdb_assert "$num_ran >= 0" $test
}
-re "Selftests have been disabled for this build.\r\n$" {