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 /gdb/completer.h | |
parent | 10c58fd8df4b3cbdadd536fbccb39ed111c594c2 (diff) | |
download | binutils-ec483c2344f967708cfa71c84ef349b6951c1374.zip binutils-ec483c2344f967708cfa71c84ef349b6951c1374.tar.gz binutils-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 'gdb/completer.h')
-rw-r--r-- | gdb/completer.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/gdb/completer.h b/gdb/completer.h index 9011ba7..98a12f3 100644 --- a/gdb/completer.h +++ b/gdb/completer.h @@ -569,9 +569,6 @@ const char *advance_to_expression_complete_word_point extern const char *advance_to_filename_complete_word_point (completion_tracker &tracker, const char *text); -extern char **gdb_rl_attempted_completion_function (const char *text, - int start, int end); - extern void noop_completer (struct cmd_list_element *, completion_tracker &tracker, const char *, const char *); @@ -608,14 +605,6 @@ extern void reggroup_completer (struct cmd_list_element *, completion_tracker &tracker, const char *, const char *); -extern char *gdb_completion_word_break_characters (void); - -/* Set the word break characters array to BREAK_CHARS. This function - is useful as const-correct alternative to direct assignment to - rl_completer_word_break_characters, which is "char *", - not "const char *". */ -extern void set_rl_completer_word_break_characters (const char *break_chars); - /* Get the matching completer_handle_brkchars_ftype function for FN. FN is one of the core completer functions above (filename, location, symbol, etc.). This function is useful for cases when |