Directly use RtlWalkFrameChain.

RtlCaptureStackBackTrace is just a wrapper for RtlWalkFrameChain.
This commit is contained in:
Bartosz Taudul
2018-06-23 02:07:47 +02:00
parent 19e83b434e
commit a7ace6ef9e
2 changed files with 9 additions and 8 deletions

View File

@@ -15,8 +15,11 @@ namespace tracy
#if defined _WIN32 || defined __CYGWIN__
extern "C" t_RtlWalkFrameChain RtlWalkFrameChain = 0;
void InitCallstack()
{
RtlWalkFrameChain = (t_RtlWalkFrameChain)GetProcAddress( GetModuleHandle( "ntdll.dll" ), "RtlWalkFrameChain" );
SymInitialize( GetCurrentProcess(), nullptr, true );
SymSetOptions( SYMOPT_LOAD_LINES );
}