diff --git a/client/TracyCallstack.cpp b/client/TracyCallstack.cpp index b3ad73f6..6981f8c0 100644 --- a/client/TracyCallstack.cpp +++ b/client/TracyCallstack.cpp @@ -2,7 +2,7 @@ #ifdef TRACY_HAS_CALLSTACK -#ifdef _WIN32 +#if defined _WIN32 || defined __CYGWIN__ # ifndef MAXLONG enum { SYMOPT_LOAD_LINES = 0x00000010 }; typedef struct _SYMBOL_INFO diff --git a/client/TracyCallstack.hpp b/client/TracyCallstack.hpp index 9c6efedb..7322b704 100644 --- a/client/TracyCallstack.hpp +++ b/client/TracyCallstack.hpp @@ -1,10 +1,14 @@ #ifndef __TRACYCALLSTACK_HPP__ #define __TRACYCALLSTACK_HPP__ -#ifdef _WIN32 +#if defined _WIN32 || defined __CYGWIN__ # define TRACY_HAS_CALLSTACK # ifndef MAXLONG +# ifdef __CYGWIN__ +extern "C" __declspec(dllimport) unsigned short __stdcall RtlCaptureStackBackTrace( unsigned int, unsigned int, void**, unsigned int* ); +# else extern "C" __declspec(dllimport) unsigned short __stdcall RtlCaptureStackBackTrace( unsigned long, unsigned long, void**, unsigned long* ); +# endif # endif #endif @@ -27,7 +31,7 @@ struct CallstackEntry uint32_t line; }; -#ifdef _WIN32 +#if defined _WIN32 || defined __CYGWIN__ void InitCallstack(); CallstackEntry DecodeCallstackPtr( uint64_t ptr );