Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-01-21 18:16:29 +0300
committerChristopher Faylor <me@cgf.cx>2004-01-21 18:16:29 +0300
commit886105cee3a04a3f32e9f23c8ea1006b604bb216 (patch)
treeddcb8519c3737fd40f06528ac881aa1efd8efdf5
parent156547cefdca53fb092fd99ad7a0eef15745fb1f (diff)
* cygtls.cc (handle_threadlist_exception): Change logic, improve debugging
output.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/cygtls.cc21
2 files changed, 22 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 82e8f581e..d8e637c74 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2004-01-21 Christopher Faylor <cgf@redhat.com>
+ * cygtls.cc (handle_threadlist_exception): Change logic, improve
+ debugging output.
+
+2004-01-21 Christopher Faylor <cgf@redhat.com>
+
* fhandler_tty.cc (fhandler_tty::ioctl): Semi-revert 2003-09-26 change
for TIOCSWINSZ. It is not an error for ioctl_request_event to be
missing.
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc
index 5c9fa615f..88c8bfb32 100644
--- a/winsup/cygwin/cygtls.cc
+++ b/winsup/cygwin/cygtls.cc
@@ -193,13 +193,26 @@ extern "C" DWORD __stdcall RtlUnwind (void *, void *, void *, DWORD);
static int
handle_threadlist_exception (EXCEPTION_RECORD *e, void *frame, CONTEXT *, void *)
{
- small_printf ("in handle_threadlist_exception!\n");
if (e->ExceptionCode != STATUS_ACCESS_VIOLATION)
- return 1;
+ {
+ system_printf ("handle_threadlist_exception called with exception code %d\n",
+ e->ExceptionCode);
+ return 1;
+ }
sentry here;
- if (threadlist_ix != BAD_IX || !here.acquired ())
- return 1;
+ if (threadlist_ix == BAD_IX)
+ {
+ system_printf ("handle_threadlist_exception called with threadlist_ix %d\n",
+ BAD_IX);
+ return 1;
+ }
+
+ if (!here.acquired ())
+ {
+ system_printf ("handle_threadlist_exception couldn't aquire muto\n");
+ return 1;
+ }
extern void *threadlist_exception_return;
cygheap->threadlist[threadlist_ix]->remove (INFINITE);