diff options
author | Tom de Vries <tdevries@suse.de> | 2022-06-03 15:34:50 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2022-06-03 15:34:50 +0200 |
commit | 0e02119e65b566cad575cc57fe423dadab855a56 (patch) | |
tree | 2e87adc976564f94062e7d8eec9d70483e44e4cc /gdb/selftest-arch.c | |
parent | a98600052eb680249abae0083a7c24d7e57f7379 (diff) | |
download | binutils-gdb-0e02119e65b566cad575cc57fe423dadab855a56.tar.gz |
Revert "[gdb] Fix warning in foreach_arch selftests"
This reverts commit fc18b1c5afd ("[gdb] Fix warning in foreach_arch
selftests").
The commit introduced regressions for an --enable-targets=all build:
...
Running selftest print_one_insn::A6.^M
Self test failed: Cannot access memory at address 0x0^M
...
and while investigating those I realized that the commit fc18b1c5afd
complicates things by trying to set the current osabi.
So, revert the patch in preparation for a simpler solution.
Tested on x86_64-linux.
Diffstat (limited to 'gdb/selftest-arch.c')
-rw-r--r-- | gdb/selftest-arch.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/gdb/selftest-arch.c b/gdb/selftest-arch.c index a4d9de5a74d..f434da718d5 100644 --- a/gdb/selftest-arch.c +++ b/gdb/selftest-arch.c @@ -66,28 +66,12 @@ foreach_arch_test_generator (const std::string &name, auto test_fn = ([=] () { - /* Prevent warnings when setting architecture with current osabi - settings, like: - A handler for the OS ABI "GNU/Linux" is not built into this - configuration of GDB. Attempting to continue with the - default aarch64:ilp32 settings. */ - enum gdb_osabi_mode mode; - enum gdb_osabi osabi; - get_osabi (mode, osabi); - - set_osabi (osabi_user, GDB_OSABI_NONE); - SCOPE_EXIT - { - reset (); - set_osabi (mode, osabi); - }; - struct gdbarch_info info; info.bfd_arch_info = bfd_scan_arch (arch); struct gdbarch *gdbarch = gdbarch_find_by_info (info); SELF_CHECK (gdbarch != NULL); - function (gdbarch); + reset (); }); tests.emplace_back (string_printf ("%s::%s", name.c_str (), arch), |