mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Enable crash handler on cygwin.
Crash is properly recorded, but the profiler hangs while waiting for shutdown finish.
This commit is contained in:
parent
3fd74a92f9
commit
655864eb7c
@ -16,6 +16,7 @@
|
|||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
|
# include <tlhelp32.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _GNU_SOURCE
|
#ifdef _GNU_SOURCE
|
||||||
@ -523,7 +524,7 @@ static BroadcastMessage& GetBroadcastMessage( const char* procname, size_t pnsz,
|
|||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined _WIN32 || defined __CYGWIN__
|
||||||
static DWORD s_profilerThreadId = 0;
|
static DWORD s_profilerThreadId = 0;
|
||||||
static char s_crashText[1024];
|
static char s_crashText[1024];
|
||||||
|
|
||||||
@ -1085,7 +1086,7 @@ Profiler::Profiler()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined _WIN32
|
#if defined _WIN32 || defined __CYGWIN__
|
||||||
s_profilerThreadId = GetThreadId( s_thread->Handle() );
|
s_profilerThreadId = GetThreadId( s_thread->Handle() );
|
||||||
AddVectoredExceptionHandler( 1, CrashFilter );
|
AddVectoredExceptionHandler( 1, CrashFilter );
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user