I am creating a multi-platform Qt application for which I would want a crash reporting system to generate a crash report whenever there's a crash on the user's computer. At a later point, I should be able to view the stack trace with all the debug info from the crash report. I have looked at google-breakpad.
But to use that it seems I need to shift to MSVC for windows. Right now I am using MinGW on windows and it would take me significant time & effort to get all the different libraries compiled with MSVC. Is there any way I can use MinGW and still be able to use google-breakpad? Or is there some other alternative which can work multiplatform and support mingw on windows?
I don't know any open multi-platform crash report system except google-breakpad. Even google-breakpad doesn't support MinGW, it is what i know, you still can get backtrace from your application. Project Dr. Mingw provide great dlls: mgwhelp.dll and exchndl.dll. For using you need:
For example like this:
QFile drmingw("exchndl.dll");
if(drmingw.exists())
{// If don't want create reports just delete exchndl.dll from installer
LoadLibrary(L"exchndl.dll");
}
After crash you will find file binary_name.RPT with backtrace at the same directory where binary is.
What else i do?
win32:!win32-msvc*{ # Strip debug symbols. QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg && QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} && QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET} }
libcrashreporter-qt "is supposed to provide an easy integration of Google Breakpad crash reporting into a Qt application".
It contains patches to breakpad to make it buildable with the MinGW toolchain.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With