Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel

It takes a minidump and its corresponding text-format symbols and produce a symbolized stacktrace.

minidump_stackwalk minidump.dmp gpsample_app.sym


uploadDumps.sh collects core dumps/ mini dumps  to crash server whenever any applications crashes.

Sample Application

Code Block
#include "client/linux/handler/exception_handler.h“
static bool dumpCallback(const google_breakpad::MinidumpDescriptor& descriptor,
                         void* context,
                         bool succeeded)
{
  printf("Dump path: %s\n", descriptor.path());
  return succeeded;
}

void crash()
{
  volatile int* a = (int*)(NULL);
  *a = 1;
}


int main(int argc, char* argv[])
{
  google_breakpad::MinidumpDescriptor descriptor("/tmp");
  google_breakpad::ExceptionHandler eh(descriptor,
                                       NULL,
                                       dumpCallback,
                                       NULL,
                                       true,
                                       -1);
  crash();
  return 0;
}

To compile the source

  • Create a simple Makefile
  • Add the following contents to the Makefile
Panel

PKG_CONFIG_PATH=../

all: breakpad_exercise.c

@ $(CXX) -std=c++11 breakpad_exercise.c -g -o breakpad_exercise `pkg-config --cflags breakpad` -L./client/linux/ -lbreakpad_client -I./ -lpthread


  • make 

Execute the sample application

  • An application of name “breakpad_exercise” will be generated. Copy this executable to the box 
  • Run the application in the box which will cause segmentation fault:

Image Added

  • A minidump will be generated in the same file

Image Added

Coredump

Core dump files generated after an uncaught signal in a process (as a SIGSEGV or SIGQUIT), are generated in the base directory where the program was executed, and the core dumps starts with the name  as “core” or “core.PID”.

...

Panel
gdb <executable_path> <coredump_file_path>

After you get inside the gdb-prompt, (on execution of the above command), type;

(gdb) bt full

Usage

...