aboutsummaryrefslogtreecommitdiff
path: root/src/client/windows/crash_generation/minidump_generator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/windows/crash_generation/minidump_generator.cc')
-rw-r--r--src/client/windows/crash_generation/minidump_generator.cc22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/client/windows/crash_generation/minidump_generator.cc b/src/client/windows/crash_generation/minidump_generator.cc
index fe4937aa..34aa8a97 100644
--- a/src/client/windows/crash_generation/minidump_generator.cc
+++ b/src/client/windows/crash_generation/minidump_generator.cc
@@ -271,14 +271,15 @@ bool MinidumpGenerator::WriteMinidump(HANDLE process_handle,
DWORD requesting_thread_id,
EXCEPTION_POINTERS* exception_pointers,
MDRawAssertionInfo* assert_info,
+ CustomDataStream* custom_data_stream,
MINIDUMP_TYPE dump_type,
bool is_client_pointers,
wstring* dump_path) {
// Just call the full WriteMinidump with NULL as the full_dump_path.
return this->WriteMinidump(process_handle, process_id, thread_id,
requesting_thread_id, exception_pointers,
- assert_info, dump_type, is_client_pointers,
- dump_path, NULL);
+ assert_info, custom_data_stream, dump_type,
+ is_client_pointers, dump_path, NULL);
}
bool MinidumpGenerator::WriteMinidump(HANDLE process_handle,
@@ -287,6 +288,7 @@ bool MinidumpGenerator::WriteMinidump(HANDLE process_handle,
DWORD requesting_thread_id,
EXCEPTION_POINTERS* exception_pointers,
MDRawAssertionInfo* assert_info,
+ CustomDataStream* custom_data_stream,
MINIDUMP_TYPE dump_type,
bool is_client_pointers,
wstring* dump_path,
@@ -368,9 +370,9 @@ bool MinidumpGenerator::WriteMinidump(HANDLE process_handle,
breakpad_info.requesting_thread_id = requesting_thread_id;
}
- // Leave room in user_stream_array for possible assertion info and handle
- // operations streams.
- MINIDUMP_USER_STREAM user_stream_array[3];
+ // Leave room in user_stream_array for possible assertion info, handle
+ // operations, and custom data streams.
+ MINIDUMP_USER_STREAM user_stream_array[4];
user_stream_array[0].Type = MD_BREAKPAD_INFO_STREAM;
user_stream_array[0].BufferSize = sizeof(breakpad_info);
user_stream_array[0].Buffer = &breakpad_info;
@@ -414,6 +416,16 @@ bool MinidumpGenerator::WriteMinidump(HANDLE process_handle,
++user_streams.UserStreamCount;
}
+ if (custom_data_stream) {
+ user_stream_array[user_streams.UserStreamCount].Type =
+ MD_CUSTOM_DATA_STREAM;
+ user_stream_array[user_streams.UserStreamCount].BufferSize =
+ custom_data_stream->size;
+ user_stream_array[user_streams.UserStreamCount].Buffer =
+ custom_data_stream->stream;
+ ++user_streams.UserStreamCount;
+ }
+
// If the process is terminated by STATUS_INVALID_HANDLE exception store
// the trace of operatios for the offending handle value. Do nothing special
// if the client already requested the handle trace to be stored in the dump.