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/language.h | |
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/language.h')
-rw-r--r-- | gdb/language.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gdb/language.h b/gdb/language.h index 7e5837f..8c6f7e3 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -169,6 +169,9 @@ struct language_pass_by_ref_info bool destructible = true; }; +/* Splitting strings into words. */ +extern const char *default_word_break_characters (void); + /* Structure tying together assorted information about a language. As we move over from the old structure based languages to a class @@ -316,9 +319,6 @@ struct language_data /* Index to use for extracting the first element of a string. */ char string_lower_bound; - /* The list of characters forming word boundaries. */ - const char *(*la_word_break_characters) (void); - /* Add to the completion tracker all symbols which are possible completions for TEXT. WORD is the entire command on which the completion is being made. If CODE is TYPE_CODE_UNDEF, then all @@ -529,6 +529,12 @@ struct language_defn : language_data return nullptr; } + /* The list of characters forming word boundaries. */ + virtual const char *word_break_characters (void) const + { + return default_word_break_characters (); + } + /* List of all known languages. */ static const struct language_defn *languages[nr_languages]; @@ -691,9 +697,6 @@ extern CORE_ADDR skip_language_trampoline (struct frame_info *, CORE_ADDR pc); extern char *language_demangle (const struct language_defn *current_language, const char *mangled, int options); -/* Splitting strings into words. */ -extern const char *default_word_break_characters (void); - /* Return information about whether TYPE should be passed (and returned) by reference at the language level. */ struct language_pass_by_ref_info language_pass_by_reference (struct type *type); |