From f6b3e16ef8a5e6d6014f216dc1f130dd29fc8d2a Mon Sep 17 00:00:00 2001 From: doshimun Date: Sat, 31 May 2008 19:23:20 +0000 Subject: Set the dump thread id and the requesting thread id properties of MDRawBreakpadInfo only in case of in-process dump generation; otherwise the dump processing code of breakpad doesn't identify the crashing thread properly. I am checking this in to-be-reviewed since it is needed urgently in one of the products at Google. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@276 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/windows/crash_generation/minidump_generator.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/client/windows') diff --git a/src/client/windows/crash_generation/minidump_generator.cc b/src/client/windows/crash_generation/minidump_generator.cc index 1efd9a73..72736ffa 100644 --- a/src/client/windows/crash_generation/minidump_generator.cc +++ b/src/client/windows/crash_generation/minidump_generator.cc @@ -108,11 +108,15 @@ bool MinidumpGenerator::WriteMinidump(HANDLE process_handle, // relevant. The Breakpad processor does not require this information but // can function better with Breakpad-generated dumps when it is present. // The native debugger is not harmed by the presence of this information. - MDRawBreakpadInfo breakpad_info; - breakpad_info.validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID | - MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID; - breakpad_info.dump_thread_id = thread_id; - breakpad_info.requesting_thread_id = requesting_thread_id; + MDRawBreakpadInfo breakpad_info = {0}; + if (!is_client_pointers) { + // Set the dump thread id and requesting thread id only in case of + // in-process dump generation. + breakpad_info.validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID | + MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID; + breakpad_info.dump_thread_id = thread_id; + breakpad_info.requesting_thread_id = requesting_thread_id; + } // Leave room in user_stream_array for a possible assertion info stream. MINIDUMP_USER_STREAM user_stream_array[2]; -- cgit v1.2.1