Re: Using telnet to control a running GDB

Jan Kratochvil
2010-11-29T02:56:46Z

On Sun, 28 Nov 2010 19:27:56 +0100, Marc Khouzam wrote:
> The user could ask GDB to open a tcp port which would accept a telnet connection.
> Using telnet, the user could then start a _second_ shell to the same GDB and control it.
>
> This would help a user get a full-fledge GDB command shell, even when GDB
> is being run by a frontend.

Such shell is present there, isn't it? You have even provided a fix for it:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=285320

(eclipse-cdt-6.0.2-5.fc13.x86_64, a bit old, sorry) Click on Debug window,
line with "gdb" then I can type CLI GDB commands into the window "Console".
It does not print the GDB prompt there but it works. GDB gets this command
via MI:
40-interpreter-exec console "print 1+1"N (N=\n)

> It would also allow the remote controlling of a running GDB. Could be useful
> for troubleshooting.

When GDB is really running (and not waiting on external event) it is not
thread safe in general to do anything else in that moment.

In async (+ non-stop) mode you enabled to be implemented it should never do
such operation any noticeable time; if it does, GDB should be fixed (either
for missing async or for performance).

So it is fully on the front end to provide asynchronous "Console" window
interface, isn't it?

Thanks,
Jan