99
1010namespace tracy
1111{
12- static tracy_force_inline void * Callstack ( int /* depth*/ ) { return nullptr ; }
12+ static constexpr bool has_callstack () { return false ; }
13+ static tracy_force_inline void * Callstack ( int32_t /* depth*/ ) { return nullptr ; }
1314}
1415
1516#else
@@ -38,6 +39,8 @@ static tracy_force_inline void* Callstack( int /*depth*/ ) { return nullptr; }
3839namespace tracy
3940{
4041
42+ static constexpr bool has_callstack () { return true ; }
43+
4144struct CallstackSymbolData
4245{
4346 const char * file;
@@ -79,11 +82,10 @@ debuginfod_client* GetDebuginfodClient();
7982
8083extern " C"
8184{
82- typedef unsigned long (__stdcall *___tracy_t_RtlWalkFrameChain)( void **, unsigned long , unsigned long );
83- TRACY_API extern ___tracy_t_RtlWalkFrameChain ___tracy_RtlWalkFrameChain;
85+ TRACY_API unsigned long ___tracy_RtlWalkFrameChain ( void **, unsigned long , unsigned long );
8486}
8587
86- static tracy_force_inline void * Callstack ( int depth )
88+ static tracy_force_inline void * Callstack ( int32_t depth )
8789{
8890 assert ( depth >= 1 && depth < 63 );
8991 auto trace = (uintptr_t *)tracy_malloc ( ( 1 + depth ) * sizeof ( uintptr_t ) );
@@ -112,7 +114,7 @@ static _Unwind_Reason_Code tracy_unwind_callback( struct _Unwind_Context* ctx, v
112114 return _URC_NO_REASON;
113115}
114116
115- static tracy_force_inline void * Callstack ( int depth )
117+ static tracy_force_inline void * Callstack ( int32_t depth )
116118{
117119 assert ( depth >= 1 && depth < 63 );
118120
@@ -127,7 +129,7 @@ static tracy_force_inline void* Callstack( int depth )
127129
128130#elif TRACY_HAS_CALLSTACK == 3 || TRACY_HAS_CALLSTACK == 4 || TRACY_HAS_CALLSTACK == 6
129131
130- static tracy_force_inline void * Callstack ( int depth )
132+ static tracy_force_inline void * Callstack ( int32_t depth )
131133{
132134 assert ( depth >= 1 );
133135
0 commit comments