aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch-selftests.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbarch-selftests.c')
-rw-r--r--gdb/gdbarch-selftests.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/gdbarch-selftests.c b/gdb/gdbarch-selftests.c
index dbb9341..5c94f60 100644
--- a/gdb/gdbarch-selftests.c
+++ b/gdb/gdbarch-selftests.c
@@ -1,6 +1,6 @@
/* Self tests for gdbarch for GDB, the GNU debugger.
- Copyright (C) 2017-2024 Free Software Foundation, Inc.
+ Copyright (C) 2017-2025 Free Software Foundation, Inc.
This file is part of GDB.
@@ -25,8 +25,7 @@
#include "gdbsupport/def-vector.h"
#include "gdbarch.h"
#include "scoped-mock-context.h"
-
-#include <map>
+#include "gdbsupport/unordered_map.h"
namespace selftests {
@@ -128,10 +127,13 @@ register_to_value_test (struct gdbarch *gdbarch)
static void
register_name_test (struct gdbarch *gdbarch)
{
+ if (selftest_skip_warning_arch (gdbarch))
+ return;
+
scoped_mock_context<test_target_ops> mockctx (gdbarch);
/* Track the number of times each register name appears. */
- std::map<const std::string, int> name_counts;
+ gdb::unordered_map<std::string, int> name_counts;
const int num_regs = gdbarch_num_cooked_regs (gdbarch);
for (auto regnum = 0; regnum < num_regs; regnum++)
@@ -179,11 +181,9 @@ check_stack_growth (struct gdbarch *gdbarch)
SELF_CHECK (stack_grows_up != stack_grows_down);
}
-} // namespace selftests
+} /* namespace selftests */
-void _initialize_gdbarch_selftests ();
-void
-_initialize_gdbarch_selftests ()
+INIT_GDB_FILE (gdbarch_selftests)
{
selftests::register_test_foreach_arch ("register_to_value",
selftests::register_to_value_test);