From: Andrew Burgess Date: Tue, 20 Oct 2020 12:33:36 +0000 (+0100) Subject: gdb: rename c_printchar as language_defn::printchar X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c5ee319e6cc7a02d35871896e8205e1f782fbc00;p=binutils-gdb.git gdb: rename c_printchar as language_defn::printchar 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9acbae8b899..7c52f9b0bd0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2020-12-23 Andrew Burgess + + * 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. + 2020-12-23 Andrew Burgess * dwarf2/read.c (dwarf2_compute_name): Call methods on C++ diff --git a/gdb/c-lang.c b/gdb/c-lang.c index c2db47e11e2..a028d10e2bf 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 896f8e1f27e..23618a1e165 100644 --- a/gdb/c-lang.h +++ b/gdb/c-lang.h @@ -95,8 +95,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 5e64e6af45f..afa5c66c2a4 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,