[PATCH 3/3] gdb: add selftest name completion
Tom de Vries
tdevries@suse.de
Fri Oct 29 07:24:52 GMT 2021
On 10/28/21 5:18 PM, Simon Marchi wrote:
> On 2021-09-23 3:35 p.m., Pedro Alves wrote:
>> On 2021-09-23 2:56 p.m., Simon Marchi via Gdb-patches wrote:
>>> From: Simon Marchi <simon.marchi@polymtl.ca>
>>>
>>> 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.
>>>
>>
>> LGTM. Thanks! Maybe adding a couple completion tests wouldn't hurt though.
>>
>> - test completing some unit test name that exits.
>> - test completing some unit test name that doesn't exist.
>>
>> At least this would make sure we don't crash.
>>
>> You would use the completion-support.exp routines, like test_gdb_complete_unique,
>> test_gdb_complete_multiple, test_gdb_complete_none.
>>
>
> Thanks, added a test and pushed.
This caused a build breaker with --disable-unit-tests, fixed by patch
below. Any comments?
Thanks,
- Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gdb-build-Fix-build-with-disable-unit-tests.patch
Type: text/x-patch
Size: 3196 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/gdb-patches/attachments/20211029/4d03a5e1/attachment-0001.bin>
More information about the Gdb-patches
mailing list