Code Monkey home page Code Monkey logo

breakpad's Introduction

Breakpad

This is a fork of Google Breakpad, a multi-platform crash reporting system, which is used by Mendeley Desktop under Windows, Mac and Linux.

Mendeley's additions to breakpad include:

  • A CMake-based build system for the crash capturing client library, debug symbol extraction and stacktrace output (minidump_stackwalk) tools.

  • Support in minidump_stackwalk for fetching debug symbols from arbitrary sources by invoking a user-provided command instead of looking in a specific local filesystem directory. We use this to fetch debug symbols on-demand from an archive hosted in S3.

  • A python script which fetches debug symbols from a symbol server with a given HTTP URL

  • A simple multi-platform end-to-end test that builds a buggy app with the crash capturing library installed, extracts debug symbols from it, runs the test app and symbolizes the resulting crash dump.

  • Compatibility with C++11

Building Breakpad

git clone https://github.com/Mendeley/breakpad.git
mkdir breakpad-build
cd breakpad-build
cmake ../breakpad/mendeley
make

Usage

The overall flow for capturing crashes and debugging them as follows:

  1. Build the breakpad tools and libraries
  2. Link the breakpad library with your application
  3. Early in your app's startup code, create an instance of google_breakpad::ExceptionHandler. This is defined separately for each platform in client/<platform>/handler/exception_handler.h
  4. When the app crashes, it will write a .dmp file to the directory specified when the ExceptionHandler object was created.
  5. When building a release build of your app, run the dump_syms tool on the generated DLLs and binaries to produce .sym files which contain mappings from program locations to source locations.
  6. Upload the .sym files to a location which is accessible via a HTTP URL. See this StackOverflow comment for details of the expected structure of the symbol server
  7. When your app crashes on a user's system, get the .dmp file and use minidump_stackwalk to produce a stacktrace from the .dmp file.

You can also debug the .dmp files in Visual Studio on Windows.

Getting a stacktrace from a minidump

When you have a .dmp file captured by the breakpad library after an application crashes and have uploaded it to a location accessible via a HTTP URL, you can use the minidump_stackwalk tool to extract a stack trace from the minidump.

./minidump_stackwalk -m <path to .dmp file> -e '../breakpad/mendeley/fetch-symbols.py -s <URL of your symbol server>'

breakpad's People

Contributors

cpina avatar georgek-mendeley avatar philliphounslow avatar robertknight avatar vincent-mendeley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

breakpad's Issues

CMake error in win32

Hi,

I have this error in the CMake script:

CMake Error at CMakeLists.txt:30 (ide_group_sources):
  Unknown CMake command "ide_group_sources".

Can't find any definition of the ide_group_sources method

Thanks

make error

In file included from src/client/linux/handler/exception_handler.cc:66:
./src/client/linux/handler/exception_handler.h:175:21: error: field ‘context’ has incomplete type ‘google_breakpad::ucontext’
struct ucontext context;
^~~~~~~
./src/client/linux/handler/exception_handler.h:175:12: note: forward declaration of ‘struct google_breakpad::ucontext’
struct ucontext context;
^~~~~~~~
src/client/linux/handler/exception_handler.cc: In member function ‘bool google_breakpad::ExceptionHandler::HandleSignal(int, siginfo_t*, void*)’:
src/client/linux/handler/exception_handler.cc:345:54: error: invalid application of ‘sizeof’ to incomplete type ‘google_breakpad::ucontext’
memcpy(&context.context, uc, sizeof(struct ucontext));
^
src/client/linux/handler/exception_handler.cc:349:13: error: invalid use of incomplete type ‘struct google_breakpad::ucontext’
if (uc_ptr->uc_mcontext.fpregs) {
^~
In file included from src/client/linux/handler/exception_handler.cc:66:
./src/client/linux/handler/exception_handler.h:175:12: note: forward declaration of ‘struct google_breakpad::ucontext’
struct ucontext context;
^~~~~~~~
src/client/linux/handler/exception_handler.cc:351:18: error: invalid use of incomplete type ‘struct google_breakpad::ucontext’
uc_ptr->uc_mcontext.fpregs,
^~
In file included from src/client/linux/handler/exception_handler.cc:66:
./src/client/linux/handler/exception_handler.h:175:12: note: forward declaration of ‘struct google_breakpad::ucontext’
struct ucontext context;
^~~~~~~~
make: *** [Makefile:3553:src/client/linux/handler/exception_handler.o]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.