2017-11-24 Alan Hayward <alan.hayward@arm.com>
+ * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
+ selftest.
+
+2017-11-24 Alan Hayward <alan.hayward@arm.com>
+
* aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
* arch/aarch64.c (aarch64_create_target_description): Create
new target description.
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 ());
#endif
}
2017-11-24 Alan Hayward <alan.hayward@arm.com>
+ * configure.srv: Add linux-aarch64-tdesc-selftest.o.
+ * linux-aarch64-low.c (initialize_low_arch): Call init func.
+ * linux-aarch64-tdesc-selftest.c: New file.
+ * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
+
+2017-11-24 Alan Hayward <alan.hayward@arm.com>
+
+ * configure.srv: Add new file.
+ * linux-aarch64-low.c (initialize_low_arch): Call init func.
+ * linux-aarch64-tdesc-selftest.c: New file.
+ * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
+
+2017-11-24 Alan Hayward <alan.hayward@arm.com>
+
* linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
* linux-aarch64-low.c (initialize_low_arch): Remove init.
* linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
srv_regobj="arm-with-neon.o"
if $development; then
srv_regobj="${srv_regobj} aarch64.o"
+ srv_regobj="${srv_regobj} linux-aarch64-tdesc-selftest.o"
fi
srv_tgtobj="linux-aarch64-low.o aarch64-linux-hw-point.o"
srv_tgtobj="$srv_tgtobj linux-aarch32-low.o"
initialize_low_arch_aarch32 ();
initialize_regsets_info (&aarch64_regsets_info);
+
+#if GDB_SELF_TEST
+ initialize_low_tdesc ();
+#endif
}
--- /dev/null
+/* Copyright (C) 2017 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 ();
+ SELF_CHECK (*tdesc == *tdesc_aarch64);
+}
+}
+} // namespace selftests
+
+void
+initialize_low_tdesc ()
+{
+ init_registers_aarch64 ();
+
+ selftests::register_test ("aarch64-tdesc",
+ selftests::tdesc::aarch64_tdesc_test);
+}
along with this program. If not, see <http://www.gnu.org/licenses/>. */
const target_desc * aarch64_linux_read_description ();
+
+#if GDB_SELF_TEST
+void initialize_low_tdesc ();
+#endif