Skip to content

Latest commit

 

History

History
87 lines (58 loc) · 3.08 KB

File metadata and controls

87 lines (58 loc) · 3.08 KB

raygun4breakpad

Breakpad sample projects for Windows, Linux and MacOS to use with Raygun.com.

Each sample is a small code project that integrates with the Breakpad source. When executed, the application crashes and creates a crash dump file (.dmp).

Upload the resulting file to Raygun using the send_minidump.sh script contained in each sample folder.

The Windows sample uses Breakpad's CrashReportSender to upload minidumps automatically.

Project structure

  • sampleapp_linux: Contains Linux sample project
    • sampleapp_linux/send_minidump.sh: Code to send dump files to Raygun
  • sampleapp_macos: Contains MacOS sample project
    • sampleapp_macos/send_minidump.sh: Code to send dump files to Raygun
  • sampleapp_windows: Contains Windows sample project
  • deps: Empty folder to download dependencies (Breakpad)

Setup

Run the install_deps.sh script to pull down the repository dependencies.

On Windows run the install_deps.bat script.

Linux

Build from terminal using the Make file. cd sampleapp_linux && make

MacOS

Build from terminal using the Make file. cd sampleapp_macos && make

Windows

The Windows sample will upload the minidumps automatically if properly configured.

Modify the main.cpp and change YOUR_API_KEY with your Raygun API key.

Build from Visual Studio using the RaygunBreakpad.sln or use the build.bat script if you have msbuild installed.

Run the compiled file x64/Debug/RaygunBreakpad.exe.

You should see a similar output to:

raygun4breakpad\sampleapp_windows\x64\Debug> .\RaygunBreakpad.exe

Minidump callback called with dump_path: ., minidump_id: 603b9607-249c-4869-9f08-b1377eb13dc9, succeeded: 1
Minidump file created at: 603b9607-249c-4869-9f08-b1377eb13dc9.dmp
Crash report sent: 1

Troubleshooting

If compilation fails with:

fatal error: 'mach/ppc/thread_status.h' file not found

Open deps/breakpad/src/client/mac/handler/minidump_generator.h and remove the following code:

#if !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7)
  #define HAS_PPC_SUPPORT
#endif

Output

Once completed a new directory called 'build' will be generated and contains the following files.

File Description
dump_syms.exe Program for converting dSYM files to SYM files
dump_syms.dSYM Apple symbol file for the dump_syms program
libclient.a Breakpad exception handling library used by the sampleapp program
libdisasm.a Library used by the minidump_stackwalk program
mini.dmp minidump generated by the running of the sampleapp.exe
minidump_stackwalk.exe Breakpad library for converting minidumps into a readable format
minidump_stackwalk.dSYM Apple symbol file for the minidump_stackwalk program
sampleapp.exe Console app that generates minidumps when run
sampleapp.dSYM Apple symbol file for the sampleapp program
sampleapp.sym Breakpad symbol file generated using the dump_syms on the sampleapp.dSYM file