diff options
author | Tom Tromey <tromey@adacore.com> | 2024-05-06 15:09:33 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-05-10 11:24:47 -0600 |
commit | c610012988f67e8317191f6f5f7d87073e96db2e (patch) | |
tree | 7f3a00b5d9f4567ec407432e419306806fa601a3 /gdb/remote.c | |
parent | 6e8376fa569e62379a42b91b0afd1f4086f1d897 (diff) | |
download | gdb-c610012988f67e8317191f6f5f7d87073e96db2e.zip gdb-c610012988f67e8317191f6f5f7d87073e96db2e.tar.gz gdb-c610012988f67e8317191f6f5f7d87073e96db2e.tar.bz2 |
Pass stream to remote_console_output
I noticed that remote_target::rcmd did not pass its ui_file argument
down to remote_console_output. This patch fixes this oversight.
Tested-By: Ciaran Woodward <ciaranwoodward@xmos.com>
Approved-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index 5506955..6e568eb 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -1521,7 +1521,7 @@ static ptid_t read_ptid (const char *buf, const char **obuf); static bool remote_read_description_p (struct target_ops *target); -static void remote_console_output (const char *msg); +static void remote_console_output (const char *msg, ui_file *stream); static void remote_btrace_reset (remote_state *rs); @@ -1750,7 +1750,10 @@ remote_target::remote_get_noisy_reply () } } else if (buf[0] == 'O' && buf[1] != 'K') - remote_console_output (buf + 1); /* 'O' message from stub */ + { + /* 'O' message from stub */ + remote_console_output (buf + 1, gdb_stdtarg); + } else return buf; /* Here's the actual reply. */ } @@ -7642,7 +7645,7 @@ remote_target::terminal_ours () } static void -remote_console_output (const char *msg) +remote_console_output (const char *msg, ui_file *stream) { const char *p; @@ -7653,9 +7656,9 @@ remote_console_output (const char *msg) tb[0] = c; tb[1] = 0; - gdb_stdtarg->puts (tb); + stream->puts (tb); } - gdb_stdtarg->flush (); + stream->flush (); } /* Return the length of the stop reply queue. */ @@ -8583,7 +8586,7 @@ remote_target::wait_ns (ptid_t ptid, struct target_waitstatus *status, warning (_("Remote failure reply: %s"), rs->buf.data ()); break; case 'O': /* Console output. */ - remote_console_output (&rs->buf[1]); + remote_console_output (&rs->buf[1], gdb_stdtarg); break; default: warning (_("Invalid remote reply: %s"), rs->buf.data ()); @@ -8717,7 +8720,7 @@ remote_target::wait_as (ptid_t ptid, target_waitstatus *status, break; } case 'O': /* Console output. */ - remote_console_output (buf + 1); + remote_console_output (buf + 1, gdb_stdtarg); break; case '\0': if (rs->last_sent_signal != GDB_SIGNAL_0) @@ -11993,7 +11996,8 @@ remote_target::rcmd (const char *command, struct ui_file *outbuf) buf = rs->buf.data (); if (buf[0] == 'O' && buf[1] != 'K') { - remote_console_output (buf + 1); /* 'O' message from stub. */ + /* 'O' message from stub. */ + remote_console_output (buf + 1, outbuf); continue; } packet_result result = packet_check_result (buf, false); |