mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-24 05:45:27 +00:00
79b2314e5a
* move building errors to the troubleshooting section * add submodule out of sync issue to troubleshooting * changes to get cutter section * move common issues to user docs * add error related to submodule not in sync * Grammarly scan on all the docs * update contribution guide now that common-errors is split
33 lines
1.1 KiB
ReStructuredText
33 lines
1.1 KiB
ReStructuredText
Crash Handling System
|
|
=====================
|
|
|
|
Cutter uses `Breakpad <https://github.com/google/breakpad>`__ as a backend
|
|
for crash handling.
|
|
|
|
Crash Handling System is disabled by default to not interfere with developers while debugging.
|
|
To enable this system, set the ``CUTTER_ENABLE_CRASH_REPORTS`` build option.
|
|
|
|
Solution Description
|
|
--------------------
|
|
|
|
There are only 2 source files:
|
|
|
|
* ``CrashHandler.h``
|
|
* ``CrashHandler.cpp``
|
|
|
|
And the API is very simple: One function, ``initCrashHandler()``, enables the Crash Handling System if
|
|
``CUTTER_ENABLE_CRASH_REPORTS`` is true, otherwise it does nothing.
|
|
|
|
As soon as a signal is raised, ``crashHandler(int signum)`` is called with the signal's code as an argument.
|
|
This function first writes a crash dump to the operating system's temporary directory to catch core and
|
|
memory state as it was at the moment of the crash.
|
|
|
|
Then the crash dialog is shown:
|
|
|
|
.. image :: /images/crash-dialog.png
|
|
|
|
If the user chooses to create a crash dump, the prepared dump is moved to the directory specified by the user.
|
|
And then the success dialog is shown:
|
|
|
|
.. image :: /images/success-dump-dialog.png
|