OLD | NEW |
1 // Copyright (c) 2008, Google Inc. | 1 // Copyright (c) 2008, Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 const std::wstring& dump_path, | 252 const std::wstring& dump_path, |
253 const HANDLE process_handle, | 253 const HANDLE process_handle, |
254 const DWORD process_id, | 254 const DWORD process_id, |
255 const DWORD thread_id, | 255 const DWORD thread_id, |
256 const DWORD requesting_thread_id, | 256 const DWORD requesting_thread_id, |
257 EXCEPTION_POINTERS* exception_pointers, | 257 EXCEPTION_POINTERS* exception_pointers, |
258 MDRawAssertionInfo* assert_info, | 258 MDRawAssertionInfo* assert_info, |
259 const MINIDUMP_TYPE dump_type, | 259 const MINIDUMP_TYPE dump_type, |
260 const bool is_client_pointers) | 260 const bool is_client_pointers) |
261 : dbghelp_module_(NULL), | 261 : dbghelp_module_(NULL), |
| 262 write_dump_(NULL), |
262 rpcrt4_module_(NULL), | 263 rpcrt4_module_(NULL), |
263 dump_path_(dump_path), | 264 create_uuid_(NULL), |
264 process_handle_(process_handle), | 265 process_handle_(process_handle), |
265 process_id_(process_id), | 266 process_id_(process_id), |
266 thread_id_(thread_id), | 267 thread_id_(thread_id), |
267 requesting_thread_id_(requesting_thread_id), | 268 requesting_thread_id_(requesting_thread_id), |
268 exception_pointers_(exception_pointers), | 269 exception_pointers_(exception_pointers), |
269 assert_info_(assert_info), | 270 assert_info_(assert_info), |
270 dump_type_(dump_type), | 271 dump_type_(dump_type), |
271 is_client_pointers_(is_client_pointers), | 272 is_client_pointers_(is_client_pointers), |
| 273 dump_path_(dump_path), |
272 dump_file_(INVALID_HANDLE_VALUE), | 274 dump_file_(INVALID_HANDLE_VALUE), |
273 full_dump_file_(INVALID_HANDLE_VALUE), | 275 full_dump_file_(INVALID_HANDLE_VALUE), |
274 dump_file_is_internal_(false), | 276 dump_file_is_internal_(false), |
275 full_dump_file_is_internal_(false), | 277 full_dump_file_is_internal_(false), |
276 additional_streams_(NULL), | 278 additional_streams_(NULL), |
277 callback_info_(NULL), | 279 callback_info_(NULL) { |
278 write_dump_(NULL), | |
279 create_uuid_(NULL) { | |
280 InitializeCriticalSection(&module_load_sync_); | 280 InitializeCriticalSection(&module_load_sync_); |
281 InitializeCriticalSection(&get_proc_address_sync_); | 281 InitializeCriticalSection(&get_proc_address_sync_); |
282 } | 282 } |
283 | 283 |
284 MinidumpGenerator::~MinidumpGenerator() { | 284 MinidumpGenerator::~MinidumpGenerator() { |
285 if (dump_file_is_internal_ && dump_file_ != INVALID_HANDLE_VALUE) { | 285 if (dump_file_is_internal_ && dump_file_ != INVALID_HANDLE_VALUE) { |
286 CloseHandle(dump_file_); | 286 CloseHandle(dump_file_); |
287 } | 287 } |
288 | 288 |
289 if (full_dump_file_is_internal_ && full_dump_file_ != INVALID_HANDLE_VALUE) { | 289 if (full_dump_file_is_internal_ && full_dump_file_ != INVALID_HANDLE_VALUE) { |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 } | 570 } |
571 | 571 |
572 create_uuid(&id); | 572 create_uuid(&id); |
573 wstring id_str = GUIDString::GUIDToWString(&id); | 573 wstring id_str = GUIDString::GUIDToWString(&id); |
574 | 574 |
575 *file_path = dump_path_ + TEXT("\\") + id_str + TEXT(".dmp"); | 575 *file_path = dump_path_ + TEXT("\\") + id_str + TEXT(".dmp"); |
576 return true; | 576 return true; |
577 } | 577 } |
578 | 578 |
579 } // namespace google_breakpad | 579 } // namespace google_breakpad |
OLD | NEW |