# chromium/crashpad architecture

> Architecture diagram of the GitHub repository chromium/crashpad, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chromium/crashpad
- Repository: https://github.com/chromium/crashpad

## Overview

Crashpad is a cross-platform crash-reporting system. An application configures a client and handler; when a crash occurs, the handler captures process state, writes a minidump into the crash database, and can upload pending reports. The tree also shows report settings and maintenance, user annotations and streams, and iOS in-process intermediate dumps. The graph uses documented capabilities and source-index references; where implementation details were not sampled, relationships are omitted rather than inferred.

Main entry points: [`minidump/minidump_file_writer.h`](https://github.com/chromium/crashpad/blob/main/minidump/minidump_file_writer.h) (Minidump writer), [`handler/handler_main.cc`](https://github.com/chromium/crashpad/blob/main/handler/handler_main.cc) (Handler startup), [`client/crash_report_database.h`](https://github.com/chromium/crashpad/blob/main/client/crash_report_database.h) (Crash report database), [`handler/win/crash_report_exception_handler.cc`](https://github.com/chromium/crashpad/blob/main/handler/win/crash_report_exception_handler.cc) (Windows exception handling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client and capture"]
  node_crash_client["Crash client<br/>[crashpad_client.h]"]
  node_ios_capture["iOS capture"]
  node_ios_dump["iOS intermediate dump"]
end

subgraph group_handler["Handler processing"]
  node_handler_main["Handler startup<br/>[handler_main.cc]"]
  node_linux_exception["Linux exception handling"]
  node_mac_exception["macOS exception handling"]
  node_windows_exception["Windows exception handling"]
  node_windows_server["Windows handler server"]
end

subgraph group_reports["Reports and delivery"]
  node_database[("Crash report database")]
  node_settings[("Report settings<br/>[settings.h]")]
  node_upload["Report uploader"]
  node_pruning["Report pruning"]
end

subgraph group_formats["Snapshots and dumps"]
  node_snapshot["Process snapshots<br/>[process_snapshot.h]"]
  node_minidump["Minidump writer"]
end

subgraph group_support["Tools and utilities"]
  node_database_tool["Database utility"]
  node_file_io["File I/O<br/>[file_io.h]"]
end

node_application(("Application"))

node_application -->|"configures"| node_crash_client
node_crash_client -.->|"starts handler"| node_handler_main
node_handler_main -->|"initializes"| node_database
node_handler_main -->|"configures"| node_upload
node_handler_main -->|"configures"| node_pruning
node_linux_exception -.->|"captures"| node_snapshot
node_linux_exception -.->|"writes"| node_minidump
node_mac_exception -->|"captures"| node_snapshot
node_mac_exception -->|"writes"| node_minidump
node_windows_exception -->|"captures"| node_snapshot
node_windows_exception -->|"writes"| node_minidump
node_windows_server -.->|"delegates exceptions"| node_windows_exception
node_ios_capture -->|"writes"| node_ios_dump
node_ios_dump -.->|"converts"| node_minidump
node_database_tool -->|"reads and updates"| node_database
node_database -->|"provides"| node_settings
node_database -->|"uses"| node_file_io
node_minidump -->|"writes through"| node_file_io

click node_crash_client "https://github.com/chromium/crashpad/blob/main/client/crashpad_client.h"
click node_ios_capture "https://github.com/chromium/crashpad/blob/main/client/ios_handler/in_process_handler.cc"
click node_ios_dump "https://github.com/chromium/crashpad/blob/main/client/ios_handler/in_process_intermediate_dump_handler.cc"
click node_handler_main "https://github.com/chromium/crashpad/blob/main/handler/handler_main.cc"
click node_linux_exception "https://github.com/chromium/crashpad/blob/main/handler/linux/exception_handler_server.cc"
click node_mac_exception "https://github.com/chromium/crashpad/blob/main/handler/mac/crash_report_exception_handler.cc"
click node_windows_exception "https://github.com/chromium/crashpad/blob/main/handler/win/crash_report_exception_handler.cc"
click node_windows_server "https://github.com/chromium/crashpad/blob/main/util/win/exception_handler_server.cc"
click node_snapshot "https://github.com/chromium/crashpad/blob/main/snapshot/process_snapshot.h"
click node_minidump "https://github.com/chromium/crashpad/blob/main/minidump/minidump_file_writer.h"
click node_database "https://github.com/chromium/crashpad/blob/main/client/crash_report_database.h"
click node_settings "https://github.com/chromium/crashpad/blob/main/client/settings.h"
click node_upload "https://github.com/chromium/crashpad/blob/main/handler/crash_report_upload_thread.h"
click node_pruning "https://github.com/chromium/crashpad/blob/main/client/prune_crash_reports.cc"
click node_database_tool "https://github.com/chromium/crashpad/blob/main/tools/crashpad_database_util.cc"
click node_file_io "https://github.com/chromium/crashpad/blob/main/util/file/file_io.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_crash_client,node_ios_capture,node_ios_dump toneBlue
class node_handler_main,node_linux_exception,node_mac_exception,node_windows_exception,node_windows_server toneAmber
class node_database,node_settings,node_upload,node_pruning toneMint
class node_snapshot,node_minidump toneRose
class node_database_tool,node_file_io,node_application toneIndigo
```

## Components

### Client and capture

- [Crash client](https://github.com/chromium/crashpad/blob/main/client/crashpad_client.h): `client/crashpad_client.h`
- [iOS capture](https://github.com/chromium/crashpad/blob/main/client/ios_handler/in_process_handler.cc): `client/ios_handler/in_process_handler.cc`
- [iOS intermediate dump](https://github.com/chromium/crashpad/blob/main/client/ios_handler/in_process_intermediate_dump_handler.cc): `client/ios_handler/in_process_intermediate_dump_handler.cc`

### Handler processing

- [Handler startup](https://github.com/chromium/crashpad/blob/main/handler/handler_main.cc): `handler/handler_main.cc`
- [Linux exception handling](https://github.com/chromium/crashpad/blob/main/handler/linux/exception_handler_server.cc): `handler/linux/exception_handler_server.cc`
- [macOS exception handling](https://github.com/chromium/crashpad/blob/main/handler/mac/crash_report_exception_handler.cc): `handler/mac/crash_report_exception_handler.cc`
- [Windows exception handling](https://github.com/chromium/crashpad/blob/main/handler/win/crash_report_exception_handler.cc): `handler/win/crash_report_exception_handler.cc`
- [Windows handler server](https://github.com/chromium/crashpad/blob/main/util/win/exception_handler_server.cc): `util/win/exception_handler_server.cc`

### Reports and delivery

- [Crash report database](https://github.com/chromium/crashpad/blob/main/client/crash_report_database.h): `client/crash_report_database.h`
- [Report settings](https://github.com/chromium/crashpad/blob/main/client/settings.h): `client/settings.h`
- [Report uploader](https://github.com/chromium/crashpad/blob/main/handler/crash_report_upload_thread.h): `handler/crash_report_upload_thread.h`
- [Report pruning](https://github.com/chromium/crashpad/blob/main/client/prune_crash_reports.cc): `client/prune_crash_reports.cc`

### Snapshots and dumps

- [Process snapshots](https://github.com/chromium/crashpad/blob/main/snapshot/process_snapshot.h): `snapshot/process_snapshot.h`
- [Minidump writer](https://github.com/chromium/crashpad/blob/main/minidump/minidump_file_writer.h): `minidump/minidump_file_writer.h`

### Tools and utilities

- [Database utility](https://github.com/chromium/crashpad/blob/main/tools/crashpad_database_util.cc): `tools/crashpad_database_util.cc`
- [File I/O](https://github.com/chromium/crashpad/blob/main/util/file/file_io.h): `util/file/file_io.h`

### Other components

- **Application**

## Connections

- Application → Crash client: configures (evidence: `client/crashpad_client.h`)
- Crash client → Handler startup: starts handler (evidence: `handler/handler_main.cc`)
- Handler startup → Crash report database: initializes (evidence: `handler/handler_main.cc`)
- Handler startup → Report uploader: configures (evidence: `handler/handler_main.cc`)
- Handler startup → Report pruning: configures (evidence: `handler/handler_main.cc`)
- Linux exception handling → Process snapshots: captures
- Linux exception handling → Minidump writer: writes
- macOS exception handling → Process snapshots: captures (evidence: `handler/mac/crash_report_exception_handler.cc`)
- macOS exception handling → Minidump writer: writes (evidence: `handler/mac/crash_report_exception_handler.cc`)
- Windows exception handling → Process snapshots: captures (evidence: `handler/win/crash_report_exception_handler.cc`)
- Windows exception handling → Minidump writer: writes (evidence: `handler/win/crash_report_exception_handler.cc`)
- Windows handler server → Windows exception handling: delegates exceptions
- iOS capture → iOS intermediate dump: writes (evidence: `client/ios_handler/in_process_handler.cc`)
- iOS intermediate dump → Minidump writer: converts
- Database utility → Crash report database: reads and updates (evidence: `tools/crashpad_database_util.cc`)
- Crash report database → Report settings: provides (evidence: `client/crash_report_database.h`)
- Crash report database → File I/O: uses (evidence: `client/crash_report_database.h`)
- Minidump writer → File I/O: writes through (evidence: `minidump/minidump_file_writer.h`)
