Windows MiniDump: GraphViz block diagram (.dot) source

Windows MiniDump (MDMP) file provides a concise way to store process core dumps, which is useful for debugging. Given its small size, modularity, some cross-platform features and native support in some debuggers, it is particularly useful for crash reporting, and is used for that purpose in Windows and Google Chrome projects.

The file itself is a container, which contains a number of typed "streams", which contain some data according to its type attribute.

File extension

["dmp", "mdmp"]

KS implementation details

License: CC0-1.0

This page hosts a formal specification of Windows MiniDump using Kaitai Struct. This specification can be automatically translated into a variety of programming languages to get a parsing library.

GraphViz block diagram source

windows_minidump.dot

digraph {
	rankdir=LR;
	node [shape=plaintext];
	subgraph cluster__windows_minidump {
		label="WindowsMinidump";
		graph[style=dotted];

		windows_minidump__seq [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
			<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
			<TR><TD PORT="magic1_pos">0</TD><TD PORT="magic1_size">4</TD><TD></TD><TD PORT="magic1_type">magic1</TD></TR>
			<TR><TD PORT="magic2_pos">4</TD><TD PORT="magic2_size">2</TD><TD></TD><TD PORT="magic2_type">magic2</TD></TR>
			<TR><TD PORT="version_pos">6</TD><TD PORT="version_size">2</TD><TD>u2le</TD><TD PORT="version_type">version</TD></TR>
			<TR><TD PORT="num_streams_pos">8</TD><TD PORT="num_streams_size">4</TD><TD>u4le</TD><TD PORT="num_streams_type">num_streams</TD></TR>
			<TR><TD PORT="ofs_streams_pos">12</TD><TD PORT="ofs_streams_size">4</TD><TD>u4le</TD><TD PORT="ofs_streams_type">ofs_streams</TD></TR>
			<TR><TD PORT="checksum_pos">16</TD><TD PORT="checksum_size">4</TD><TD>u4le</TD><TD PORT="checksum_type">checksum</TD></TR>
			<TR><TD PORT="timestamp_pos">20</TD><TD PORT="timestamp_size">4</TD><TD>u4le</TD><TD PORT="timestamp_type">timestamp</TD></TR>
			<TR><TD PORT="flags_pos">24</TD><TD PORT="flags_size">8</TD><TD>u8le</TD><TD PORT="flags_type">flags</TD></TR>
		</TABLE>>];
		windows_minidump__inst__streams [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
			<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
			<TR><TD PORT="streams_pos">ofs_streams</TD><TD PORT="streams_size">12</TD><TD>Dir</TD><TD PORT="streams_type">streams</TD></TR>
			<TR><TD COLSPAN="4" PORT="streams__repeat">repeat num_streams times</TD></TR>
		</TABLE>>];
		subgraph cluster__thread_list {
			label="WindowsMinidump::ThreadList";
			graph[style=dotted];

			thread_list__seq [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
				<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
				<TR><TD PORT="num_threads_pos">0</TD><TD PORT="num_threads_size">4</TD><TD>u4le</TD><TD PORT="num_threads_type">num_threads</TD></TR>
				<TR><TD PORT="threads_pos">4</TD><TD PORT="threads_size">48</TD><TD>Thread</TD><TD PORT="threads_type">threads</TD></TR>
				<TR><TD COLSPAN="4" PORT="threads__repeat">repeat num_threads times</TD></TR>
			</TABLE>>];
		}
		subgraph cluster__location_descriptor {
			label="WindowsMinidump::LocationDescriptor";
			graph[style=dotted];

			location_descriptor__seq [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
				<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
				<TR><TD PORT="len_data_pos">0</TD><TD PORT="len_data_size">4</TD><TD>u4le</TD><TD PORT="len_data_type">len_data</TD></TR>
				<TR><TD PORT="ofs_data_pos">4</TD><TD PORT="ofs_data_size">4</TD><TD>u4le</TD><TD PORT="ofs_data_type">ofs_data</TD></TR>
			</TABLE>>];
			location_descriptor__inst__data [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
				<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
				<TR><TD PORT="data_pos">ofs_data</TD><TD PORT="data_size">len_data</TD><TD></TD><TD PORT="data_type">data</TD></TR>
			</TABLE>>];
		}
		subgraph cluster__minidump_string {
			label="WindowsMinidump::MinidumpString";
			graph[style=dotted];

			minidump_string__seq [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
				<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
				<TR><TD PORT="len_str_pos">0</TD><TD PORT="len_str_size">4</TD><TD>u4le</TD><TD PORT="len_str_type">len_str</TD></TR>
				<TR><TD PORT="str_pos">4</TD><TD PORT="str_size">len_str</TD><TD>str(UTF-16LE)</TD><TD PORT="str_type">str</TD></TR>
			</TABLE>>];
		}
		subgraph cluster__system_info {
			label="WindowsMinidump::SystemInfo";
			graph[style=dotted];

			system_info__seq [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
				<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
				<TR><TD PORT="cpu_arch_pos">0</TD><TD PORT="cpu_arch_size">2</TD><TD>u2le→CpuArchs</TD><TD PORT="cpu_arch_type">cpu_arch</TD></TR>
				<TR><TD PORT="cpu_level_pos">2</TD><TD PORT="cpu_level_size">2</TD><TD>u2le</TD><TD PORT="cpu_level_type">cpu_level</TD></TR>
				<TR><TD PORT="cpu_revision_pos">4</TD><TD PORT="cpu_revision_size">2</TD><TD>u2le</TD><TD PORT="cpu_revision_type">cpu_revision</TD></TR>
				<TR><TD PORT="num_cpus_pos">6</TD><TD PORT="num_cpus_size">1</TD><TD>u1</TD><TD PORT="num_cpus_type">num_cpus</TD></TR>
				<TR><TD PORT="os_type_pos">7</TD><TD PORT="os_type_size">1</TD><TD>u1</TD><TD PORT="os_type_type">os_type</TD></TR>
				<TR><TD PORT="os_ver_major_pos">8</TD><TD PORT="os_ver_major_size">4</TD><TD>u4le</TD><TD PORT="os_ver_major_type">os_ver_major</TD></TR>
				<TR><TD PORT="os_ver_minor_pos">12</TD><TD PORT="os_ver_minor_size">4</TD><TD>u4le</TD><TD PORT="os_ver_minor_type">os_ver_minor</TD></TR>
				<TR><TD PORT="os_build_pos">16</TD><TD PORT="os_build_size">4</TD><TD>u4le</TD><TD PORT="os_build_type">os_build</TD></TR>
				<TR><TD PORT="os_platform_pos">20</TD><TD PORT="os_platform_size">4</TD><TD>u4le</TD><TD PORT="os_platform_type">os_platform</TD></TR>
				<TR><TD PORT="ofs_service_pack_pos">24</TD><TD PORT="ofs_service_pack_size">4</TD><TD>u4le</TD><TD PORT="ofs_service_pack_type">ofs_service_pack</TD></TR>
				<TR><TD PORT="os_suite_mask_pos">28</TD><TD PORT="os_suite_mask_size">2</TD><TD>u2le</TD><TD PORT="os_suite_mask_type">os_suite_mask</TD></TR>
				<TR><TD PORT="reserved2_pos">30</TD><TD PORT="reserved2_size">2</TD><TD>u2le</TD><TD PORT="reserved2_type">reserved2</TD></TR>
			</TABLE>>];
			system_info__inst__service_pack [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
				<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
				<TR><TD PORT="service_pack_pos">ofs_service_pack</TD><TD PORT="service_pack_size">...</TD><TD>MinidumpString</TD><TD PORT="service_pack_type">service_pack</TD></TR>
			</TABLE>>];
		}
		subgraph cluster__exception_record {
			label="WindowsMinidump::ExceptionRecord";
			graph[style=dotted];

			exception_record__seq [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
				<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
				<TR><TD PORT="code_pos">0</TD><TD PORT="code_size">4</TD><TD>u4le</TD><TD PORT="code_type">code</TD></TR>
				<TR><TD PORT="flags_pos">4</TD><TD PORT="flags_size">4</TD><TD>u4le</TD><TD PORT="flags_type">flags</TD></TR>
				<TR><TD PORT="inner_exception_pos">8</TD><TD PORT="inner_exception_size">8</TD><TD>u8le</TD><TD PORT="inner_exception_type">inner_exception</TD></TR>
				<TR><TD PORT="addr_pos">16</TD><TD PORT="addr_size">8</TD><TD>u8le</TD><TD PORT="addr_type">addr</TD></TR>
				<TR><TD PORT="num_params_pos">24</TD><TD PORT="num_params_size">4</TD><TD>u4le</TD><TD PORT="num_params_type">num_params</TD></TR>
				<TR><TD PORT="reserved_pos">28</TD><TD PORT="reserved_size">4</TD><TD>u4le</TD><TD PORT="reserved_type">reserved</TD></TR>
				<TR><TD PORT="params_pos">32</TD><TD PORT="params_size">8</TD><TD>u8le</TD><TD PORT="params_type">params</TD></TR>
				<TR><TD COLSPAN="4" PORT="params__repeat">repeat 15 times</TD></TR>
			</TABLE>>];
		}
		subgraph cluster__misc_info {
			label="WindowsMinidump::MiscInfo";
			graph[style=dotted];

			misc_info__seq [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
				<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
				<TR><TD PORT="len_info_pos">0</TD><TD PORT="len_info_size">4</TD><TD>u4le</TD><TD PORT="len_info_type">len_info</TD></TR>
				<TR><TD PORT="flags1_pos">4</TD><TD PORT="flags1_size">4</TD><TD>u4le</TD><TD PORT="flags1_type">flags1</TD></TR>
				<TR><TD PORT="process_id_pos">8</TD><TD PORT="process_id_size">4</TD><TD>u4le</TD><TD PORT="process_id_type">process_id</TD></TR>
				<TR><TD PORT="process_create_time_pos">12</TD><TD PORT="process_create_time_size">4</TD><TD>u4le</TD><TD PORT="process_create_time_type">process_create_time</TD></TR>
				<TR><TD PORT="process_user_time_pos">16</TD><TD PORT="process_user_time_size">4</TD><TD>u4le</TD><TD PORT="process_user_time_type">process_user_time</TD></TR>
				<TR><TD PORT="process_kernel_time_pos">20</TD><TD PORT="process_kernel_time_size">4</TD><TD>u4le</TD><TD PORT="process_kernel_time_type">process_kernel_time</TD></TR>
				<TR><TD PORT="cpu_max_mhz_pos">24</TD><TD PORT="cpu_max_mhz_size">4</TD><TD>u4le</TD><TD PORT="cpu_max_mhz_type">cpu_max_mhz</TD></TR>
				<TR><TD PORT="cpu_cur_mhz_pos">28</TD><TD PORT="cpu_cur_mhz_size">4</TD><TD>u4le</TD><TD PORT="cpu_cur_mhz_type">cpu_cur_mhz</TD></TR>
				<TR><TD PORT="cpu_limit_mhz_pos">32</TD><TD PORT="cpu_limit_mhz_size">4</TD><TD>u4le</TD><TD PORT="cpu_limit_mhz_type">cpu_limit_mhz</TD></TR>
				<TR><TD PORT="cpu_max_idle_state_pos">36</TD><TD PORT="cpu_max_idle_state_size">4</TD><TD>u4le</TD><TD PORT="cpu_max_idle_state_type">cpu_max_idle_state</TD></TR>
				<TR><TD PORT="cpu_cur_idle_state_pos">40</TD><TD PORT="cpu_cur_idle_state_size">4</TD><TD>u4le</TD><TD PORT="cpu_cur_idle_state_type">cpu_cur_idle_state</TD></TR>
			</TABLE>>];
		}
		subgraph cluster__dir {
			label="WindowsMinidump::Dir";
			graph[style=dotted];

			dir__seq [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
				<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
				<TR><TD PORT="stream_type_pos">0</TD><TD PORT="stream_type_size">4</TD><TD>u4le→StreamTypes</TD><TD PORT="stream_type_type">stream_type</TD></TR>
				<TR><TD PORT="len_data_pos">4</TD><TD PORT="len_data_size">4</TD><TD>u4le</TD><TD PORT="len_data_type">len_data</TD></TR>
				<TR><TD PORT="ofs_data_pos">8</TD><TD PORT="ofs_data_size">4</TD><TD>u4le</TD><TD PORT="ofs_data_type">ofs_data</TD></TR>
			</TABLE>>];
			dir__inst__data [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
				<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
				<TR><TD PORT="data_pos">ofs_data</TD><TD PORT="data_size">...</TD><TD>switch (stream_type)</TD><TD PORT="data_type">data</TD></TR>
			</TABLE>>];
dir__inst__data_data_switch [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
	<TR><TD BGCOLOR="#F0F2E4">case</TD><TD BGCOLOR="#F0F2E4">type</TD></TR>
	<TR><TD>:stream_types_memory_list</TD><TD PORT="case0">MemoryList</TD></TR>
	<TR><TD>:stream_types_misc_info</TD><TD PORT="case1">MiscInfo</TD></TR>
	<TR><TD>:stream_types_thread_list</TD><TD PORT="case2">ThreadList</TD></TR>
	<TR><TD>:stream_types_exception</TD><TD PORT="case3">ExceptionStream</TD></TR>
	<TR><TD>:stream_types_system_info</TD><TD PORT="case4">SystemInfo</TD></TR>
</TABLE>>];
		}
		subgraph cluster__thread {
			label="WindowsMinidump::Thread";
			graph[style=dotted];

			thread__seq [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
				<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
				<TR><TD PORT="thread_id_pos">0</TD><TD PORT="thread_id_size">4</TD><TD>u4le</TD><TD PORT="thread_id_type">thread_id</TD></TR>
				<TR><TD PORT="suspend_count_pos">4</TD><TD PORT="suspend_count_size">4</TD><TD>u4le</TD><TD PORT="suspend_count_type">suspend_count</TD></TR>
				<TR><TD PORT="priority_class_pos">8</TD><TD PORT="priority_class_size">4</TD><TD>u4le</TD><TD PORT="priority_class_type">priority_class</TD></TR>
				<TR><TD PORT="priority_pos">12</TD><TD PORT="priority_size">4</TD><TD>u4le</TD><TD PORT="priority_type">priority</TD></TR>
				<TR><TD PORT="teb_pos">16</TD><TD PORT="teb_size">8</TD><TD>u8le</TD><TD PORT="teb_type">teb</TD></TR>
				<TR><TD PORT="stack_pos">24</TD><TD PORT="stack_size">16</TD><TD>MemoryDescriptor</TD><TD PORT="stack_type">stack</TD></TR>
				<TR><TD PORT="thread_context_pos">40</TD><TD PORT="thread_context_size">8</TD><TD>LocationDescriptor</TD><TD PORT="thread_context_type">thread_context</TD></TR>
			</TABLE>>];
		}
		subgraph cluster__memory_list {
			label="WindowsMinidump::MemoryList";
			graph[style=dotted];

			memory_list__seq [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
				<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
				<TR><TD PORT="num_mem_ranges_pos">0</TD><TD PORT="num_mem_ranges_size">4</TD><TD>u4le</TD><TD PORT="num_mem_ranges_type">num_mem_ranges</TD></TR>
				<TR><TD PORT="mem_ranges_pos">4</TD><TD PORT="mem_ranges_size">16</TD><TD>MemoryDescriptor</TD><TD PORT="mem_ranges_type">mem_ranges</TD></TR>
				<TR><TD COLSPAN="4" PORT="mem_ranges__repeat">repeat num_mem_ranges times</TD></TR>
			</TABLE>>];
		}
		subgraph cluster__memory_descriptor {
			label="WindowsMinidump::MemoryDescriptor";
			graph[style=dotted];

			memory_descriptor__seq [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
				<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
				<TR><TD PORT="addr_memory_range_pos">0</TD><TD PORT="addr_memory_range_size">8</TD><TD>u8le</TD><TD PORT="addr_memory_range_type">addr_memory_range</TD></TR>
				<TR><TD PORT="memory_pos">8</TD><TD PORT="memory_size">8</TD><TD>LocationDescriptor</TD><TD PORT="memory_type">memory</TD></TR>
			</TABLE>>];
		}
		subgraph cluster__exception_stream {
			label="WindowsMinidump::ExceptionStream";
			graph[style=dotted];

			exception_stream__seq [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
				<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
				<TR><TD PORT="thread_id_pos">0</TD><TD PORT="thread_id_size">4</TD><TD>u4le</TD><TD PORT="thread_id_type">thread_id</TD></TR>
				<TR><TD PORT="reserved_pos">4</TD><TD PORT="reserved_size">4</TD><TD>u4le</TD><TD PORT="reserved_type">reserved</TD></TR>
				<TR><TD PORT="exception_rec_pos">8</TD><TD PORT="exception_rec_size">152</TD><TD>ExceptionRecord</TD><TD PORT="exception_rec_type">exception_rec</TD></TR>
				<TR><TD PORT="thread_context_pos">160</TD><TD PORT="thread_context_size">8</TD><TD>LocationDescriptor</TD><TD PORT="thread_context_type">thread_context</TD></TR>
			</TABLE>>];
		}
	}
	windows_minidump__seq:ofs_streams_type -> windows_minidump__inst__streams:streams_pos [color="#404040"];
	windows_minidump__inst__streams:streams_type -> dir__seq [style=bold];
	windows_minidump__seq:num_streams_type -> windows_minidump__inst__streams:streams__repeat [color="#404040"];
	thread_list__seq:threads_type -> thread__seq [style=bold];
	thread_list__seq:num_threads_type -> thread_list__seq:threads__repeat [color="#404040"];
	location_descriptor__seq:ofs_data_type -> location_descriptor__inst__data:data_pos [color="#404040"];
	location_descriptor__seq:len_data_type -> location_descriptor__inst__data:data_size [color="#404040"];
	minidump_string__seq:len_str_type -> minidump_string__seq:str_size [color="#404040"];
	system_info__seq:ofs_service_pack_type -> system_info__inst__service_pack:service_pack_pos [color="#404040"];
	system_info__inst__service_pack:service_pack_type -> minidump_string__seq [style=bold];
	dir__seq:ofs_data_type -> dir__inst__data:data_pos [color="#404040"];
	dir__inst__data:data_type -> dir__inst__data_data_switch [style=bold];
	dir__inst__data_data_switch:case0 -> memory_list__seq [style=bold];
	dir__inst__data_data_switch:case1 -> misc_info__seq [style=bold];
	dir__inst__data_data_switch:case2 -> thread_list__seq [style=bold];
	dir__inst__data_data_switch:case3 -> exception_stream__seq [style=bold];
	dir__inst__data_data_switch:case4 -> system_info__seq [style=bold];
	dir__seq:stream_type_type -> dir__inst__data:data_type [color="#404040"];
	thread__seq:stack_type -> memory_descriptor__seq [style=bold];
	thread__seq:thread_context_type -> location_descriptor__seq [style=bold];
	memory_list__seq:mem_ranges_type -> memory_descriptor__seq [style=bold];
	memory_list__seq:num_mem_ranges_type -> memory_list__seq:mem_ranges__repeat [color="#404040"];
	memory_descriptor__seq:memory_type -> location_descriptor__seq [style=bold];
	exception_stream__seq:exception_rec_type -> exception_record__seq [style=bold];
	exception_stream__seq:thread_context_type -> location_descriptor__seq [style=bold];
}