aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-10-20 13:33:36 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-12-23 20:53:14 +0000
commitc5ee319e6cc7a02d35871896e8205e1f782fbc00 (patch)
tree095d63464385b6f910137e395d445e660a1c5f9e /gdb
parent2c75ccb24cec32180e057aade6bd9141296860e0 (diff)
downloadgdb-c5ee319e6cc7a02d35871896e8205e1f782fbc00.zip
gdb-c5ee319e6cc7a02d35871896e8205e1f782fbc00.tar.gz
gdb-c5ee319e6cc7a02d35871896e8205e1f782fbc00.tar.bz2
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/c-lang.c5
-rw-r--r--gdb/c-lang.h2
-rw-r--r--gdb/language.c9
4 files changed, 12 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9acbae8..7c52f9b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2020-12-23 Andrew Burgess <andrew.burgess@embecosm.com>
+ * 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 <andrew.burgess@embecosm.com>
+
* dwarf2/read.c (dwarf2_compute_name): Call methods on C++
language object instead of calling global functions directly.
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index c2db47e..a028d10 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 896f8e1..23618a1 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 5e64e6a..afa5c66 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -678,15 +678,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,
const char *encoding, int force_ellipses,