diff --git a/include/wine/test.h b/include/wine/test.h
index caa3f35..3664cf5 100644
--- a/include/wine/test.h
+++ b/include/wine/test.h
@@ -473,6 +473,24 @@ static void usage( const char *argv0 )
 }
 
 
+static LONG CALLBACK winetest_unhandled_exception_filter(PEXCEPTION_POINTERS epointers)
+{
+    tls_data* data=get_tls_data();
+
+    fprintf( stdout, "%s: unhandled exception 0x%08x at address %p",
+             current_test->name,
+             epointers->ExceptionRecord->ExceptionCode,
+             epointers->ExceptionRecord->ExceptionAddress );
+    if (data->current_file)
+        fprintf( stdout, " after %s:%d\n", data->current_file, data->current_line );
+    else
+        fprintf( stdout, " before first test\n" );
+
+    ExitProcess( epointers->ExceptionRecord->ExceptionCode );
+    /* never reached */
+}
+
+
 /* main function */
 int main( int argc, char **argv )
 {
@@ -499,6 +517,13 @@ int main( int argc, char **argv )
         list_tests();
         return 0;
     }
+
+    /* developers sometimes don't have access to the Windows machines on
+     * which tests crash, so print a bit more information upon crashing to
+     * aid in debugging */
+    if (strcmp(winetest_platform, "windows") == 0)
+        SetUnhandledExceptionFilter(winetest_unhandled_exception_filter);
+
     return run_test(argv[1]);
 }
 
