From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7833) id 703D13850869; Wed, 3 May 2023 15:31:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 703D13850869 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1683127879; bh=ipRYhpolS3F4MB8F28Z452ctZACPdYH2w1LaYD/MeNQ=; h=From:To:Subject:Date:From; b=Rj+Shwim0gUJ432wmIkp7wLuzMcJhB7lGY4foZnKekaY70q9jcageNVHLtQChmfV9 FUnaPolc3liiK48Ez2H+gSmu4gQx+3iQvdFUrzL9o7sixbhszPVrm6/hrWNitoimFH cob2XoXp/0rBl8/i2XQW1Qr2gA+NGUAlnFolXZKE= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Lancelot SIX To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/show_args_command: print to the ui_file argument X-Act-Checkin: binutils-gdb X-Git-Author: Lancelot SIX X-Git-Refname: refs/heads/master X-Git-Oldrev: a2243c30bc13c9adce71d70eeb5e97b7846b48f3 X-Git-Newrev: 2ad00a4b42f89b61fdab24940b67713daf81c988 Message-Id: <20230503153119.703D13850869@sourceware.org> Date: Wed, 3 May 2023 15:31:19 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D2ad00a4b42f8= 9b61fdab24940b67713daf81c988 commit 2ad00a4b42f89b61fdab24940b67713daf81c988 Author: Lancelot SIX Date: Wed May 3 11:56:48 2023 +0100 gdb/show_args_command: print to the ui_file argument =20 The show_args_command uses gdb_printf without specifying the ui_file. This means that it prints to gdb_stdout instead of the stream given as an argument to the function. =20 This commit fixes this. =20 Reviewed-By: Tom Tromey Diff: --- gdb/infcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/infcmd.c b/gdb/infcmd.c index b8134665f3f..e42927858ba 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -144,7 +144,7 @@ show_args_command (struct ui_file *file, int from_tty, { /* Ignore the passed in value, pull the argument directly from the inferior. However, these should always be the same. */ - gdb_printf (_("\ + gdb_printf (file, _("\ Argument list to give program being debugged when it is started is \"%s\".= \n"), current_inferior ()->args ().c_str ()); }