[PATCH 3/9] gdb: rename c_printchar as language_defn::printchar
Andrew Burgess
andrew.burgess@embecosm.com
Fri Nov 20 11:54:58 GMT 2020
This commit removes the global function c_printchar and moves the
implementation into language_defn::printchar.
There should be no user visible changes after this commit.
gdb/ChangeLog:
* c-lang.c (c_printchar): Rename to...
(language_defn::printchar): ...this.
* c-lang.h (c_printchar): Delete declaration.
* language.c (language_defn::printchar): Delete this
implementation. Is now implemented in c-lang.c.
---
gdb/ChangeLog | 8 ++++++++
gdb/c-lang.c | 5 ++++-
gdb/c-lang.h | 2 --
gdb/language.c | 9 ---------
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 624aea52f77..5d696b1b356 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -153,8 +153,11 @@ c_emit_char (int c, struct type *type,
generic_emit_char (c, type, stream, quoter, encoding);
}
+/* See language.h. */
+
void
-c_printchar (int c, struct type *type, struct ui_file *stream)
+language_defn::printchar (int c, struct type *type,
+ struct ui_file * stream) const
{
c_string_type str_type;
diff --git a/gdb/c-lang.h b/gdb/c-lang.h
index 6c5d0d814c4..846faaaaaa2 100644
--- a/gdb/c-lang.h
+++ b/gdb/c-lang.h
@@ -96,8 +96,6 @@ extern struct value *evaluate_subexp_c (struct type *expect_type,
int *pos,
enum noside noside);
-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,
diff --git a/gdb/language.c b/gdb/language.c
index 579cf9198c8..d1bcc738b33 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -677,15 +677,6 @@ language_defn::emitchar (int ch, struct type *chtype,
/* See language.h. */
-void
-language_defn::printchar (int ch, struct type *chtype,
- struct ui_file * stream) const
-{
- c_printchar (ch, chtype, stream);
-}
-
-/* See language.h. */
-
void
language_defn::printstr (struct ui_file *stream, struct type *elttype,
const gdb_byte *string, unsigned int length,
--
2.25.4
More information about the Gdb-patches
mailing list