public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug remote/28916] New: tty sharing mode for target remote
@ 2022-02-21 14:37 mark at klomp dot org
  2022-02-22 20:26 ` [Bug remote/28916] " tromey at sourceware dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: mark at klomp dot org @ 2022-02-21 14:37 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28916

            Bug ID: 28916
           Summary: tty sharing mode for target remote
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: remote
          Assignee: unassigned at sourceware dot org
          Reporter: mark at klomp dot org
                CC: aburgess at redhat dot com, ahajkova at redhat dot com
  Target Milestone: ---

This would help with better integration if valgrind and gdb:
https://bugs.kde.org/show_bug.cgi?id=434057#c4

valgrind comes with a remote gdbserver which gdb can connect to with target
remote | vgdb

Currently this requires two separate terminals, one to run valgrind and one to
run gdb. We would like to be able to run completely from gdb. This would be
possible if we extend vgdb (the remote gdb bridge) with extended-remote packets
(and possibly multiprocess ones).

But currently the two target modes that gdb provides don't allow sharing of
stdio/tty with gdb like a native binary would.

Socket mode:
(gdb) target remote HOST:PORT
Currently vgdb/valgrind doesn't support this mode, but we hope to add this.
But in this mode the valgrind process does its stdio in its own terminal.

stdio mode:
(gdb) target remote | PROGRAM ARGS
This is the current way vgdb operates. This is somewhat equivalent to using
gdbserver -. In this mode (when using --multi) 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 we're proposing would a third mechanism for starting a remote.
This new approach is kind of like the second approach above, but has
some extra promises made to gdb, specifically, we will know that the
"remote" is actually running within gdb, and shares our tty.  As a
result we will fill in the tty hooks for the remote target so that
control is handled correctly.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-22 21:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-21 14:37 [Bug remote/28916] New: tty sharing mode for target remote 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
2022-02-22 21:06 ` mark at klomp dot org
2022-02-22 21:42 ` tromey at sourceware dot org

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).