diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-06-01 14:40:22 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-06-17 09:25:10 +0100 |
commit | 53fc67f8b2663261810353ae8e4f9920ae7a1c56 (patch) | |
tree | 2007f3b5c9df85734732d64a6363d0ac5543c688 /gdb/completer.c | |
parent | c9debfb97e052c32cf0308157cae529ce2059f48 (diff) | |
download | gdb-53fc67f8b2663261810353ae8e4f9920ae7a1c56.zip gdb-53fc67f8b2663261810353ae8e4f9920ae7a1c56.tar.gz gdb-53fc67f8b2663261810353ae8e4f9920ae7a1c56.tar.bz2 |
gdb: Convert language la_word_break_characters field to a method
This commit changes the language_data::la_word_break_characters
function pointer member variable into a member function of
language_defn.
There should be no user visible changes after this commit.
gdb/ChangeLog:
* ada-lang.c (ada_get_gdb_completer_word_break_characters): Delete.
(ada_language_data): Delete la_word_break_characters initializer.
(ada_language::word_break_characters): New member function.
* c-lang.c (c_language_data): Delete la_word_break_characters
initializer.
(cplus_language_data): Likewise.
(asm_language_data): Likewise.
(minimal_language_data): Likewise.
* completer.c: Update global comment.
(advance_to_expression_complete_word_point): Update call to
word_break_characters.
(complete_files_symbols): Likewise.
(complete_line_internal_1): Likewise.
(default_completer_handle_brkchars): Likewise.
(skip_quoted_chars): Likewise.
* d-lang.c (d_language_data): Delete la_word_break_characters
initializer.
* f-lang.c (f_word_break_characters): Delete.
(f_language_data): Delete la_word_break_characters initializer.
(f_language::word_break_characters): New member function.
* go-lang.c (go_language_data): Delete la_word_break_characters
initializer.
* language.c (unknown_language_data): Likewise.
(auto_language_data): Likewise.
* language.h (default_word_break_characters): Move declaration to
earlier in the file.
(language_data): Delete la_word_break_characters field.
(language_defn::word_break_characters): New member function.
* m2-lang.c (m2_language_data): Delete la_word_break_characters
initializer.
* objc-lang.c (objc_language_data): Likewise.
* opencl-lang.c (opencl_language_data): Likewise.
* p-lang.c (pascal_language_data): Likewise.
* rust-lang.c (rust_language_data): Likewise.
Diffstat (limited to 'gdb/completer.c')
-rw-r--r-- | gdb/completer.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/completer.c b/gdb/completer.c index 1ec0a0e..ea07096 100644 --- a/gdb/completer.c +++ b/gdb/completer.c @@ -155,7 +155,7 @@ enum explicit_location_match_type but it does affect how much stuff M-? lists. (2) If one of the matches contains a word break character, readline will quote it. That's why we switch between - current_language->la_word_break_characters() and + current_language->word_break_characters () and gdb_completer_command_word_break_characters. I'm not sure when we need this behavior (perhaps for funky characters in C++ symbols?). */ @@ -448,7 +448,7 @@ const char * advance_to_expression_complete_word_point (completion_tracker &tracker, const char *text) { - const char *brk_chars = current_language->la_word_break_characters (); + const char *brk_chars = current_language->word_break_characters (); return advance_to_completion_word (tracker, brk_chars, text); } @@ -573,7 +573,7 @@ complete_files_symbols (completion_tracker &tracker, colon = p; symbol_start = p + 1; } - else if (strchr (current_language->la_word_break_characters(), *p)) + else if (strchr (current_language->word_break_characters (), *p)) symbol_start = p + 1; } @@ -1348,7 +1348,7 @@ complete_line_internal_1 (completion_tracker &tracker, strings, which leaves out the '-' and '.' character used in some commands. */ set_rl_completer_word_break_characters - (current_language->la_word_break_characters()); + (current_language->word_break_characters ()); /* Decide whether to complete on a list of gdb commands or on symbols. */ @@ -1964,7 +1964,7 @@ default_completer_handle_brkchars (struct cmd_list_element *ignore, const char *text, const char *word) { set_rl_completer_word_break_characters - (current_language->la_word_break_characters ()); + (current_language->word_break_characters ()); } /* See definition in completer.h. */ @@ -2473,7 +2473,7 @@ skip_quoted_chars (const char *str, const char *quotechars, quotechars = gdb_completer_quote_characters; if (breakchars == NULL) - breakchars = current_language->la_word_break_characters(); + breakchars = current_language->word_break_characters (); for (scan = str; *scan != '\0'; scan++) { |