Stack trace snapshot provider example
#include <iostream>
#include <thread>
void function1()
{
std::cout <<
"Thread Id: " <<
__THREAD__ << std::endl;
std::cout <<
"Stack trace: " << std::endl <<
__STACK__ << std::endl;
}
void function2()
{
function1();
}
void function3()
{
function2();
}
int main(int argc, char** argv)
{
function3();
std::thread(function3).join();
return 0;
}
static void Initialize()
Initialize stack trace manager.
static void Cleanup()
Cleanup stack trace manager.
Stack trace snapshot provider definition.
#define __STACK__
Current stack trace snapshot macro.
Stack trace manager definition.
#define __THREAD__
Current thread Id macro.