getsentry/sentry-native

Allow configuring Windows minidump type via sentry_options_t API in C++ SDK

已關閉

#1,335 建立於 2025年8月8日

 (6 則留言) (0 個反應) (0 位負責人)C (212 個分叉)auto 404
ErrorsHelp WantedImprovementNativebackend: breakpadbackend: crashpad

倉庫指標

星標
 (557 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Problem Statement

The Sentry C++ SDK (sentry-native) currently generates minimal crash dumps on Windows using Crashpad. While this works for basic crash diagnostics, it lacks deeper memory-related information, such as heap state, handles, or full memory regions. In debugging complex issues (e.g., heap corruption, access violations, resource leaks), this limitation makes crash analysis significantly harder.

Although Crashpad internally supports various minidump levels via MINIDUMP_TYPE (e.g., MiniDumpWithFullMemory, MiniDumpWithHandleData), the current Sentry C++ API does not provide any mechanism to configure or override this behavior. As a result, users are forced to fork or wrap Crashpad themselves to generate richer dumps, which is error-prone and difficult to maintain.

Solution Brainstorm

Expose a new API in sentry_options_t to configure the desired Windows minidump level (e.g., via flags or an enum representing MINIDUMP_TYPE values). This option could be transparently passed to Crashpad at initialization time via command-line arguments or inter-process communication, similar to how other options are forwarded to the crashpad_handler.

Example proposal (pseudo-API):

void sentry_options_set_windows_minidump_type(sentry_options_t* opts, unsigned int minidump_type); Where minidump_type is a bitmask compatible with Windows' MINIDUMP_TYPE enum.

This would allow users to enable richer dump types like:

MiniDumpWithFullMemory

MiniDumpWithHandleData

MiniDumpWithThreadInfo

...

without needing to fork or modify Crashpad directly.

Product Area

Settings

貢獻者指南