23#include "gdbsupport/selftest.h"
29static bool skip_arch (
const char *arch)
31 if (strcmp (
"powerpc:EC603e", arch) == 0
32 || strcmp (
"powerpc:e500mc", arch) == 0
33 || strcmp (
"powerpc:e500mc64", arch) == 0
34 || strcmp (
"powerpc:titan", arch) == 0
35 || strcmp (
"powerpc:vle", arch) == 0
36 || strcmp (
"powerpc:e5500", arch) == 0
37 || strcmp (
"powerpc:e6500", arch) == 0)
48static std::vector<selftest>
49foreach_arch_test_generator (
const std::string &
name,
52 std::vector<selftest> tests;
54 tests.reserve (
arches.size ());
55 for (
const char *arch :
arches)
61 info.bfd_arch_info = bfd_scan_arch (arch);
75 bool has_sep = strchr (arch,
':') !=
nullptr;
79 else if (strncasecmp (
info.bfd_arch_info->arch_name, arch,
80 strlen (
info.bfd_arch_info->arch_name)) == 0)
87 id = string_printf (
"%s::%s",
info.bfd_arch_info->arch_name, arch);
89 id = string_printf (
"%s::%s",
name.c_str (),
id.c_str ());
90 tests.emplace_back (
id, test_fn);
101 add_lazy_generator ([=] ()
102 {
return foreach_arch_test_generator (
name, function); });
static std::vector< const char * > arches
std::vector< const char * > gdbarch_printable_names()
struct gdbarch * gdbarch_find_by_info(struct gdbarch_info info)
void reinit_frame_cache(void)
void register_test_foreach_arch(const std::string &name, self_test_foreach_arch_function *function)
void registers_changed(void)
void self_test_foreach_arch_function(struct gdbarch *)