diff options
author | Tom Tromey <tom@tromey.com> | 2022-02-11 18:14:17 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-10-10 10:43:34 -0600 |
commit | 3a3bb6eb36a29e3201bfc4cc53e341f4f98e6cf1 (patch) | |
tree | 22ec337890716a5e76f998328a2b6cafedb833a8 | |
parent | c1c7fe59f67f5f4e3ca6f6fea1de46b983be8995 (diff) | |
download | binutils-3a3bb6eb36a29e3201bfc4cc53e341f4f98e6cf1.zip binutils-3a3bb6eb36a29e3201bfc4cc53e341f4f98e6cf1.tar.gz binutils-3a3bb6eb36a29e3201bfc4cc53e341f4f98e6cf1.tar.bz2 |
Remove c_printstr
This renames c_printstr, removing a layer of indirection.
-rw-r--r-- | gdb/c-lang.c | 8 | ||||
-rw-r--r-- | gdb/c-lang.h | 8 | ||||
-rw-r--r-- | gdb/language.c | 12 | ||||
-rw-r--r-- | gdb/rust-lang.c | 5 |
4 files changed, 7 insertions, 26 deletions
diff --git a/gdb/c-lang.c b/gdb/c-lang.c index d6c56f3..437f79c 100644 --- a/gdb/c-lang.c +++ b/gdb/c-lang.c @@ -190,10 +190,10 @@ language_defn::printchar (int c, struct type *type, characters, or if FORCE_ELLIPSES. */ void -c_printstr (struct ui_file *stream, struct type *type, - const gdb_byte *string, unsigned int length, - const char *user_encoding, int force_ellipses, - const struct value_print_options *options) +language_defn::printstr (struct ui_file *stream, struct type *type, + const gdb_byte *string, unsigned int length, + const char *user_encoding, int force_ellipses, + const struct value_print_options *options) const { c_string_type str_type; const char *type_encoding; diff --git a/gdb/c-lang.h b/gdb/c-lang.h index b26996c..9351567 100644 --- a/gdb/c-lang.h +++ b/gdb/c-lang.h @@ -93,14 +93,6 @@ extern void c_value_print (struct value *, struct ui_file *, extern void c_printchar (int, struct type *, struct ui_file *); -extern void c_printstr (struct ui_file * stream, - struct type *elttype, - const gdb_byte *string, - unsigned int length, - const char *user_encoding, - int force_ellipses, - const struct value_print_options *options); - extern void c_language_arch_info (struct gdbarch *gdbarch, struct language_arch_info *lai); diff --git a/gdb/language.c b/gdb/language.c index 114ee3a..076e429 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -636,18 +636,6 @@ language_defn::value_print_inner /* See language.h. */ void -language_defn::printstr (struct ui_file *stream, struct type *elttype, - const gdb_byte *string, unsigned int length, - const char *encoding, int force_ellipses, - const struct value_print_options *options) const -{ - c_printstr (stream, elttype, string, length, encoding, force_ellipses, - options); -} - -/* See language.h. */ - -void language_defn::print_typedef (struct type *type, struct symbol *new_symbol, struct ui_file *stream) const { diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c index 5539884..8673a90 100644 --- a/gdb/rust-lang.c +++ b/gdb/rust-lang.c @@ -292,8 +292,9 @@ rust_language::printstr (struct ui_file *stream, struct type *type, { /* This is probably some C string, so let's let C deal with it. */ - c_printstr (stream, type, string, length, user_encoding, - force_ellipses, options); + language_defn::printstr (stream, type, string, length, + user_encoding, force_ellipses, + options); return; } } |