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:
-
It isn’t necessary because we specify how to serialize/deserialize things with
scroll
viaderive(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. -
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 brittleunsafe
. -
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§
- ARMCpu
Info - Arm-specific CPU information (Breakpad extension)
- ArmElf
HwCaps - Possible values of
ARMCpuInfo::elf_hwcaps
- Breakpad
Info Valid - Potential values for
MINIDUMP_BREAKPAD_INFO::validity
- CONTEXT_
AMD64 - An x86-64 (amd64) CPU context
- CONTEXT_
ARM - An ARM CPU context
- CONTEXT_
ARM64 - A (microsoft-style) aarch64 (arm64) CPU context
- CONTEXT_
ARM64_ OLD - An old (breakpad-style) aarch64 (arm64) CPU context.
- CONTEXT_
MIPS - A MIPS CPU context
- CONTEXT_
PPC - A PPC CPU context
- CONTEXT_
PPC64 - A PPC64 CPU context
- CONTEXT_
SPARC - A SPARC CPU context
- CONTEXT_
X86 - An x86 CPU context
- CPU_
INFORMATION - CPU information contained within the
MINIDUMP_SYSTEM_INFO
struct - CV_
INFO_ ELF - An ELF Build ID.
- CV_
INFO_ PDB20 - CodeView debug information in the older PDB 2.0 (“NB10”) format.
- CV_
INFO_ PDB70 - CodeView debug information in the current PDB 7.0 (“RSDS”) format.
- Context
Flags Amd64 - Flags available for use in [
CONTEXT_AMD64.context_flags
] - Context
Flags Arm - Flags available for use in [
CONTEXT_ARM.context_flags
] - Context
Flags Arm64 - Flags available for use in [
CONTEXT_ARM64.context_flags
] - Context
Flags Arm64 Old - Flags available for use in [
CONTEXT_ARM64_OLD.context_flags
] - Context
Flags Cpu - CPU type values in the
context_flags
member ofCONTEXT_
structs - Context
Flags X86 - Flags available for use in [
CONTEXT_X86.context_flags
] - DSO_
DEBUG_ 32 - DSO debug data for 32-bit Linux minidumps
- DSO_
DEBUG_ 64 - DSO debug data for 64-bit Linux minidumps
- FLOATING_
SAVE_ AREA_ ARM - ARM floating point state
- FLOATING_
SAVE_ AREA_ MIPS - MIPS floating point state
- FLOATING_
SAVE_ AREA_ PPC - PPC floating point state
- FLOATING_
SAVE_ AREA_ SPARC - SPARC floating point state
- FLOATING_
SAVE_ AREA_ X86 - x86 floating point state
- GUID
- A GUID as specified in Rpcdce.h
- IMAGE_
DEBUG_ MISC - Obsolete debug record type defined in WinNT.h.
- LINK_
MAP_ 32 - Dynamic linker information for a shared library on 32-bit Linux
- LINK_
MAP_ 64 - Dynamic linker information for a shared library on 64-bit Linux
- MINIDUMP_
ANNOTATION - A typed annotation object.
- MINIDUMP_
ASSERTION_ INFO - A Breakpad extension containing information about an assertion that terminated the process
- MINIDUMP_
BREAKPAD_ INFO - A Breakpad extension containing some additional process information
- MINIDUMP_
CRASHPAD_ INFO - Additional Crashpad-specific information carried within a minidump file.
- MINIDUMP_
DIRECTORY - Information about a data stream contained in a minidump file.
- MINIDUMP_
EXCEPTION - Detailed information about an exception.
- MINIDUMP_
EXCEPTION_ STREAM - Information about the exception that caused the process to terminate.
- MINIDUMP_
HANDLE_ DATA_ STREAM - MINIDUMP_
HANDLE_ DESCRIPTOR - MINIDUMP_
HANDLE_ DESCRIPTOR_ 2 - MINIDUMP_
HANDLE_ OBJECT_ INFORMATION - OS-specific handle object information. Microsoft headers state that it can
change based on the target platform. The object is larger than this structure
(as specified by
size_of_info
) and the remaining data is stored after thesize_of_info
field. The format of this information is not specified. - MINIDUMP_
HEADER - The header at the start of a minidump file.
- MINIDUMP_
LOCATION_ DESCRIPTOR - A location within a minidump file comprised of an offset and a size.
- MINIDUMP_
MAC_ BOOTARGS - MacOS kernel boot args
- MINIDUMP_
MAC_ CRASH_ INFO - MacOS __DATA,__crash_info data.
- MINIDUMP_
MAC_ CRASH_ INFO_ RECORD - Contents of MacOS’s
<CrashReporterClient.h>
’scrashreporter_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). - MINIDUMP_
MAC_ CRASH_ INFO_ RECORD_ 4 - Contents of MacOS’s
<CrashReporterClient.h>
’scrashreporter_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). - MINIDUMP_
MAC_ CRASH_ INFO_ RECORD_ 5 - Contents of MacOS’s
<CrashReporterClient.h>
’scrashreporter_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). - MINIDUMP_
MAC_ CRASH_ INFO_ RECORD_ STRINGS - Variable-length data for
MINIDUMP_MAC_CRASH_INFO_RECORD
. - MINIDUMP_
MAC_ CRASH_ INFO_ RECORD_ STRINGS_ 4 - Variable-length data for
MINIDUMP_MAC_CRASH_INFO_RECORD_4
. - MINIDUMP_
MAC_ CRASH_ INFO_ RECORD_ STRINGS_ 5 - Variable-length data for
MINIDUMP_MAC_CRASH_INFO_RECORD_5
. - MINIDUMP_
MEMORY_ DESCRIPTOR - A range of memory contained within a minidump consisting of a base address and a location descriptor.
- MINIDUMP_
MEMORY_ DESCRIPTO R64 - A large range of memory contained within a minidump (usually a full dump) consisting of a base address and a size.
- MINIDUMP_
MEMORY_ INFO - Information about a memory region in a minidump
- MINIDUMP_
MEMORY_ INFO_ LIST - A list of memory regions in a minidump
- MINIDUMP_
MISC_ INFO - Miscellaneous process information
- MINIDUMP_
MISC_ INFO_ 2 - Miscellaneous process and system information
- MINIDUMP_
MISC_ INFO_ 3 - Miscellaneous process and system information
- MINIDUMP_
MISC_ INFO_ 4 - Miscellaneous process and system information
- MINIDUMP_
MISC_ INFO_ 5 - Miscellaneous process and system information
- MINIDUMP_
MODULE - Information about a single module (executable or shared library) from a minidump
- MINIDUMP_
MODULE_ CRASHPAD_ INFO - Additional Crashpad-specific information about a module carried within a minidump file.
- MINIDUMP_
MODULE_ CRASHPAD_ INFO_ LINK - A link between a
MINIDUMP_MODULE
structure and additional Crashpad-specific information about a module carried within a minidump file. - MINIDUMP_
MODULE_ CRASHPAD_ INFO_ LIST - Additional Crashpad-specific information about modules carried within a minidump file.
- MINIDUMP_
RVA_ LIST - A list of RVA pointers.
- MINIDUMP_
SIMPLE_ STRING_ DICTIONARY - A list of key-value pairs.
- MINIDUMP_
SIMPLE_ STRING_ DICTIONARY_ ENTRY - A key-value pair.
- MINIDUMP_
SYSTEM_ INFO - Processor and operating system information
- MINIDUMP_
THREAD - Information about a single thread from a minidump
- MINIDUMP_
THREAD_ INFO - MINIDUMP_
THREAD_ NAME - The name of a thread, found in the ThreadNamesStream.
- MINIDUMP_
UNLOADED_ MODULE - Information about a single unloaded module (executable or shared library) from a minidump.
- MINIDUMP_
UTF8_ STRING - A variable-length UTF-8-encoded string carried within a minidump file.
- Memory
Protection - Potential values for
MINIDUMP_MEMORY_INFO::protection
andallocation_protection
- Memory
State - Potential values for
MINIDUMP_MEMORY_INFO::state
- Memory
Type - Potential values for
MINIDUMP_MEMORY_INFO::_type
- Misc
Info Flags - Known flags for
MINIDUMP_MISC_INFO*.flags1
- Other
CpuInfo - CPU information for non-x86 CPUs
- SSE_
REGISTERS - Possible contents of
CONTEXT_AMD64::float_save
. - SYSTEMTIME
- A date and time
- TIME_
ZONE_ INFORMATION - Settings for a time zone
- VECTOR_
SAVE_ AREA_ PPC - PPC vector state
- VS_
FIXEDFILEINFO - Version information for a file
- X86Cpu
Info - x86-specific CPU information derived from the
cpuid
instruction - XMM_
SAVE_ AREA32 - Possible contents of
CONTEXT_AMD64::float_save
. - XSTATE_
CONFIG_ FEATURE_ MSC_ INFO - A descriptor of the XSAVE context, which extends a normal x86/x64 context.
- XSTATE_
FEATURE - The offset and size of each XSAVE entry inside the XSAVE context.
- Xstate
Feature Iter - An iterator of all the enabled features in an XSTATE_CONFIG_FEATURE_MSC_INFO.
Enums§
- Arm64
Register Numbers - Offsets into
CONTEXT_ARM64::iregs
for registers with a dedicated or conventional purpose - ArmRegister
Numbers - Offsets into
CONTEXT_ARM::iregs
for registers with a dedicated or conventional purpose - Assertion
Type - Known values of
MINIDUMP_ASSERTION_INFO::_type
Taken from the definition in Breakpad’s minidump_format.h. - CvSignature
- Known values for the
signature
field of CodeView records - MINIDUMP_
HANDLE_ OBJECT_ INFORMATION_ TYPE - MINIDUMP_
STREAM_ TYPE - The types of known minidump data streams.
- Mips
Register Numbers - Offsets into
CONTEXT_MIPS::iregs
for registers with a dedicated or conventional purpose - Platform
Id - Known values of
MINIDUMP_SYSTEM_INFO::platform_id
- Ppc64
Register Numbers - Offsets into
CONTEXT_PPC64::gpr
for registers with a dedicated or conventional purpose - PpcRegister
Numbers - Offsets into
CONTEXT_PPC::gpr
for registers with a dedicated or conventional purpose - Processor
Architecture - Known values of
MINIDUMP_SYSTEM_INFO::processor_architecture
- Sparc
Register Numbers - Offsets into
CONTEXT_SPARC::g_r
for registers with a dedicated or conventional purpose - Xstate
Feature Index - Several known entries in
XSTATE_CONFIG_FEATURE_MSC_INFO.features
.
Constants§
- CONTEXT_
CPU_ MASK - Valid bits in a
context_flags
forContextFlagsCpu
- CONTEXT_
HAS_ XSTATE - x86 and x64 contexts have this bit set in their
context_flags
when they have extra XSTATE beyond the traditional context definition. - MAC_
CRASH_ INFOS_ MAX - The maximum supported count of
MINIDUMP_MAC_CRASH_INFO_RECORD
s. - MAC_
CRASH_ INFO_ STRING_ MAX_ SIZE - The maximum supported size of a C-string in
MINIDUMP_MAC_CRASH_INFO_RECORD
. - MINIDUMP_
SIGNATURE - The 4-byte magic number at the start of a minidump file.
- MINIDUMP_
VERSION - The version of the minidump format.
- VS_
FFI_ SIGNATURE - The expected value of
VS_FIXEDFILEINFO.signature
- VS_
FFI_ STRUCVERSION - The expected value of
VS_FIXEDFILEINFO.struct_version