Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-debug-dev] CDT debug and ptys

Sebastien --

John asked me to get in touch with you in re: handling ptys and
inferior I/O in the debug component, specifically as these things
relate to gdb.

I'm still a bit vague on what exactly you'd like to know.  I'll start
with a brief overview.

Historically, inferior I/O support in gdb has not been very good.  I
think Keith and Elena are or will be working on this.

Sometimes, even whatever gdb provides won't suffice.  For instance,
one might want to debug a program that wants to run in a real
terminal, like vi or the gdb tui.  One idea here is, rather than
implementing a new terminal inside Eclipse, just give the user the
option of forking an xterm and then using that as the inferior tty.
This is what we did in Insight.

In less extreme situations, it seems nicer for the user for the output
to appear in a console window inside the debug environment.  This is
the area where gdb is less than proficient.  I'm not exactly sure what
will be happening here, but I imagine it will involve gdb wrapping the
inferior's output in some MI way.

I notice you're already creating a new pty and passing it to gdb using
the `-tty' option.  This is another viable alternative (for the
non-full-screen-inferior mode); I played with an implementation of
this in Insight (it never went in due to portability concerns; luckily
Eclipse's requirements here seem less stringent).

HTH,
Tom


Back to the top