Skip to content

πŸ§πŸ›πŸ’₯ Sample Linux application built using clang and integrated with Crashpad

Notifications You must be signed in to change notification settings

BugSplat-Git/my-ubuntu-crasher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

bugsplat-github-banner-basic-outline

BugSplat

Crash and error reporting built for busy developers.

Introduction πŸ‘‹

This sample demonstrates Linux C++ crash reporting with BugSplat and Crashpad. The my-ubuntu-crasher sample includes a prebuilt version of Crashpad as well as the Breakpad tools dump_syms and symupload.

Steps πŸ₯Ύ

  1. Ensure git, python, llvm and clang are installed on your machine
  2. Clone this repository
  3. Build main.cpp with debug information and a build ID and link the Crashpad libraries using clang
clang++ -pthread $PROJECT_DIR/main.cpp \
    $CRASHPAD_DIR/lib/libcommon.a \
    $CRASHPAD_DIR/lib/libclient.a \
    $CRASHPAD_DIR/lib/libutil.a \
    $CRASHPAD_DIR/lib/libbase.a \
    -I$CRASHPAD_DIR/include \
    -I$CRASHPAD_DIR/include/third_party/mini_chromium/mini_chromium \
    -I$CRASHPAD_DIR/include/out/Default/gen \
    -o$OUT_DIR/$MODULE_NAME \
    -g \
    -Wl,--build-id
  1. Generate .sym files for the output executable
export SYM_FILE=$OUT_DIR/$MODULE_NAME.sym
$CRASHPAD_DIR/tools/dump_syms $PROJECT_DIR/out/$MODULE_NAME > $SYM_FILE
  1. Upload the generated .sym file to BugSplat
export SYM_FILE=$OUT_DIR/$MODULE_NAME.sym
$CRASHPAD_DIR/tools/symupload $SYM_FILE "https://$BUGSPLAT_DATABASE.bugsplat.com/post/bp/symbol/breakpadsymbols.php?appName=$BUGSPLAT_APP_NAME&appVer=$BUGSPLAT_APP_VERSION"
  1. Run the output executable to generate a crash report
  2. Log into BugSplat using our public account fred@bugsplat.com and password Flintstone
  3. Navigate to the Crashes page and click the link in the ID column to see a detailed crash report

Other ℹ️

Make sure that every time you build you increment the version number and generate/upload new symbol files. If you fail to generate and upload symbol files your crash reports will not contain file names and source line numbers.