GDBserver

linux-aarch64-tdesc-selftest.c
Go to the documentation of this file.
1 /* Copyright (C) 2017-2018 Free Software Foundation, Inc.
2
3 This file is part of GDB.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17
18 #include "server.h"
19 #include "tdesc.h"
20 #include "common/selftest.h"
21 #include "linux-aarch64-tdesc.h"
22
23 /* Defined in auto-generated file features/aarch64.c. */
24 void init_registers_aarch64 (void);
25 extern const struct target_desc *tdesc_aarch64;
26
27 namespace selftests {
28 namespace tdesc {
29 static void
30 aarch64_tdesc_test ()
31 {
32 const target_desc *tdesc = aarch64_linux_read_description ();
33 SELF_CHECK (*tdesc == *tdesc_aarch64);
34 }
35 }
36 } // namespace selftests
37
38 void
39 initialize_low_tdesc ()
40 {
41 init_registers_aarch64 ();
42
43 selftests::register_test ("aarch64-tdesc",
44 selftests::tdesc::aarch64_tdesc_test);
45 }
tdesc_aarch64
const struct target_desc * tdesc_aarch64
selftests
Definition: linux-aarch64-tdesc-selftest.c:27
selftests::tdesc::aarch64_tdesc_test
static void aarch64_tdesc_test()
Definition: linux-aarch64-tdesc-selftest.c:30
server.h
initialize_low_tdesc
void initialize_low_tdesc()
Definition: linux-aarch64-tdesc-selftest.c:39
aarch64_linux_read_description
const target_desc * aarch64_linux_read_description()
Definition: linux-aarch64-tdesc.c:28
target_desc
Definition: tdesc.h:33
init_registers_aarch64
void init_registers_aarch64(void)
selftest.h
linux-aarch64-tdesc.h
selftests::register_test
void register_test(const std::string &name, selftest *test)
Definition: selftest.c:52
tdesc.h
SELF_CHECK
#define SELF_CHECK(VALUE)
Definition: selftest.h:67