forked from Imagelibrary/binutils-gdb
[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.
This commit is contained in:
@@ -70,10 +70,23 @@ register_test (const std::string &name,
|
||||
|
||||
/* See selftest.h. */
|
||||
|
||||
static bool run_verbose_ = false;
|
||||
|
||||
/* See selftest.h. */
|
||||
|
||||
bool
|
||||
run_verbose ()
|
||||
{
|
||||
return run_verbose_;
|
||||
}
|
||||
|
||||
/* See selftest.h. */
|
||||
|
||||
void
|
||||
run_tests (gdb::array_view<const char *const> filters)
|
||||
run_tests (gdb::array_view<const char *const> filters, bool verbose)
|
||||
{
|
||||
int ran = 0, failed = 0;
|
||||
run_verbose_ = verbose;
|
||||
|
||||
for (const auto &pair : tests)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user