[gdb] Add maint selftest -verbose option
authorTom de Vries <tdevries@suse.de>
Wed, 22 Sep 2021 09:47:50 +0000 (11:47 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 22 Sep 2021 09:47:50 +0000 (11:47 +0200)
commit479209dd4ff90c0bc66d80ebdcb1f21ea8fbb62d
treea691e68cad6f280d8898557a6b6cea72cda0c9af
parentcf11ebea1206a7c459a94fef8e0880087dd9f38f
[gdb] Add maint selftest -verbose option

The print_one_insn selftest in gdb/disasm-selftests.c contains:
...
  /* If you want to see the disassembled instruction printed to gdb_stdout,
     set verbose to true.  */
  static const bool verbose = false;
...

Make this parameter available in the maint selftest command using a new option
-verbose, such that we can do:
...
(gdb) maint selftest -verbose print_one_insn
...

Tested on x86_64-linux.
gdb/disasm-selftests.c
gdb/doc/gdb.texinfo
gdb/maint.c
gdbsupport/selftest.cc
gdbsupport/selftest.h