mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 10:35:12 +08:00
Add xml selftests for aarch64 target description.
gdb/ * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc selftest. gdbserver/ * 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.
This commit is contained in:
parent
49bdb7ee48
commit
6654d750c7
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
@ -3069,6 +3069,8 @@ When on, AArch64 specific debugging is enabled."),
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,17 @@
|
||||
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.
|
||||
|
@ -53,6 +53,7 @@ case "${target}" in
|
||||
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"
|
||||
|
@ -2998,4 +2998,8 @@ initialize_low_arch (void)
|
||||
initialize_low_arch_aarch32 ();
|
||||
|
||||
initialize_regsets_info (&aarch64_regsets_info);
|
||||
|
||||
#if GDB_SELF_TEST
|
||||
initialize_low_tdesc ();
|
||||
#endif
|
||||
}
|
||||
|
45
gdb/gdbserver/linux-aarch64-tdesc-selftest.c
Normal file
45
gdb/gdbserver/linux-aarch64-tdesc-selftest.c
Normal file
@ -0,0 +1,45 @@
|
||||
/* 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);
|
||||
}
|
@ -18,3 +18,7 @@
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user