[gdb/testsuite] Register test for each arch separately in register_test_foreach_arch
In gdb/disasm-selftests.c we have:
...
selftests::register_test_foreach_arch ("print_one_insn",
selftests::print_one_insn_test);
...
and we get:
...
$ gdb -q -batch -ex "maint selftest print_one_insn" 2>&1 \
| grep ^Running
Running selftest print_one_insn.
$
...
Change the semantics register_test_foreach_arch such that a version of
print_one_insn is registered for each architecture, such that we have:
...
$ gdb -q -batch -ex "maint selftest print_one_insn" 2>&1 \
| grep ^Running
Running selftest print_one_insn::A6.
Running selftest print_one_insn::A7.
Running selftest print_one_insn::ARC600.
...
$
...
This makes it f.i. possible to do:
...
$ gdb -q -batch a.out -ex "maint selftest print_one_insn::armv8.1-m.main"
Running selftest print_one_insn::armv8.1-m.main.
Self test failed: self-test failed at src/gdb/disasm-selftests.c:165
Ran 1 unit tests, 1 failed
...
Tested on x86_64-linux with an --enable-targets=all build.