mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 19:35:32 +08:00
Integrate Crashpad crash handler into CApplication
Crash handler launches an external crash handler executable called swift_crashpad_handler. It monitores the parent process and produces a local dump in case of a crash. For release builds, the dump is also uploaded to a crash report server. refs #490
This commit is contained in:
@@ -37,6 +37,10 @@
|
||||
#include "blackmisc/statusmessage.h"
|
||||
#include "blackmisc/statusmessagelist.h"
|
||||
|
||||
#if defined(Q_CC_MSVC) || defined(Q_OS_OSX) // Crashpad only supported on MSVC and MacOS/X
|
||||
#define BLACK_USE_CRASHPAD
|
||||
#endif
|
||||
|
||||
class QHttpMultiPart;
|
||||
class QNetworkReply;
|
||||
class QNetworkRequest;
|
||||
@@ -47,6 +51,12 @@ namespace BlackMisc
|
||||
class CLogCategoryList;
|
||||
}
|
||||
|
||||
namespace crashpad
|
||||
{
|
||||
class CrashpadClient;
|
||||
class CrashReportDatabase;
|
||||
}
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
class CCoreFacade;
|
||||
@@ -402,6 +412,8 @@ namespace BlackCore
|
||||
//! Async. start when setup is loaded
|
||||
bool asyncWebAndContextStart();
|
||||
|
||||
void initCrashHandler();
|
||||
|
||||
QScopedPointer<CCoreFacade> m_coreFacade; //!< core facade if any
|
||||
QScopedPointer<CSetupReader> m_setupReader; //!< setup reader
|
||||
QScopedPointer<CWebDataServices> m_webDataServices; //!< web data services
|
||||
@@ -422,6 +434,8 @@ namespace BlackCore
|
||||
bool m_unitTest = false; //!< is UNIT test
|
||||
bool m_autoSaveSettings = true;//!< automatically saving all settings
|
||||
|
||||
std::unique_ptr<crashpad::CrashpadClient> m_crashpadClient;
|
||||
std::unique_ptr<crashpad::CrashReportDatabase> m_crashReportDatabase;
|
||||
};
|
||||
} // namespace
|
||||
|
||||
|
||||
Reference in New Issue
Block a user