From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id B24513858410; Wed, 5 Jan 2022 18:54:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B24513858410 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] Filtered output cleanup in expression dumping X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 50f5d5c34d321275c4e59b2f098023f674c617d8 X-Git-Newrev: 729a211143c69e42debcb26bec7071d958e12b45 Message-Id: <20220105185426.B24513858410@sourceware.org> Date: Wed, 5 Jan 2022 18:54:26 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jan 2022 18:54:26 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D729a211143c6= 9e42debcb26bec7071d958e12b45 commit 729a211143c69e42debcb26bec7071d958e12b45 Author: Tom Tromey Date: Thu Dec 30 12:34:15 2021 -0700 Filtered output cleanup in expression dumping =20 Most of the expression-dumping code uses filtered output, but a few functions did not. This patch cleans up these instance. =20 Note that this won't cause any behavior change, because the only calls to dump_prefix_expression pass in gdb_stdlog. However, in the long run it's easier to audit the code if the number of uses of _unfiltered is reduced. Diff: --- gdb/expprint.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/gdb/expprint.c b/gdb/expprint.c index f6dbde29469..381a10d85be 100644 --- a/gdb/expprint.c +++ b/gdb/expprint.c @@ -138,9 +138,9 @@ dump_for_expression (struct ui_file *stream, int depth, { fprintf_filtered (stream, _("%*sType flags: "), depth, ""); if (flags & TYPE_INSTANCE_FLAG_CONST) - fputs_unfiltered ("const ", stream); + fputs_filtered ("const ", stream); if (flags & TYPE_INSTANCE_FLAG_VOLATILE) - fputs_unfiltered ("volatile", stream); + fputs_filtered ("volatile", stream); fprintf_filtered (stream, "\n"); } =20 @@ -152,24 +152,24 @@ dump_for_expression (struct ui_file *stream, int dept= h, switch (flags & ~C_CHAR) { case C_WIDE_STRING: - fputs_unfiltered (_("wide "), stream); + fputs_filtered (_("wide "), stream); break; case C_STRING_16: - fputs_unfiltered (_("u16 "), stream); + fputs_filtered (_("u16 "), stream); break; case C_STRING_32: - fputs_unfiltered (_("u32 "), stream); + fputs_filtered (_("u32 "), stream); break; default: - fputs_unfiltered (_("ordinary "), stream); + fputs_filtered (_("ordinary "), stream); break; } =20 if ((flags & C_CHAR) !=3D 0) - fputs_unfiltered (_("char"), stream); + fputs_filtered (_("char"), stream); else - fputs_unfiltered (_("string"), stream); - fputs_unfiltered ("\n", stream); + fputs_filtered (_("string"), stream); + fputs_filtered ("\n", stream); } =20 void @@ -178,13 +178,13 @@ dump_for_expression (struct ui_file *stream, int dept= h, { fprintf_filtered (stream, _("%*sRange:"), depth, ""); if ((flags & RANGE_LOW_BOUND_DEFAULT) !=3D 0) - fputs_unfiltered (_("low-default "), stream); + fputs_filtered (_("low-default "), stream); if ((flags & RANGE_HIGH_BOUND_DEFAULT) !=3D 0) - fputs_unfiltered (_("high-default "), stream); + fputs_filtered (_("high-default "), stream); if ((flags & RANGE_HIGH_BOUND_EXCLUSIVE) !=3D 0) - fputs_unfiltered (_("high-exclusive "), stream); + fputs_filtered (_("high-exclusive "), stream); if ((flags & RANGE_HAS_STRIDE) !=3D 0) - fputs_unfiltered (_("has-stride"), stream); + fputs_filtered (_("has-stride"), stream); fprintf_filtered (stream, "\n"); }