Skip to content

A crash handler for Qt based applications using gdb

License

Notifications You must be signed in to change notification settings

rcdevice/GdbCrashHandler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GdbCrashHandler

A CrashRpt 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 <pid>, at which point GdbCrashHandler takes over.

screenshot

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.

Submit service:

GdbCrashHandler submits the reports to a web service, using the same format as CrashRpt, see service/report.php.

About

A crash handler for Qt based applications using gdb

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 78.8%
  • CMake 11.8%
  • PHP 9.1%
  • QMake 0.3%