Win32:HEADERS += $$PWD/src/common/scoped_ptr.h Win32:HEADERS += $$PWD/src/client/windows/crash_generation/crash_generation_client.h Win32:HEADERS += $$PWD/src/google_breakpad/common/breakpad_types.h Win32:HEADERS += $$PWD/src/google_breakpad/common/minidump_format.h Win32:HEADERS += $$PWD/src/client/windows/common/ipc_protocol.h Win32:HEADERS += $$PWD/src/client/windows/handler/exception_handler.h Win32:HEADERS += $$PWD/src/common/windows/guid_string.h Win32:HEADERS += $$PWD/src/common/windows/string_utils-inl.h # To use source from Google Breakpad SVN checkout instead, change $$PWD/src # integration with the application smooth and easy. # The required breakpad sources have been copied into /src in order to make Note that more required files will probably be needed for other platform which I did not test, but any missing files can easily be added. pri to the Qt application proved very easy and clean. Instead just adding the required files to a. I did not explore the other ways of building breakpad on its own. pri file for the required files in this directory. Void CrashHandler::Init( const QString& reportPath ) QWarning("BreakpadQt: writeMinidump() failed.") QDebug("BreakpadQt: writeMinidump() success.") Void CrashHandler::setReportCrashesToSystem(bool report) Google_breakpad::MinidumpDescriptor md(pathAsStr) Std::string pathAsStr = dumpPath.toStdString() PHandler = new google_breakpad::ExceptionHandler( Std::wstring pathAsStr = (const wchar_t*)dumpPath.utf16() Void CrashHandlerPrivate::InitCrashHandler(const QString& dumpPath) Return CrashHandlerPrivate::bReportCrashesToSystem ? success : true Google_breakpad::ExceptionHandler* CrashHandlerPrivate::pHandler = NULL īool CrashHandlerPrivate::bReportCrashesToSystem = false īool DumpCallback(const wchar_t* _dump_dir,const wchar_t* _minidump_id,void* context,EXCEPTION_POINTERS* exinfo,MDRawAssertionInfo* assertion,bool success)īool DumpCallback(const google_breakpad::MinidumpDescriptor &md,void *context, bool success)Ĭreating QString's, using qDebug, etc. Static google_breakpad::ExceptionHandler* pHandler Void InitCrashHandler(const QString& dumpPath) #include "client/windows/handler/exception_handler.h" #include "client/linux/handler/exception_handler.h" Void setReportCrashesToSystem(bool report) Ĭrash_handler.cpp #include "crash_handler.h" The header and source file contents looks like this: Create a new class called CrashHandler in this directory.Create a directory called crashhandler in your application's source directory.Svn checkout the Google Breakpad sources:.If something is wrong in the article or if I am not understanding something correctly, please file a bug against this article or feel free to edit the wiki page. All references to other operating systems were removed (Mac etc.). The implementation is roughly based on this blog post so its a good reference to fall back to if this page is unclear. The implementation was done and tested on both Windows 7 (MSVC Express 2010) and Linux (Ubuntu 12.0.4 and CentOs 5.6) using SVN revision 1281 of the Google Breakpad repository. This page contains notes I made while implementing a Google Breakpad based crash handler for a Qt 5.1.1 C++ application. More information on the Google Breakpad project page. Users can send these minidumps to you and it contains valuable information allowing you to figure out why it crashed on them. Google Breakpad is a cross platform crash handler which generates minidumps when your application crash. Using the Qt Cryptographic Architecture with Qt5 Using Google Translate to translate your Qt application Produce a stacktrace when something goes wrong in your application
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |