diff options
author | Christopher Faylor <me@cgf.cx> | 2004-01-21 15:16:10 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-01-21 15:16:10 +0000 |
commit | be14b608aad549a7d226a3e75e40ab500324cf4e (patch) | |
tree | 298824364d54e5b00153f587ed29a34ecf84166a /winsup/cygwin/cygtls.cc | |
parent | bcb4223cbc9de4519eefa039d142dd91df3c8318 (diff) | |
download | cygnal-be14b608aad549a7d226a3e75e40ab500324cf4e.tar.gz cygnal-be14b608aad549a7d226a3e75e40ab500324cf4e.tar.bz2 cygnal-be14b608aad549a7d226a3e75e40ab500324cf4e.zip |
* cygtls.cc (handle_threadlist_exception): Change logic, improve debugging
output.
Diffstat (limited to 'winsup/cygwin/cygtls.cc')
-rw-r--r-- | winsup/cygwin/cygtls.cc | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc index ecec3f52b..6e31d66e6 100644 --- a/winsup/cygwin/cygtls.cc +++ b/winsup/cygwin/cygtls.cc @@ -200,13 +200,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); |