From: Lancelot SIX <lancelot.six@amd.com>
To: <gdb-patches@sourceware.org>
Cc: <lsix@lancelotsix.com>, Lancelot SIX <lancelot.six@amd.com>
Subject: [PATCH] gdb/show_args_command: print to the ui_file argument
Date: Wed, 3 May 2023 12:07:12 +0100 [thread overview]
Message-ID: <20230503110712.1540513-1-lancelot.six@amd.com> (raw)
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.
This commit fixes this.
---
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 ());
}
base-commit: a07223191bdda5e85a500e3b8206ee8fe8bcdfed
--
2.34.1
next reply other threads:[~2023-05-03 11:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-03 11:07 Lancelot SIX [this message]
2023-05-03 14:50 ` Tom Tromey
2023-05-03 15:31 ` Lancelot SIX
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230503110712.1540513-1-lancelot.six@amd.com \
--to=lancelot.six@amd.com \
--cc=gdb-patches@sourceware.org \
--cc=lsix@lancelotsix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).