1

I have a large-ish Win32 program that I'm maintaining, and I'd like to instrument it to automatically and unconditionally generate a minidump file whenever something bad happens. I can't ask customers to install userdump.exe, and I can't ask them to install visual studio.

Is there a good way of doing this? I'd like to be able to generate a minidump whether abort() is called from our assert handler (which is complicated), whether someone touches bad memory, or anything else really bad happens.

On Posix, I'd install a signal handler and be done with this. My understanding is that the equivalent approach on Windows is SEH, but our program starts up a lot of threads in a lot of different places so it would be very painful to wrap every thread entry point with a __try/__catch.

Ideas?

4

1 回答 1

1

有用于捕获崩溃的google breakpad客户端和服务器组件。你可以使用这个库

您还可以注册您的过滤器(可以检查不同的探险类型)回调以使用 AddVectoredExceptionHandler处理异常。

我希望它有帮助

于 2016-05-26T13:50:46.793 回答