添加崩溃调用栈使用说明

This commit is contained in:
RigoLigo
2021-05-11 21:28:36 +08:00
committed by Gitee
parent 5f5cb4ede1
commit 1a9acafbde

View File

@@ -1,3 +1,11 @@
/*
* 只使用GCC编译时则使用 -g -rdynamic选项
* CMake项目需分别使用add_compile_options(-g) add_link_options(-rdynamic)
* 否则获取调用栈时不能得到函数名
* 该配置仅支持GCC+Linux平台
*/
#include <execinfo.h>
QString WriteStackTrace(const QString &aStackTrace)
{
QString path = QDir::homePath() + "/.local/share/spark-store/crash/";