Expand description

Minidump structure definitions.

Types defined here should match those defined in Microsoft’s headers. Additionally some Breakpad and Crashpad extension types are defined here and should match the definitions from those projects.

Type Layouts

This library isn’t a “proper” minidump-sys library because it doesn’t use repr attributes to force Rust to layout these structs identically to how they’re laid out in memory.

The reasons for this are 3-fold:

  1. It isn’t necessary because we specify how to serialize/deserialize things with scroll via derive(Pread, Pwrite) which uses the declared field order and not the in-memory layout, and assumes everything is packed anyway, which as a rule, minidump types are. Specifically they’re packed to align 4, but Microsoft is mercifully very attentive to its type layouts so we’re not aware of anywhere where packing to align 1 would change offsets. Packing is mostly just there so 32-bit and 64-bit definitely agree on offsets.

  2. We would have to mark several types as repr(packed(4)), making them dangerous to use as several of the fields would become misaligned. This would create a bunch of unnecessary and brittle unsafe.

  3. It’s not actually that useful to have structs with precise in-memory layouts since a minidump parser needs to accept both little-endian and big-endian minidumps, and is therefore swizzling the bytes of all the values anyway. Also it’s dangerous to reinterpret a pile of memory as arbitrary types without validation!

Structs

Arm-specific CPU information (Breakpad extension)

An x86-64 (amd64) CPU context

An ARM CPU context

A (microsoft-style) aarch64 (arm64) CPU context

An old (breakpad-style) aarch64 (arm64) CPU context.

A MIPS CPU context

A PPC CPU context

A PPC64 CPU context

A SPARC CPU context

An x86 CPU context

CPU information contained within the MINIDUMP_SYSTEM_INFO struct

An ELF Build ID.

CodeView debug information in the older PDB 2.0 (“NB10”) format.

CodeView debug information in the current PDB 7.0 (“RSDS”) format.

Flags available for use in [CONTEXT_AMD64.context_flags]

Flags available for use in [CONTEXT_ARM.context_flags]

Flags available for use in [CONTEXT_ARM64.context_flags]

Flags available for use in [CONTEXT_ARM64_OLD.context_flags]

CPU type values in the context_flags member of CONTEXT_ structs

Flags available for use in [CONTEXT_X86.context_flags]

DSO debug data for 32-bit Linux minidumps

DSO debug data for 64-bit Linux minidumps

ARM floating point state

MIPS floating point state

PPC floating point state

SPARC floating point state

x86 floating point state

A GUID as specified in Rpcdce.h

Obsolete debug record type defined in WinNT.h.

Dynamic linker information for a shared library on 32-bit Linux

Dynamic linker information for a shared library on 64-bit Linux

A typed annotation object.

A Breakpad extension containing information about an assertion that terminated the process

A Breakpad extension containing some additional process information

Additional Crashpad-specific information carried within a minidump file.

Information about a data stream contained in a minidump file.

Detailed information about an exception.

Information about the exception that caused the process to terminate.

The header at the start of a minidump file.

A location within a minidump file comprised of an offset and a size.

MacOS __DATA,__crash_info data.

Contents of MacOS’s <CrashReporterClient.h>’s crashreporter_annotations_t, but with the by-reference C-strings hoisted out to the end of the struct and inlined (so this is a variable-length struct).

Contents of MacOS’s <CrashReporterClient.h>’s crashreporter_annotations_t, but with the by-reference C-strings hoisted out to the end of the struct and inlined (so this is a variable-length struct).

Contents of MacOS’s <CrashReporterClient.h>’s crashreporter_annotations_t, but with the by-reference C-strings hoisted out to the end of the struct and inlined (so this is a variable-length struct).

A range of memory contained within a minidump consisting of a base address and a location descriptor.

A large range of memory contained within a minidump (usually a full dump) consisting of a base address and a size.

Information about a memory region in a minidump

A list of memory regions in a minidump

Miscellaneous process information

Miscellaneous process and system information

Miscellaneous process and system information

Miscellaneous process and system information

Miscellaneous process and system information

Information about a single module (executable or shared library) from a minidump

Additional Crashpad-specific information about a module carried within a minidump file.

A link between a MINIDUMP_MODULE structure and additional Crashpad-specific information about a module carried within a minidump file.

Additional Crashpad-specific information about modules carried within a minidump file.

A list of RVA pointers.

A list of key-value pairs.

Processor and operating system information

Information about a single thread from a minidump

The name of a thread, found in the ThreadNamesStream.

Information about a single unloaded module (executable or shared library) from a minidump.

A variable-length UTF-8-encoded string carried within a minidump file.

Potential values for MINIDUMP_MEMORY_INFO::protection and allocation_protection

Known flags for MINIDUMP_MISC_INFO*.flags1

CPU information for non-x86 CPUs

A date and time

Settings for a time zone

PPC vector state

Version information for a file

x86-specific CPU information derived from the cpuid instruction

A descriptor of the XSAVE context, which extends a normal x86/x64 context.

The offset and size of each XSAVE entry inside the XSAVE context.

An iterator of all the enabled features in an XSTATE_CONFIG_FEATURE_MSC_INFO.

Enums

Offsets into CONTEXT_ARM64::iregs for registers with a dedicated or conventional purpose

Offsets into CONTEXT_ARM::iregs for registers with a dedicated or conventional purpose

Known values of MINIDUMP_ASSERTION_INFO::_type Taken from the definition in Breakpad’s minidump_format.h.

Known values for the signature field of CodeView records

The types of known minidump data streams.

Offsets into CONTEXT_MIPS::iregs for registers with a dedicated or conventional purpose

Offsets into CONTEXT_PPC64::gpr for registers with a dedicated or conventional purpose

Offsets into CONTEXT_PPC::gpr for registers with a dedicated or conventional purpose

Offsets into CONTEXT_SPARC::g_r for registers with a dedicated or conventional purpose

Several known entries in XSTATE_CONFIG_FEATURE_MSC_INFO.features.

Constants

Valid bits in a context_flags for ContextFlagsCpu

x86 and x64 contexts have this bit set in their context_flags when they have extra XSTATE beyond the traditional context definition.

The maximum supported count of MINIDUMP_MAC_CRASH_INFO_RECORDs.

The maximum supported size of a C-string in MINIDUMP_MAC_CRASH_INFO_RECORD.

The 4-byte magic number at the start of a minidump file.

The version of the minidump format.

The expected value of VS_FIXEDFILEINFO.signature

The expected value of VS_FIXEDFILEINFO.struct_version

Type Definitions

An offset from the start of the minidump file.