From dfd2da797999be085d55ae9430f2a434788652e3 Mon Sep 17 00:00:00 2001 From: Ting-Yu Chou Date: Wed, 29 Jun 2016 06:44:24 -0400 Subject: Add a new argument to specify the minidump type to write on Windows. R=ted.mielczarek@gmail.com BUG=https://bugzilla.mozilla.org/show_bug.cgi?id=1267329 Review URL: https://codereview.chromium.org/2107083002/ . --- src/client/windows/handler/exception_handler.cc | 10 ++++++---- src/client/windows/handler/exception_handler.h | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'src/client') diff --git a/src/client/windows/handler/exception_handler.cc b/src/client/windows/handler/exception_handler.cc index b78075de..ef581dd3 100644 --- a/src/client/windows/handler/exception_handler.cc +++ b/src/client/windows/handler/exception_handler.cc @@ -764,9 +764,10 @@ bool ExceptionHandler::WriteMinidumpForException(EXCEPTION_POINTERS* exinfo) { // static bool ExceptionHandler::WriteMinidump(const wstring &dump_path, MinidumpCallback callback, - void* callback_context) { + void* callback_context, + MINIDUMP_TYPE dump_type) { ExceptionHandler handler(dump_path, NULL, callback, callback_context, - HANDLER_NONE); + HANDLER_NONE, dump_type, (HANDLE)NULL, NULL); return handler.WriteMinidump(); } @@ -775,7 +776,8 @@ bool ExceptionHandler::WriteMinidumpForChild(HANDLE child, DWORD child_blamed_thread, const wstring& dump_path, MinidumpCallback callback, - void* callback_context) { + void* callback_context, + MINIDUMP_TYPE dump_type) { EXCEPTION_RECORD ex; CONTEXT ctx; EXCEPTION_POINTERS exinfo = { NULL, NULL }; @@ -806,7 +808,7 @@ bool ExceptionHandler::WriteMinidumpForChild(HANDLE child, } ExceptionHandler handler(dump_path, NULL, callback, callback_context, - HANDLER_NONE); + HANDLER_NONE, dump_type, (HANDLE)NULL, NULL); bool success = handler.WriteMinidumpWithExceptionForProcess( child_blamed_thread, exinfo.ExceptionRecord ? &exinfo : NULL, diff --git a/src/client/windows/handler/exception_handler.h b/src/client/windows/handler/exception_handler.h index e3cd8146..11babe51 100644 --- a/src/client/windows/handler/exception_handler.h +++ b/src/client/windows/handler/exception_handler.h @@ -238,7 +238,8 @@ class ExceptionHandler { // Convenience form of WriteMinidump which does not require an // ExceptionHandler instance. static bool WriteMinidump(const wstring &dump_path, - MinidumpCallback callback, void* callback_context); + MinidumpCallback callback, void* callback_context, + MINIDUMP_TYPE dump_type = MiniDumpNormal); // Write a minidump of |child| immediately. This can be used to // capture the execution state of |child| independently of a crash. @@ -249,7 +250,8 @@ class ExceptionHandler { DWORD child_blamed_thread, const wstring& dump_path, MinidumpCallback callback, - void* callback_context); + void* callback_context, + MINIDUMP_TYPE dump_type = MiniDumpNormal); // Get the thread ID of the thread requesting the dump (either the exception // thread or any other thread that called WriteMinidump directly). This -- cgit v1.2.1