unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9767: 24.0.90; gdb initialization on Cygwin
@ 2011-10-16 16:02 Ken Brown
  2011-10-16 23:08 ` Ken Brown
  0 siblings, 1 reply; 16+ messages in thread
From: Ken Brown @ 2011-10-16 16:02 UTC (permalink / raw)
  To: 9767

When I start a debugging session with M-x gdb, initialization doesn't
appear to complete.  I don't get the "(gdb)" prompt, and the mode line
continues to say "initializing".  If I press Return, I get the prompt
and the mode line changes to "ready".  Everything works fine after that.
This seems Cygwin-specific; it doesn't happen on GNU/Linux.

I've checked that all the strings that emacs sends to gdb during
initialization (via gdb-input) do in fact get sent.  And I've tried
sending those same strings to gdb outside of emacs (except for
"-inferior-tty-set..."), and nothing strange happened.  In particular, I
did have a "(gdb)" prompt at each stage.

Does anyone have any suggestions as to what might cause this or how I
can debug it?  I don't have any experience with elisp debugging, so I
would appreciate a few pointers to help get me started.

Thanks.

Ken


In GNU Emacs 24.0.90.1 (i686-pc-cygwin, GTK+ Version 2.20.1)
  of 2011-09-26 on moufang
Windowing system distributor `The Cygwin/X Project', version 11.0.11101000
configured using `configure 
'--srcdir=/usr/src/emacs-24.0.90-1/src/emacs-24.0.90' '--prefix=/usr' 
'--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' 
'--libexecdir=/usr/lib' '--datadir=/usr/share' '--localstatedir=/var' 
'--sysconfdir=/etc' '--datarootdir=/usr/share' 
'--docdir=/usr/share/doc/emacs' '-C' 'CC=gcc' 'CFLAGS=-g -O2





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

* bug#9767: 24.0.90; gdb initialization on Cygwin
  2011-10-16 16:02 bug#9767: 24.0.90; gdb initialization on Cygwin Ken Brown
@ 2011-10-16 23:08 ` Ken Brown
  2011-10-17  5:39   ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Ken Brown @ 2011-10-16 23:08 UTC (permalink / raw)
  To: 9767

On 10/16/2011 12:02 PM, Ken Brown wrote:
> When I start a debugging session with M-x gdb, initialization doesn't
> appear to complete. I don't get the "(gdb)" prompt, and the mode line
> continues to say "initializing". If I press Return, I get the prompt
> and the mode line changes to "ready". Everything works fine after that.
> This seems Cygwin-specific; it doesn't happen on GNU/Linux.
>
> I've checked that all the strings that emacs sends to gdb during
> initialization (via gdb-input) do in fact get sent. And I've tried
> sending those same strings to gdb outside of emacs (except for
> "-inferior-tty-set..."), and nothing strange happened. In particular, I
> did have a "(gdb)" prompt at each stage.

Further info: It seems that initialization is actually completing, but 
for some reason the buffer is not being redisplayed.  To test this, I 
inserted (sit-for .1) at the end of gdb-update to force redisplay, and 
that solved the problem.  Unless someone who understands redisplay can 
figure out why redisplay isn't happening on Cygwin, I'm inclined to 
apply the following patch:

=== modified file 'lisp/progmodes/gdb-mi.el'
--- lisp/progmodes/gdb-mi.el    2011-10-06 16:11:38 +0000
+++ lisp/progmodes/gdb-mi.el    2011-10-16 23:04:28 +0000
@@ -1726,7 +1726,8 @@
      (gdb-force-mode-line-update
       (propertize "initializing..." 'face font-lock-variable-name-face))
      (gdb-init-1)
-    (setq gdb-first-prompt nil))
+    (setq gdb-first-prompt nil)
+    (if (eq system-type 'cygwin) (sit-for .1)))

    (gdb-get-main-selected-frame)
    ;; We may need to update gdb-threads-list so we can use

Would this be reasonable?

Ken





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

* bug#9767: 24.0.90; gdb initialization on Cygwin
  2011-10-16 23:08 ` Ken Brown
@ 2011-10-17  5:39   ` Eli Zaretskii
  2011-10-19 20:00     ` Ken Brown
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2011-10-17  5:39 UTC (permalink / raw)
  To: Ken Brown; +Cc: 9767

> Date: Sun, 16 Oct 2011 19:08:32 -0400
> From: Ken Brown <kbrown@cornell.edu>
> 
> Further info: It seems that initialization is actually completing, but 
> for some reason the buffer is not being redisplayed.  To test this, I 
> inserted (sit-for .1) at the end of gdb-update to force redisplay, and 
> that solved the problem.  Unless someone who understands redisplay can 
> figure out why redisplay isn't happening on Cygwin, I'm inclined to 
> apply the following patch:

My crystal ball says that redisplay isn't happening because Emacs
doesn't know that the GDB prompt has arrived.  The call to sit-for
causes Emacs to check its input descriptors, "discovering" that there
is input.

Please look around in wait_reading_process_output, and see what is
going on there, before and after the call to sit-for.  In particular,
does the call to `select' report that input has arrived from GDB?

> === modified file 'lisp/progmodes/gdb-mi.el'
> --- lisp/progmodes/gdb-mi.el    2011-10-06 16:11:38 +0000
> +++ lisp/progmodes/gdb-mi.el    2011-10-16 23:04:28 +0000
> @@ -1726,7 +1726,8 @@
>       (gdb-force-mode-line-update
>        (propertize "initializing..." 'face font-lock-variable-name-face))
>       (gdb-init-1)
> -    (setq gdb-first-prompt nil))
> +    (setq gdb-first-prompt nil)
> +    (if (eq system-type 'cygwin) (sit-for .1)))
> 
>     (gdb-get-main-selected-frame)
>     ;; We may need to update gdb-threads-list so we can use
> 
> Would this be reasonable?

I think it's not going to solve the real problem.  If Emacs misses
some of the output arriving from GDB, it will miss it again under
similar circumstances.





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

* bug#9767: 24.0.90; gdb initialization on Cygwin
  2011-10-17  5:39   ` Eli Zaretskii
@ 2011-10-19 20:00     ` Ken Brown
  2011-10-19 20:26       ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Ken Brown @ 2011-10-19 20:00 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 9767

On 10/17/2011 1:39 AM, Eli Zaretskii wrote:
>> Date: Sun, 16 Oct 2011 19:08:32 -0400
>> From: Ken Brown<kbrown@cornell.edu>
>>
>> Further info: It seems that initialization is actually completing, but
>> for some reason the buffer is not being redisplayed.  To test this, I
>> inserted (sit-for .1) at the end of gdb-update to force redisplay, and
>> that solved the problem.  Unless someone who understands redisplay can
>> figure out why redisplay isn't happening on Cygwin, I'm inclined to
>> apply the following patch:
>
> My crystal ball says that redisplay isn't happening because Emacs
> doesn't know that the GDB prompt has arrived.  The call to sit-for
> causes Emacs to check its input descriptors, "discovering" that there
> is input.
>
> Please look around in wait_reading_process_output, and see what is
> going on there, before and after the call to sit-for.  In particular,
> does the call to `select' report that input has arrived from GDB?

Thanks for the suggestions, Eli.  First of all, I was wrong when I said 
that the problem was redisplay:  using sleep-for instead of sit-for 
works just as well.  As your crystal ball predicted, the problem is that 
emacs hasn't read its input from GDB.  Here's what happens:

After M-x gdb finishes its initialization, emacs goes into its command 
loop.  read_char calls sit_for with a timeout of 30 seconds, and sit_for 
calls wait_reading_process_output, which calls select.  The call to 
select fails immediately with EINTR.  I don't understand the command 
loop well enough to know what's interrupting the select call.  But 
select works fine in other settings (such as when I insert sleep-for in 
the gdb initialization).

It seems that the problem is not really about M-x gdb, but about the 
emacs command loop.  I see the same kinds of select failures (always 
with EINTR) if I just start up emacs and watch the calls to select 
during the command loop.

The code in keyboard.c is full of alarms and timers, presumably related 
to polling for keyboard input.  Could this polling be doing something 
that interrupts the select call under some circumstances?

Ken





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

* bug#9767: 24.0.90; gdb initialization on Cygwin
  2011-10-19 20:00     ` Ken Brown
@ 2011-10-19 20:26       ` Eli Zaretskii
  2011-10-19 20:43         ` Ken Brown
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2011-10-19 20:26 UTC (permalink / raw)
  To: Ken Brown; +Cc: 9767

> Date: Wed, 19 Oct 2011 16:00:09 -0400
> From: Ken Brown <kbrown@cornell.edu>
> CC: 9767@debbugs.gnu.org
> 
> After M-x gdb finishes its initialization, emacs goes into its command 
> loop.  read_char calls sit_for with a timeout of 30 seconds, and sit_for 
> calls wait_reading_process_output, which calls select.  The call to 
> select fails immediately with EINTR.  I don't understand the command 
> loop well enough to know what's interrupting the select call.

EINTR means that some signal arrived (assuming that Cygwin's `select'
is Posix-ish enough).  The question is, which signal?  Does Cygwin
provide any tools to see which signals were delivered to a program?

Also, the fact that `select' is interrupted doesn't necessarily mean
that the input arrival is ignored, does it?  Doesn't
wait_reading_process_output loop around and examines the input
descriptors again?  If not, why not?  IOW, why should EINTR become a
failure?

> The code in keyboard.c is full of alarms and timers, presumably related 
> to polling for keyboard input.  Could this polling be doing something 
> that interrupts the select call under some circumstances?

Atimers (those which are responsible for the "busy cursor" display)
could deliver SIGALRM, yes.  But again, I don't see why this should
fail the loop that waits for input, and then only in this particular
case.  Something else is at work here.





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

* bug#9767: 24.0.90; gdb initialization on Cygwin
  2011-10-19 20:26       ` Eli Zaretskii
@ 2011-10-19 20:43         ` Ken Brown
  2011-10-19 21:03           ` Andreas Schwab
  0 siblings, 1 reply; 16+ messages in thread
From: Ken Brown @ 2011-10-19 20:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 9767

On 10/19/2011 4:26 PM, Eli Zaretskii wrote:
>> Date: Wed, 19 Oct 2011 16:00:09 -0400
>> From: Ken Brown<kbrown@cornell.edu>
>> CC: 9767@debbugs.gnu.org
>>
>> After M-x gdb finishes its initialization, emacs goes into its command
>> loop.  read_char calls sit_for with a timeout of 30 seconds, and sit_for
>> calls wait_reading_process_output, which calls select.  The call to
>> select fails immediately with EINTR.  I don't understand the command
>> loop well enough to know what's interrupting the select call.
>
> EINTR means that some signal arrived (assuming that Cygwin's `select'
> is Posix-ish enough).  The question is, which signal?  Does Cygwin
> provide any tools to see which signals were delivered to a program?

There's a program called strace that produces lots of debugging 
information like this.  I'll give it a try.

> Also, the fact that `select' is interrupted doesn't necessarily mean
> that the input arrival is ignored, does it?  Doesn't
> wait_reading_process_output loop around and examines the input
> descriptors again?  If not, why not?  IOW, why should EINTR become a
> failure?

No, wait_reading_process_output treats EINTR as though it meant there's 
no input available.  Here's the relevant code from process.c, line 4638.

       if (nfds < 0)
	{
	  if (xerrno == EINTR)
	    no_avail = 1;

Even worse, xg_select (which is what the Cygwin build uses) deliberately 
returns -1 and sets errno = EINTR whenever the actual select call 
returns 0.  Here's the code from xg_select.c, line 141:

       /* To not have to recalculate timeout, return like this.  */
       if (retval == 0)
         {
           retval = -1;
           errno = EINTR;
         }

I don't know the rationale for treating EINTR the same as no input 
available, but I agree that it doesn't seem right.

>> The code in keyboard.c is full of alarms and timers, presumably related
>> to polling for keyboard input.  Could this polling be doing something
>> that interrupts the select call under some circumstances?
>
> Atimers (those which are responsible for the "busy cursor" display)
> could deliver SIGALRM, yes.  But again, I don't see why this should
> fail the loop that waits for input, and then only in this particular
> case.  Something else is at work here.






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

* bug#9767: 24.0.90; gdb initialization on Cygwin
  2011-10-19 20:43         ` Ken Brown
@ 2011-10-19 21:03           ` Andreas Schwab
  2011-10-19 22:02             ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Andreas Schwab @ 2011-10-19 21:03 UTC (permalink / raw)
  To: Ken Brown; +Cc: 9767

Ken Brown <kbrown@cornell.edu> writes:

> No, wait_reading_process_output treats EINTR as though it meant there's no
> input available.

Which is correct because an interrupted select does not report anything.
And then the loop will be restarted to call select again.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





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

* bug#9767: 24.0.90; gdb initialization on Cygwin
  2011-10-19 21:03           ` Andreas Schwab
@ 2011-10-19 22:02             ` Eli Zaretskii
  2011-10-20  2:11               ` Ken Brown
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2011-10-19 22:02 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 9767

> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: Eli Zaretskii <eliz@gnu.org>,  9767@debbugs.gnu.org
> Date: Wed, 19 Oct 2011 23:03:23 +0200
> 
> Ken Brown <kbrown@cornell.edu> writes:
> 
> > No, wait_reading_process_output treats EINTR as though it meant there's no
> > input available.
> 
> Which is correct because an interrupted select does not report anything.
> And then the loop will be restarted to call select again.

Yes, that's what I thought should be happening.  Sorry if that was
unclear.

So the question is still why no input is being reported, although
wait_reading_process_output should loop and call `select' again.





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

* bug#9767: 24.0.90; gdb initialization on Cygwin
  2011-10-19 22:02             ` Eli Zaretskii
@ 2011-10-20  2:11               ` Ken Brown
  2011-10-21 20:47                 ` Ken Brown
  0 siblings, 1 reply; 16+ messages in thread
From: Ken Brown @ 2011-10-20  2:11 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Andreas Schwab, 9767

On 10/19/2011 6:02 PM, Eli Zaretskii wrote:
>> From: Andreas Schwab<schwab@linux-m68k.org>
>> Cc: Eli Zaretskii<eliz@gnu.org>,  9767@debbugs.gnu.org
>> Date: Wed, 19 Oct 2011 23:03:23 +0200
>>
>> Ken Brown<kbrown@cornell.edu>  writes:
>>
>>> No, wait_reading_process_output treats EINTR as though it meant there's no
>>> input available.
>>
>> Which is correct because an interrupted select does not report anything.
>> And then the loop will be restarted to call select again.
>
> Yes, that's what I thought should be happening.  Sorry if that was
> unclear.

You were clear.  I was the one who muddied the waters by misreading the 
code, and Andreas correctly pointed out that I was wrong.

> So the question is still why no input is being reported, although
> wait_reading_process_output should loop and call `select' again.

Yes, that's the question.  I'll have to go back to my debugging.

Ken





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

* bug#9767: 24.0.90; gdb initialization on Cygwin
  2011-10-20  2:11               ` Ken Brown
@ 2011-10-21 20:47                 ` Ken Brown
  2011-10-21 22:15                   ` Eli Zaretskii
  2011-10-21 22:24                   ` Stefan Monnier
  0 siblings, 2 replies; 16+ messages in thread
From: Ken Brown @ 2011-10-21 20:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Andreas Schwab, 9767

On 10/19/2011 10:11 PM, Ken Brown wrote:
> On 10/19/2011 6:02 PM, Eli Zaretskii wrote:
>>> From: Andreas Schwab<schwab@linux-m68k.org>
>>> Cc: Eli Zaretskii<eliz@gnu.org>, 9767@debbugs.gnu.org
>>> Date: Wed, 19 Oct 2011 23:03:23 +0200
>>>
>>> Ken Brown<kbrown@cornell.edu> writes:
>>>
>>>> No, wait_reading_process_output treats EINTR as though it meant
>>>> there's no
>>>> input available.
>>>
>>> Which is correct because an interrupted select does not report anything.
>>> And then the loop will be restarted to call select again.
>>
>> Yes, that's what I thought should be happening. Sorry if that was
>> unclear.
>
> You were clear. I was the one who muddied the waters by misreading the
> code, and Andreas correctly pointed out that I was wrong.
>
>> So the question is still why no input is being reported, although
>> wait_reading_process_output should loop and call `select' again.
>
> Yes, that's the question. I'll have to go back to my debugging.

OK, I figured out what's happening, and it is related to SIGALRM after 
all.  In line 4406 of process.c, wait_reading_process_output reduces the 
timeout for the select call (under certain circumstances) in an attempt 
to prevent select from being interrupted by SIGALRM.  This seems to me 
to be inherently unreliable, and, in particular, it consistently fails 
on Cygwin.  In other words, the SIGALRM is delivered before select times 
out, causing select to get interrupted.  So wait_reading_process_output 
does indeed loop, and select fails every time (except when a key is 
pressed).

If I block SIGALRM before the call to select (in the situation where the 
timeout was reduced), the problem is solved.  I need to do some more 
testing, but so far I don't see any sign that this causes other problems.

One tricky thing is that blocking SIGALRM has to be done right before 
the call to the *system* select.  In the build with GTK support, this 
call is inside xg_select, and things break if SIGALRM is blocked before 
the call to xg_select.  So I'm not sure what's the best way to handle 
this.  I'll keep thinking about it, but suggestions are welcome.

Ken





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

* bug#9767: 24.0.90; gdb initialization on Cygwin
  2011-10-21 20:47                 ` Ken Brown
@ 2011-10-21 22:15                   ` Eli Zaretskii
  2011-10-22  9:51                     ` Ken Brown
  2011-10-21 22:24                   ` Stefan Monnier
  1 sibling, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2011-10-21 22:15 UTC (permalink / raw)
  To: Ken Brown; +Cc: schwab, 9767

> Date: Fri, 21 Oct 2011 16:47:52 -0400
> From: Ken Brown <kbrown@cornell.edu>
> CC: Andreas Schwab <schwab@linux-m68k.org>, 9767@debbugs.gnu.org
> 
> OK, I figured out what's happening, and it is related to SIGALRM after 
> all.  In line 4406 of process.c, wait_reading_process_output reduces the 
> timeout for the select call (under certain circumstances) in an attempt 
> to prevent select from being interrupted by SIGALRM.  This seems to me 
> to be inherently unreliable, and, in particular, it consistently fails 
> on Cygwin.  In other words, the SIGALRM is delivered before select times 
> out, causing select to get interrupted.  So wait_reading_process_output 
> does indeed loop, and select fails every time (except when a key is 
> pressed).

Why does reducing the timeout works on, say, GNU/Linux, but not on
Cygwin?  What is different?  Clock granularity, perhaps?





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

* bug#9767: 24.0.90; gdb initialization on Cygwin
  2011-10-21 20:47                 ` Ken Brown
  2011-10-21 22:15                   ` Eli Zaretskii
@ 2011-10-21 22:24                   ` Stefan Monnier
  2011-10-22  9:47                     ` Ken Brown
  1 sibling, 1 reply; 16+ messages in thread
From: Stefan Monnier @ 2011-10-21 22:24 UTC (permalink / raw)
  To: Ken Brown; +Cc: Andreas Schwab, 9767

> unreliable, and, in particular, it consistently fails on Cygwin.  In other
> words, the SIGALRM is delivered before select times out, causing select to
> get interrupted.  So wait_reading_process_output does indeed loop, and
> select fails every time (except when a key is pressed).

Why is it a problem that `select' fails?  It should not be a problem: in
the worst case it should only mean that Emacs does "busy waiting" and
uses up more CPU than needed.  But it shouldn't prevent Emacs from
reading input from processes (which IIUC is the actual problem we're
trying to solve).


        Stefan





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

* bug#9767: 24.0.90; gdb initialization on Cygwin
  2011-10-21 22:24                   ` Stefan Monnier
@ 2011-10-22  9:47                     ` Ken Brown
  0 siblings, 0 replies; 16+ messages in thread
From: Ken Brown @ 2011-10-22  9:47 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Andreas Schwab, 9767

On 10/21/2011 6:24 PM, Stefan Monnier wrote:
>> unreliable, and, in particular, it consistently fails on Cygwin.  In other
>> words, the SIGALRM is delivered before select times out, causing select to
>> get interrupted.  So wait_reading_process_output does indeed loop, and
>> select fails every time (except when a key is pressed).
>
> Why is it a problem that `select' fails?  It should not be a problem: in
> the worst case it should only mean that Emacs does "busy waiting" and
> uses up more CPU than needed.  But it shouldn't prevent Emacs from
> reading input from processes (which IIUC is the actual problem we're
> trying to solve).

You're right.  I wasn't thinking clearly.  The problem  is not solved.

Ken






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

* bug#9767: 24.0.90; gdb initialization on Cygwin
  2011-10-21 22:15                   ` Eli Zaretskii
@ 2011-10-22  9:51                     ` Ken Brown
  2011-10-22 20:58                       ` Ken Brown
  0 siblings, 1 reply; 16+ messages in thread
From: Ken Brown @ 2011-10-22  9:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: schwab, 9767

On 10/21/2011 6:15 PM, Eli Zaretskii wrote:
>> Date: Fri, 21 Oct 2011 16:47:52 -0400
>> From: Ken Brown<kbrown@cornell.edu>
>> CC: Andreas Schwab<schwab@linux-m68k.org>, 9767@debbugs.gnu.org
>>
>> OK, I figured out what's happening, and it is related to SIGALRM after
>> all.  In line 4406 of process.c, wait_reading_process_output reduces the
>> timeout for the select call (under certain circumstances) in an attempt
>> to prevent select from being interrupted by SIGALRM.  This seems to me
>> to be inherently unreliable, and, in particular, it consistently fails
>> on Cygwin.  In other words, the SIGALRM is delivered before select times
>> out, causing select to get interrupted.  So wait_reading_process_output
>> does indeed loop, and select fails every time (except when a key is
>> pressed).
>
> Why does reducing the timeout works on, say, GNU/Linux, but not on
> Cygwin?  What is different?  Clock granularity, perhaps?

Sorry, I'm wrong again.  As Stefan pointed out, it's harmless that 
select gets interrupted by SIGALRM.  That can't explain the gdb problem, 
which still isn't solved.

Ken





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

* bug#9767: 24.0.90; gdb initialization on Cygwin
  2011-10-22  9:51                     ` Ken Brown
@ 2011-10-22 20:58                       ` Ken Brown
  2011-10-23 21:59                         ` Ken Brown
  0 siblings, 1 reply; 16+ messages in thread
From: Ken Brown @ 2011-10-22 20:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: schwab, 9767

For the third (and final?) time, I think I've figured out the problem. 
It has nothing to do with emacs or select, but is simply a problem with 
Cygwin's gdb.  When the current Cygwin gdb is given too many input lines 
before having its output read, it sometimes stops producing output and 
waits for the user to press Return.

This is what was happening during the initialization of M-x gdb, and 
that explains why I could work around the problem by inserting 
(sleep-for .1) before the initialization was finished.

I've found a way to reliably reproduce this, and I've reported it to the 
Cygwin list.

I'm not closing this bug report yet because I want to wait and see how 
the Cygwin problem is resolved.  It may still be necessary to use some 
kind of workaround.

Thanks to all who tried to help and who put up with my mistakes and 
misunderstandings.

Ken





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

* bug#9767: 24.0.90; gdb initialization on Cygwin
  2011-10-22 20:58                       ` Ken Brown
@ 2011-10-23 21:59                         ` Ken Brown
  0 siblings, 0 replies; 16+ messages in thread
From: Ken Brown @ 2011-10-23 21:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: schwab, 9767-done

On 10/22/2011 4:58 PM, Ken Brown wrote:
> I'm not closing this bug report yet because I want to wait and see how
> the Cygwin problem is resolved.

This has now been fixed in the Cygwin development trunk.  The fix will 
be in Cygwin 1.7.10, which will probably be released before Emacs 24.1, 
so I'm closing the bug.






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

end of thread, other threads:[~2011-10-23 21:59 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-16 16:02 bug#9767: 24.0.90; gdb initialization on Cygwin Ken Brown
2011-10-16 23:08 ` Ken Brown
2011-10-17  5:39   ` Eli Zaretskii
2011-10-19 20:00     ` Ken Brown
2011-10-19 20:26       ` Eli Zaretskii
2011-10-19 20:43         ` Ken Brown
2011-10-19 21:03           ` Andreas Schwab
2011-10-19 22:02             ` Eli Zaretskii
2011-10-20  2:11               ` Ken Brown
2011-10-21 20:47                 ` Ken Brown
2011-10-21 22:15                   ` Eli Zaretskii
2011-10-22  9:51                     ` Ken Brown
2011-10-22 20:58                       ` Ken Brown
2011-10-23 21:59                         ` Ken Brown
2011-10-21 22:24                   ` Stefan Monnier
2011-10-22  9:47                     ` Ken Brown

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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