How google/breakpad works
Project Type and Purpose
• Breakpad is an open-source, cross-platform crash-reporting system.
• It consists of:
– Client libraries that embed in applications (on Linux, macOS, Windows, Android, iOS, Solaris) to catch crashes, generate “minidump” files, and upload them.
– A set of standalone tools (dump_syms, symupload, md2core, etc.) for symbol extraction, conversion, and upload.
– A processor pipeline (minidump_stackwalk, minidump_dump, etc.) that parses minidumps, resolves symbols, and produces human-readable crash reports or machine-readable outputs.
– Third-party dependencies (libcurl, musl, gflags, etc.) and build scripts for autotools, Xcode, Visual Studio, and CI.
File‐Structure and Architectural Patterns
• Top-level modules:
– src/client: OS‐specific crash handlers and uploaders.
– src/common: cross-platform utility libraries for parsing, memory I/O, threading, platform abstractions.
– src/google_breakpad: core format definitions and shared data structures.
– src/processor: the crash-report processing engine (stack walking, symbol resolution).
– src/tools: command‐line utilities for symbol dumping, minidump conversion, symbol upload, etc., organized by OS.
– src/third_party: bundled external libraries (curl, libdisasm, musl, headers).
• Architectural style: layered, modular, plugin-like per OS. The client layer depends on common & google_breakpad, the processor layer depends on common & google_breakpad, and tools orchestrate those layers.