#include <crashelper.h>
#include <iostream>
#include <thread>

using namespace backward;

void th_sim()
{
    std::this_thread::sleep_for(std::chrono::seconds(2));
    // throw "Erro Auto";
    int* p = nullptr;
    *p = 33;
}

int main()
{
#ifdef _WIN32
    SetDumpFileSavePath("D:\\dump");
    SetDumpLogSavePath("D:\\dump");
#else
    SetDumpLogSavePath("dump");
#endif

    CRASHELPER_MARK_ENTRY();

    std::thread t(th_sim);
    std::cout << "Done" << std::endl;
    t.join();
    return 0;
}