diff options
author | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-09-18 13:55:17 +0000 |
---|---|---|
committer | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-09-18 13:55:17 +0000 |
commit | 6a5ab68d56c596bf74a94202a86e35c33127a536 (patch) | |
tree | efc33c2493b5c6a652cc726aedf294a84d6e3545 /src/client/windows/handler/exception_handler.h | |
parent | Allow adding extra memory regions to minidump on linux/windows (diff) | |
download | breakpad-6a5ab68d56c596bf74a94202a86e35c33127a536.tar.xz |
Allow generating minidumps from live processes on Windows.
R=mark at https://breakpad.appspot.com/115002/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1042 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/windows/handler/exception_handler.h')
-rw-r--r-- | src/client/windows/handler/exception_handler.h | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/src/client/windows/handler/exception_handler.h b/src/client/windows/handler/exception_handler.h index b7f1f949..c1945e1e 100644 --- a/src/client/windows/handler/exception_handler.h +++ b/src/client/windows/handler/exception_handler.h @@ -221,6 +221,17 @@ class ExceptionHandler { static bool WriteMinidump(const wstring &dump_path, MinidumpCallback callback, void* callback_context); + // Write a minidump of |child| immediately. This can be used to + // capture the execution state of |child| independently of a crash. + // Pass a meaningful |child_blamed_thread| to make that thread in + // the child process the one from which a crash signature is + // extracted. + static bool WriteMinidumpForChild(HANDLE child, + DWORD child_blamed_thread, + const wstring& dump_path, + MinidumpCallback callback, + void* callback_context); + // Get the thread ID of the thread requesting the dump (either the exception // thread or any other thread that called WriteMinidump directly). This // may be useful if you want to include additional thread state in your @@ -305,8 +316,9 @@ class ExceptionHandler { bool WriteMinidumpOnHandlerThread(EXCEPTION_POINTERS* exinfo, MDRawAssertionInfo* assertion); - // This function does the actual writing of a minidump. It is called - // on the handler thread. requesting_thread_id is the ID of the thread + // This function is called on the handler thread. It calls into + // WriteMinidumpWithExceptionForProcess() with a handle to the + // current process. requesting_thread_id is the ID of the thread // that requested the dump. If the dump is requested as a result of // an exception, exinfo contains exception information, otherwise, // it is NULL. @@ -321,6 +333,20 @@ class ExceptionHandler { const PMINIDUMP_CALLBACK_INPUT callback_input, PMINIDUMP_CALLBACK_OUTPUT callback_output); + // This function does the actual writing of a minidump. It is + // called on the handler thread. requesting_thread_id is the ID of + // the thread that requested the dump, if that information is + // meaningful. If the dump is requested as a result of an + // exception, exinfo contains exception information, otherwise, it + // is NULL. process is the one that will be dumped. If + // requesting_thread_id is meaningful and should be added to the + // minidump, write_requester_stream is |true|. + bool WriteMinidumpWithExceptionForProcess(DWORD requesting_thread_id, + EXCEPTION_POINTERS* exinfo, + MDRawAssertionInfo* assertion, + HANDLE process, + bool write_requester_stream); + // Generates a new ID and stores it in next_minidump_id_, and stores the // path of the next minidump to be written in next_minidump_path_. void UpdateNextID(); |