- This a demo to handle c++ crash with google breakpad and launch a Qt app to send crash log back to server.
- Most of the code are extracted from Qt Creator project.
- The Demo includes a
QtBreakpadDemo
which crashes, launching theQtCrashHandler
afterwards.
Qt5
breakpad
's source files are used directly. No need to compilebreakpad
>> git clone https://github.com/KandaoVR/qt-breakpad.git --recursive
- use CMake-Gui to generate Visual Studio Solution
- Build ALL
>> mkdir build
>> cd build
>> cmake -DCMAKE_PREFIX_PATH=/path-to-qt-clang/ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH="ON" ../
>> make -j8 install
>> cd install/Demo
>> ./QtBreakpadDemo
-
cmake command example:
cmake -DCMAKE_PREFIX_PATH=~/Qt/5.11.1/clang_64/ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH="ON" ../
-
If the main app is built with bundle, i.e. add
MACOSX_BUNDLE
to add_executable. For example:add_executable(QtBreakpadDemo MACOSX_BUNDLE ${SOURCES} ${BREAKPAD_SRCS} ${ICON_FILE} ${QM_FILES})
-
The binary version of
QtCrashHandler
should be copied to QtBreakpad.app/Contents/MaxOS/, so that the inner binaryQtBreakpad
is able to callQtCrashHandler
during crashing.
- Should be working. lol
- Pull requests are welcomed!
- contact Neil for more information neil.szj@kandaovr.com