diff options
author | Andrew Burgess <aburgess@redhat.com> | 2024-02-19 10:53:54 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2024-03-25 17:47:44 +0000 |
commit | ec483c2344f967708cfa71c84ef349b6951c1374 (patch) | |
tree | 8cb4e06eb3351118b83c618ee2430e5969fa6f0e /include | |
parent | 10c58fd8df4b3cbdadd536fbccb39ed111c594c2 (diff) | |
download | gdb-ec483c2344f967708cfa71c84ef349b6951c1374.zip gdb-ec483c2344f967708cfa71c84ef349b6951c1374.tar.gz gdb-ec483c2344f967708cfa71c84ef349b6951c1374.tar.bz2 |
gdb: move more completion setup into completer.c
Move more setup of the readline global state relating to tab
completion into completer.c out of top.c.
Lots of the readline setup is done in init_main (top.c). This commit
moves those bits of initialisation that relate to completion, and
which are only set the one time, into completer.c. This does mean
that readline initialisation is now done in multiple locations, some
in init_main (top.c) and some in completer.c, but I think this is OK.
The work done in init_main is the general readline setup.
I think making static what can be made static, and having it all in
one file, makes things easier to reason about. So I'm OK with having
this split initialisation.
The only completion related thing which is still setup in top.c is
rl_completion_display_matches_hook. I've left this where it is for
now as rl_completion_display_matches_hook is also updated in the tui
code, and the display hook functions are not in completer.c anyway, so
moving this initialisation to completer.c would not allow anything
else to be made static.
There should be no user visible changes after this commit.
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions