diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-06-03 15:54:19 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-06-23 13:34:11 +0100 |
commit | 52b50f2c1b1eaf6fd6e685e2c9575f92c581a6dc (patch) | |
tree | e8c703b45b2074b1eb8f335c4c55387151d41d5b /gdb/language.h | |
parent | ec8cec5b96e2ebbd5e25a737c69d311970a8b219 (diff) | |
download | gdb-52b50f2c1b1eaf6fd6e685e2c9575f92c581a6dc.zip gdb-52b50f2c1b1eaf6fd6e685e2c9575f92c581a6dc.tar.gz gdb-52b50f2c1b1eaf6fd6e685e2c9575f92c581a6dc.tar.bz2 |
gdb: Convert language la_printchar field to a method
This commit changes the language_data::la_printchar 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_language_data): Delete la_printchar initializer.
(ada_language::printchar): New member function.
* c-lang.c (c_language_data): Delete la_printchar initializer.
(cplus_language_data): Likewise.
(asm_language_data): Likewise.
(minimal_language_data): Likewise.
* d-lang.c (d_language_data): Likewise.
* f-lang.c (f_printchar): Rename to f_language::printchar.
(f_language_data): Delete la_printchar initializer.
(f_language::printchar): New member function, implementation from
f_printchar.
* go-lang.c (go_language_data): Delete la_printchar initializer.
* language.c (unk_lang_printchar): Delete.
(language_defn::printchar): Define new member function.
(unknown_language_data): Delete la_printchar initializer.
(unknown_language::printchar): New member function.
(auto_language_data): Delete la_printchar initializer.
(auto_language::printchar): New member function.
* language.h (language_data): Delete la_printchar field.
(language_defn::printchar): Declare new member function.
(LA_PRINT_CHAR): Update call to printchar.
* m2-lang.c (m2_language_data): Delete la_printchar initializer.
(m2_language::printchar): New member function.
* objc-lang.c (objc_language_data): Delete la_printchar
initializer.
* opencl-lang.c (opencl_language_data): Likewise.
* p-lang.c (pascal_language_data): Delete la_printchar
initializer.
(pascal_language::printchar): New member function.
* rust-lang.c (rust_printchar): Rename to
rust_language::printchar.
(rust_language_data): Delete la_printchar initializer.
(rust_language::printchar): New member function, implementation
from rust_printchar.
Diffstat (limited to 'gdb/language.h')
-rw-r--r-- | gdb/language.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/language.h b/gdb/language.h index 612afb3..fc9efd8 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -225,9 +225,6 @@ struct language_data const struct exp_descriptor *la_exp_desc; - void (*la_printchar) (int ch, struct type *chtype, - struct ui_file * stream); - void (*la_printstr) (struct ui_file * stream, struct type *elttype, const gdb_byte *string, unsigned int length, const char *encoding, int force_ellipses, @@ -547,6 +544,9 @@ struct language_defn : language_data virtual void emitchar (int ch, struct type *chtype, struct ui_file *stream, int quoter) const; + virtual void printchar (int ch, struct type *chtype, + struct ui_file * stream) const; + protected: /* This is the overridable part of the GET_SYMBOL_NAME_MATCHER method. @@ -649,7 +649,7 @@ extern enum language set_language (enum language); (current_language->value_print (val,stream,options)) #define LA_PRINT_CHAR(ch, type, stream) \ - (current_language->la_printchar(ch, type, stream)) + (current_language->printchar (ch, type, stream)) #define LA_PRINT_STRING(stream, elttype, string, length, encoding, force_ellipses, options) \ (current_language->la_printstr(stream, elttype, string, length, \ encoding, force_ellipses,options)) |