preliminary google crashpad integration

First attempt at automated out-of-process crash reporting. Have only
updated AppVeyor script so far, so if this works (which it won't), it'll
only work on Windows.
This commit is contained in:
itsmattkc
2020-08-14 18:25:12 +10:00
parent 857531b011
commit 10709880fc
8 changed files with 255 additions and 12 deletions
+12 -4
View File
@@ -32,17 +32,18 @@ extern "C" {
}
#include <csignal>
#include <QApplication>
#include <QSurfaceFormat>
#include "core.h"
#include "common/crashhandler.h"
#include "common/debug.h"
int main(int argc, char *argv[]) {
signal(SIGSEGV, OLIVE_NAMESPACE::crash_handler);
signal(SIGABRT, OLIVE_NAMESPACE::crash_handler);
#ifdef USE_CRASHPAD
#include "common/crashpadinterface.h"
#endif // USE_CRASHPAD
int main(int argc, char *argv[]) {
// Set OpenGL display profile (3.2 Core)
QSurfaceFormat format;
format.setVersion(3, 2);
@@ -86,5 +87,12 @@ int main(int argc, char *argv[]) {
avfilter_register_all();
#endif
// Enable Google Crashpad if compiled with it
#ifdef USE_CRASHPAD
if (!InitializeCrashpad()) {
qWarning() << "Failed to initialize Crashpad handler";
}
#endif // USE_CRASHPAD
return OLIVE_NAMESPACE::Core::instance()->execute(&a);
}