gdb: add selftest name completion
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 23 Sep 2021 13:56:51 +0000 (09:56 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 28 Oct 2021 15:17:45 +0000 (11:17 -0400)
commitc0492bea7ca33fafc280f08f4ed9f505d29e7130
tree573f368c19b8c952d10b85deb697296d0822a263
parent8c2999954bd3aa5853f553eb6a050dd38e6d9029
gdb: add selftest name completion

After the previous commit, it is easy to add completion for selftest
names.  Again, this is not particularly high value, but I rarely touched
completion, so it served as a simple example to get some practice.

Change the for_each_selftest_ftype parameter to gdb::function_view, so
that we can pass a lambda that captures things.

Change-Id: I87cac299ddca9ca7eb0ffab78342e850a98d954c
gdb/maint.c
gdb/testsuite/gdb.gdb/unittest.exp
gdbsupport/selftest.h