A hack that adds tracing to async request handlers. files/file.c: some more TRACEs scheduler/synchro.c: Add TRACEs. Uses debug channel "thread" (FIXME??) Only in CVS/wine/: 011a.diff diff -ruX diffignore MW/wine/files/file.c CVS/wine/files/file.c --- MW/wine/files/file.c Fri Jan 11 16:15:28 2002 +++ CVS/wine/files/file.c Fri Jan 11 16:14:23 2002 @@ -1444,6 +1444,7 @@ static VOID CALLBACK FILE_OverlappedComplete(DWORD status, DWORD count, LPOVERLAPPED ov) { + TRACE ("status %ld, count %ld, ov %p\n", status, count, ov); NtSetEvent(ov->hEvent,NULL); } diff -ruX diffignore MW/wine/scheduler/synchro.c CVS/wine/scheduler/synchro.c --- MW/wine/scheduler/synchro.c Fri Jan 11 16:15:44 2002 +++ CVS/wine/scheduler/synchro.c Fri Jan 11 16:18:46 2002 @@ -16,7 +16,9 @@ #include "thread.h" #include "winerror.h" #include "wine/server.h" +#include "debugtools.h" +DEFAULT_DEBUG_CHANNEL(thread); /*********************************************************************** * get_timeout @@ -46,6 +48,9 @@ BOOL ret; DWORD status = ovp->ops->get_status (ovp); + TRACE( "ovp %p, status %ld, handle %d, type %d, func %p\n", + ovp, status, ovp->handle, ovp->type, ovp->func ); + /* STATUS_USER_APC means this is a new request */ /* STATUS_PENDING means this request is rescheduled (IO incomplete) */ @@ -76,6 +81,7 @@ if (ret) ovp->ops->set_status ( ovp, GetLastError() ); + TRACE ("ret %d, status %ld\n", ret, ovp->ops->get_status (ovp)); if ( ovp->ops->get_status (ovp) != STATUS_PENDING ) finish_async (ovp); @@ -90,6 +96,8 @@ */ void finish_async(async_private *ovp) { + TRACE ("ovp %p\n", ovp); + /* remove it from the active list */ if(ovp->prev) ovp->prev->next = ovp->next; @@ -118,7 +126,7 @@ async_private *ovp = NULL; DWORD ovp_status; - /* fprintf(stderr,"overlapped %p status %x\n",overlapped,status); */ + TRACE ("asp %p, status %ld\n", asp, status); for( ovp = NtCurrentTeb()->pending_list; ovp && ovp != asp; ovp = ovp->next ); @@ -131,6 +139,8 @@ ovp->ops->set_status (ovp, status); } else ovp_status = ovp->ops->get_status (ovp); + + TRACE ("-->found: status %ld\n", ovp_status); if( ovp_status == STATUS_PENDING ) ovp->func(ovp);