crash: add crash stack print.
This commit is contained in:
@@ -13,5 +13,5 @@ find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Network)
|
||||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Network)
|
||||
|
||||
add_executable(frelayConsole Console.h Console.cpp main.cpp ../Res/ico.rc)
|
||||
target_link_libraries(frelayConsole PRIVATE Protocol Util)
|
||||
target_link_libraries(frelayConsole PRIVATE Protocol Util crashelper)
|
||||
target_link_libraries(frelayConsole PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Network)
|
||||
@@ -1,10 +1,18 @@
|
||||
#include <QCoreApplication>
|
||||
#include <Util.h>
|
||||
#include <crashelper.h>
|
||||
|
||||
#include "Console.h"
|
||||
#include <Util.h>
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
auto configDir = Util::GetCurConfigPath("frelay");
|
||||
#ifdef _WIN32
|
||||
backward::SetDumpFileSavePath(configDir + "/dumpfile");
|
||||
backward::SetDumpLogSavePath(configDir + "/dumplog");
|
||||
#else
|
||||
backward::SetDumpLogSavePath(configDir + QDir::separator() + "dumplog");
|
||||
#endif
|
||||
QCoreApplication app(argc, argv);
|
||||
|
||||
Util::InitLogger("frelayConsole.log", "frelayConsole");
|
||||
|
||||
Reference in New Issue
Block a user