From b218a9e877579fbb9c7b4fcf4dc6ab3dd67f3cce Mon Sep 17 00:00:00 2001 From: taynpg Date: Fri, 25 Apr 2025 14:32:11 +0800 Subject: [PATCH] =?UTF-8?q?change=EF=BC=9A=E5=8F=98=E6=9B=B4win=E4=B8=8B?= =?UTF-8?q?=E4=B8=8D=E5=8C=BA=E5=88=86debug=E8=BF=98=E6=98=AFrelease?= =?UTF-8?q?=E9=83=BD=E4=BA=A7=E7=94=9Fdump=E6=96=87=E4=BB=B6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +--- crashelper/src/crashelper.cxx | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/README.md b/README.md index 8e5f3ff..a95835c 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/crashelper/src/crashelper.cxx b/crashelper/src/crashelper.cxx index 918f0b1..4e57fec 100644 --- a/crashelper/src/crashelper.cxx +++ b/crashelper/src/crashelper.cxx @@ -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