[gdb] Change register_test to use std::function arg
authorTom de Vries <tdevries@suse.de>
Mon, 20 Sep 2021 22:41:26 +0000 (00:41 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 20 Sep 2021 22:41:26 +0000 (00:41 +0200)
commitc45a683f8f9195bf7cc53bc645a20092c7155629
tree93e96b2d5fbccefbef3314c948b5db93da1be70b
parent6f265beb28a7465c9e75fdb169d15a87f9a3a5d6
[gdb] Change register_test to use std::function arg

Change register_test to use std::function arg, such that we can do:
...
  register_test (test_name, [=] () { SELF_CHECK (...); });
...

Tested on x86_64-linux.
gdb/unittests/intrusive_list-selftests.c
gdbsupport/selftest.cc
gdbsupport/selftest.h