https://github.com/manisandro/gdbcrashhandler
A crash handler for Qt based applications using gdb
https://github.com/manisandro/gdbcrashhandler
cplusplus crash-reporting gdb qt stacktrace
Last synced: 7 months ago
JSON representation
A crash handler for Qt based applications using gdb
- Host: GitHub
- URL: https://github.com/manisandro/gdbcrashhandler
- Owner: manisandro
- License: gpl-3.0
- Created: 2017-08-24T21:45:07.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-08-20T09:29:34.000Z (over 4 years ago)
- Last Synced: 2025-05-03T11:36:24.329Z (10 months ago)
- Topics: cplusplus, crash-reporting, gdb, qt, stacktrace
- Language: C++
- Size: 140 KB
- Stars: 14
- Watchers: 5
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
GdbCrashHandler
===============
A [CrashRpt](http://crashrpt.sourceforge.net/) inspired CrashHandler for Qt
based applications which attaches gdb to the dying process, collects a
stacktrace and submits it to a web service.
It works by spawing a `QProcess` in the signal handler, re-starting the
application with arguments `--crashhandle `, at which point
`GdbCrashHandler` takes over.

Usage:
------
Initialize the crash handler just after the `QApplication` instance has been created:
GdbCrashHandler::Configuration config;
config.applicationName = "CrashExample";
config.applicationVersion = "1.0";
config.applicationIcon = ":/icons/bug.png";
config.submitMethod = GdbCrashHandler::Configuration::SubmitService;
config.submitAddress = "http://127.0.0.1/report.php";
GdbCrashHandler::init(config, /*optional*/ fileSaveCallback);
See [example/example.cpp](https://github.com/manisandro/GdbCrashHandler/blob/master/example/example.cpp).
Submit service:
---------------
`GdbCrashHandler` submits the reports to a web service, using the same format as
[CrashRpt](http://crashrpt.sourceforge.net/docs/html/sending_error_reports.html),
see [service/report.php](https://github.com/manisandro/GdbCrashHandler/blob/master/service/report.php).