Breakpad Wrapper

Created on June 21, 2022


Breakpad consists of a library and tool suite –

Library is linked with the  application to record crashes in compact “minidump” file

  • libbreakpad_client.a (breakpad client: that writes minidump)

Tools are used in the server (or in a system where debugging is   performed) to produce C and C++ stack traces.

  • dump_syms (symbol dumper: to extract the debug symbols for a given library/binary)
  • minidump_stackwalk (minidump processor: uses the minidump and the symbols created by dump_syms to produce stack trace)

Breakpad C Wrapper

Breakpad wrapper acts as a wrapper to integrate Google Breakpad with RDK components.

Purpose of this component is to avoid static linking of the library (libbreakpad_client.a) across different modules. Includes the static library (libbreakpad_client.a) so that we can use dynamic library (libbreakpadwrapper.so) along with the native code.

   https://code.rdkcentral.com/r/rdk/components/generic/breakpad_wrapper

Breakpad exception handler writes minidump to disk at exception time.

void breakpad_ExceptionHandler()

{

       printf("tttt ********ENTER breakpad_ExceptionHandler****************** n");

       static google_breakpad::ExceptionHandler* excHandler = NULL;

       excHandler = new    google_breakpad::ExceptionHandler(google_breakpad::MinidumpDescriptor("/opt/minidumps"), NULL, breakpadDumpCallback, NULL, true, -1);

       printf("tttt ******** breakpad_ExceptionHandler EXIT****************** n");

}

Breakpad-wrapper component compiles to create libbreakpadwrapper.so which needs to be linked with the RDK component for Breakpad integration.

See the page Integrating Breakpad to RDK-V Component to know about its usage

Useful Tip:

Breakpad wrapper now supports writing minidump content to a specific file descriptor provided by an environment variable named BREAKPAD_FD

Go To Top