From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org>
Cc: William Tambe <tambewilliam@gmail.com>,
Andrew Burgess <aburgess@redhat.com>
Subject: Re: Can gdbserver tunnel stdout/stdin to/from gdb ?
Date: Thu, 10 Feb 2022 13:58:34 -0700 [thread overview]
Message-ID: <874k56tp51.fsf@tromey.com> (raw)
In-Reply-To: <871r0daf5i.fsf@redhat.com> (Andrew Burgess via Gdb-patches's message of "Tue, 08 Feb 2022 09:20:09 +0000")
>> Can gdbserver tunnel stdout/stdin to/from gdb so as to debug an
>> application as if it was executing on the machine running gdb ?
Andrew> I don't believe gdbserver itself supports this feature.
I wish it did though :)
Andrew> Though I don't see why a
Andrew> bigger target couldn't make use of that extension - you'd just need a
Andrew> mechanism to intercept the syscalls at the remote end and have gdbserver
Andrew> forward them to gdb.
Would it work to redirect I/O when launching the inferior?
Andrew> The final thing that might be relevant to this topic, though clearly not
Andrew> what you're actually asking about, is the 'O' packet, which allows
Andrew> gdbserver to write messages to gdb's console. As I understand it, this
Andrew> is often used to allow things like monitor commands to print diagnostic
Andrew> output, but in general I think this is more for gdbserver itself (not
Andrew> the thing running under gdbserver) to communicate with the gdb user.
Note also the 'O' packet doesn't work with non-stop. GDB needs a bit of
protocol work in this area.
Tom
prev parent reply other threads:[~2022-02-10 20:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 4:04 William Tambe
2022-02-08 9:20 ` Andrew Burgess
2022-02-10 20:58 ` Tom Tromey [this message]
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=874k56tp51.fsf@tromey.com \
--to=tom@tromey.com \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tambewilliam@gmail.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).