change:变更win下不区分debug还是release都产生dump文件。

This commit is contained in:
taynpg 2025-04-25 14:32:11 +08:00
parent 2cf72f3e5c
commit b218a9e877
2 changed files with 1 additions and 6 deletions

View File

@ -35,9 +35,7 @@ sudo apk add binutils-dev
## 2.1 Windows
`Windows``Debug`模式下,`crashelper`会**仅保存**崩溃时的调用栈信息,并将日志信息保存到设定的目录下。
`Windows``Release`模式下,程序编译结果会额外产生`pdb`调试符号文件(此为额外的产生,不影响可执行程序的`Release`性,即不会影响代码优化和运行时性能),请妥善保存好此`pdb`文件,用于后续配合`dump`文件分析异常。`crashelper`会保存崩溃时的`windump`文件到设定的目录下。
`Windows`下,程序编译结果会额外产生`pdb`调试符号文件(此为额外的产生,不影响可执行程序的`Release`性,即不会影响代码优化和运行时性能),请妥善保存好此`pdb`文件,用于后续配合`dump`文件分析异常。`crashelper`会保存崩溃时的`windump`文件到设定的目录下,日志信息保存到设定的目录下。
## 2.2 Linux

View File

@ -157,8 +157,6 @@ std::string GetCurFullLogPath()
void UseExceptionHandler(EXCEPTION_POINTERS* exception)
{
auto& h = crashHelper::getInstance();
#if !defined(NDEBUG) || defined(_DEBUG) || defined(DEBUG)
#else
// Release 模式, 输出 dump 结果到文件
auto dumpBase = h.getCurrentTime() + "-" + h.getBinName();
auto dumpName = h.getCurrentTime() + "-" + h.getBinName() + ".windump";
@ -180,7 +178,6 @@ void UseExceptionHandler(EXCEPTION_POINTERS* exception)
info.ClientPointers = TRUE;
MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hFile, MiniDumpNormal, &info, NULL, NULL);
CloseHandle(hFile);
#endif
}
#endif
} // namespace backward