Interactive behavior of GDB run from Emacs on Windows

Eli Zaretskii
2012-04-19T15:46:05Z

There's an annoying difference between GDB behavior when launched by
Emacs GUD on Windows and on Posix platforms. AFAIU, the difference is
explained by the fact that on Posix platforms the communications
between Emacs and GDB are done via a pty, whereas on Windows Emacs
uses pipes. Therefore, on Unix GDB behaves as if its standard handles
were connected to a terminal, while on Windows it doesn't.

This causes some prompts, like the one GDB displays after "commands"
etc., not to show on Windows, and also rears its ugly head in other
situations.

What would be the best way to solve this annoyance? One possibility I
thought of would be to have a "set something" option which Emacs would
cram down the pipe early on, that will force GDB to behave as if it
were talking to a terminal (we already have a similar hack for
Insight). Would that be acceptable, and is it easily and cleanly
doable? (I don't know enough about the ser-*.c stuff to decide
whether there could be any pitfalls along this route.)

TIA