]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: move display of completion results into completion_result class
authorAndrew Burgess <aburgess@redhat.com>
Wed, 21 Feb 2024 11:28:31 +0000 (11:28 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Sat, 7 Sep 2024 19:28:58 +0000 (20:28 +0100)
commit1d1df7539771d00721abe5dd8da4645e233ed3f5
treeb18d09377f42fd0b6d6316e087c70ed13369d6c4
parent3503687591356ace0dcae967104952db467936ee
gdb: move display of completion results into completion_result class

This commit moves the printing of the 'complete' command results out
of the 'complete_command' function.  The printing is now done in a new
member function 'completion_result::print_matches'.  At this point,
this is entirely a refactor.

The motivation for this refactor is how 'complete' should print the
completion of filename arguments.  In some cases the filename results
need to have escaping added to the output.  This escaping needs to be
done immediately prior to printing the result as adding too early will
result in multiple 'complete' results potentially being sorted
incorrectly.  See the subsequent commits for more details.

There should be no user visible changes after this commit.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/cli/cli-cmds.c
gdb/completer.c
gdb/completer.h