From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 4D26B3858D37; Mon, 10 Oct 2022 17:38:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4D26B3858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665423524; bh=bWfPrtTMD53rmjQMj/mEDQVcALhcyA0LLWRQPWLo1RY=; h=From:To:Subject:Date:From; b=ahjTpLX9Own5R5GxLb73olhB4mSIjsqY3W7HzNLw5qqgCW6CnlCeMT6PwHVOibScI tXmUDGaKd3EYw8If5GvX3XAuP/6zfXdTVqjaJ4cOAOdy8yVVEbPf9Rp3GoJvIwdgLV Lgi94M5gH8JDLDuh/6/aRe/3rXHpmHUA0psKkO6w= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Remove c_printstr X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: c1c7fe59f67f5f4e3ca6f6fea1de46b983be8995 X-Git-Newrev: 3a3bb6eb36a29e3201bfc4cc53e341f4f98e6cf1 Message-Id: <20221010173844.4D26B3858D37@sourceware.org> Date: Mon, 10 Oct 2022 17:38:44 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D3a3bb6eb36a2= 9e3201bfc4cc53e341f4f98e6cf1 commit 3a3bb6eb36a29e3201bfc4cc53e341f4f98e6cf1 Author: Tom Tromey Date: Fri Feb 11 18:14:17 2022 -0700 Remove c_printstr =20 This renames c_printstr, removing a layer of indirection. Diff: --- gdb/c-lang.c | 8 ++++---- gdb/c-lang.h | 8 -------- gdb/language.c | 12 ------------ 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 d6c56f31616..437f79c025a 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. */ =20 void -c_printstr (struct ui_file *stream, struct type *type,=20 - const gdb_byte *string, unsigned int length,=20 - 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 b26996c20b1..93515671d80 100644 --- a/gdb/c-lang.h +++ b/gdb/c-lang.h @@ -93,14 +93,6 @@ extern void c_value_print (struct value *, struct ui_fil= e *, =20 extern void c_printchar (int, struct type *, struct ui_file *); =20 -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); =20 diff --git a/gdb/language.c b/gdb/language.c index 114ee3aedd9..076e429ff55 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -635,18 +635,6 @@ language_defn::value_print_inner =20 /* See language.h. */ =20 -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 5539884a98f..8673a908698 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; } }