diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-01-03 21:58:20 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-01-03 23:28:39 +0200 |
commit | 0642a0910ca0fb8e392636254684b91637a7b542 (patch) | |
tree | 4fa4328fcdf205b80103d5255ea1570439b46cce /src/crashhandler.h | |
parent | Merge some QoL improvements from staging branch (diff) | |
download | smolbote-0642a0910ca0fb8e392636254684b91637a7b542.tar.xz |
PKGBUILD: add install stage for debug symbols
- make toggling breakpad work properly
Diffstat (limited to 'src/crashhandler.h')
-rw-r--r-- | src/crashhandler.h | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/src/crashhandler.h b/src/crashhandler.h index e7f7fa1..9b79ecc 100644 --- a/src/crashhandler.h +++ b/src/crashhandler.h @@ -9,26 +9,28 @@ #ifndef SMOLBOTE_CRASHHANDLER_H #define SMOLBOTE_CRASHHANDLER_H -#ifdef BREAKPAD -//#ifdef Q_OS_LINUX -#include <client/linux/handler/exception_handler.h> -#endif +#include <string> -class CrashHandler +namespace CrashHandler { - -public: - struct BreakpadContext { - char *handler = nullptr; - }; - - // bool filter_callback (void*) - // --> true: continue processing and write a minidump - -#ifdef BREAKPAD - static bool dumpCallback(const google_breakpad::MinidumpDescriptor &descriptor, void *context, bool succeeded); +struct Context { + const std::string dumppath; + const std::string handler; + + explicit Context(const std::string &path, const std::string &crashhandler) + : dumppath(path) + , handler(crashhandler) + { + } +}; + +bool install_handler(Context &ctx) +#ifndef HAVE_BREAKPAD +{ + return false; +} #endif - -}; // CrashHandler +; +}; #endif // SMOLBOTE_CRASHHANDLER_H |