gdb pty problem [Was: emacs gud-interface is not updated after gdb command execution (maybe because of incomplete output from gdb)]
Corinna Vinschen
corinna-cygwin@cygwin.com
Mon Jun 6 13:16:00 GMT 2016
On Jun 6 19:12, Takashi Yano wrote:
> Hi Corinna,
>
> I had looked into this problem, and found the cause.
>
> 'man termios' says:
> "A read(2) returns at most one line of input" in canonical mode.
>
> On cygwin 2.5.1, read(2) returns all data in buffer if the buffer
> size specified is large enough. This behaviour is correct in
> noncanonical mode, but is not correct in canonical mode.
>
> So, I would like to propose a following patch.
> [...]
> While checking this problem, I found a bug of tcflush().
> tcflush() flushes only partial data in the buffer.
>
> The patch above also fixes this bug.
>
> A test case attached (pty_readlen.c) is for confirming
> the behaviour of read() and tcflush().
> [...]
> Of course, Ken's gdbstc works fine without sleep with this patch,
> as well as original emacs case.
Thanks a lot. Patch applied.
I uploaded a new snapshot with this patch to https://cygwin.com/snapshots/
for quick testing.
Just one question: In future, would you mind terribly to provide
patches in `git format-patch' format (and ideally on the cygwin-patches
mailing list)? It's easier to handle by lazy maintainers... :)
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20160606/afe49196/attachment.sig>
More information about the Cygwin
mailing list