public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "mark at klomp dot org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug remote/28916] tty sharing mode for target remote Date: Tue, 22 Feb 2022 21:03:19 +0000 [thread overview] Message-ID: <bug-28916-4717-DQov95kovb@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-28916-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=28916 --- Comment #2 from Mark Wielaard <mark at klomp dot org> --- (In reply to Tom Tromey from comment #1) > > a process that is launched gets its stdout redirected to stderr and stdin > > redirected to /dev/null so that the inferior i/o doesn't corrupt the connection. > > What if it captured the connection and then sent the output back > over the connection? This can be done in all-stop mode (not in non-stop) > with 'O' packets. > > I'm not sure what to do about input though. > Maybe that would just not work. Where are 'O' packets described? I cannot find it on https://www.sourceware.org/gdb/onlinedocs/gdb/Packets.html I think it should work for both input and output, otherwise it simply isn't equal to native debugging. > Another idea is to look at Pedro's "tty" series and see if that > can help solve this. (Just a random thought, no idea if it helps) What and where is Pedro's "tty" series? > One advantage of making this work in gdbserver is that the valgrind > stuff could be used remotely: > > (gdb) target remote | ssh machine valgrind blah > > If none of this works, it would be pretty easy to write a bit > of "target valgrind" code that acts like "extended-remote" but > passes a new file descriptor and tells valgrind about it. So when you say gdbserver, do you mean gdb-gdbserver or the partial gdbserver as implemented in valgrind? I do like to make this work for gdb-gdbserver too so that remote and native debugging because more equal (when possible, like when running gdbserver on the local host or inside a container on the same host). Also wrt ssh machine valgrind as remote target, do you mean ssh machine vgdb? Asking because there seems a bit of confusion about the builtin valgrind gdbserver. Which cannot simply be invocated as is, but needs to communicate through vgdb (valgrind runs as the the actual inferior, including not having its own threads, so vgdb has some trickery to invoke the valgrind builtin gdbserver if all the inferior threads are "stuck". See also https://bugs.kde.org/show_bug.cgi?id=434057 and https://sourceware.org/git/?p=valgrind.git;a=blob;f=coregrind/m_gdbserver/README_DEVELOPERS;hb=HEAD -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2022-02-22 21:03 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-02-21 14:37 [Bug remote/28916] New: " mark at klomp dot org 2022-02-22 20:26 ` [Bug remote/28916] " tromey at sourceware dot org 2022-02-22 21:03 ` mark at klomp dot org [this message] 2022-02-22 21:06 ` mark at klomp dot org 2022-02-22 21:42 ` tromey at sourceware dot org
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=bug-28916-4717-DQov95kovb@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /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: linkBe 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).