cygwin hang problem

Christopher Faylor cgf@redhat.com
Fri Jul 19 18:30:00 GMT 2002


On Fri, Jul 19, 2002 at 06:37:16PM -0400, Joe Buehler wrote:
>(I modified handle_exceptions to wait for dumper to do the dump):

Why did you feel that you had to modify handle_exceptions to wait for
dumper?  Since dumper is invoked as a debugger, and your backtrace
showed that try_to_debug was invoked with waitloop == true, this code
should have been exercised:

      if (!waitloop)
        return 1;	// wouldn't have hit here
      SetThreadPriority (hMainThread, THREAD_PRIORITY_IDLE);
      while (!being_debugged ())
        /* spin */;

As soon as the process is debugged, it should be stopped.  If it isn't
immediately stopped, then the Sleep (4000) should catch it.  I've never
seen a case where gdb was invoked (I don't use dumper, I just have gdb
pop up a process) where the process being debugged wasn't stopped in
try_to_debug.

So, there should be no need to modify anything to wait for anything,
AFAICT.  If there is such a need, there is a bug that needs to be fixed.

cgf



More information about the Cygwin-developers mailing list