From fb6be7cf42d354518554a1931eaf9cffc310ed2b Mon Sep 17 00:00:00 2001 From: mmentovai Date: Mon, 2 Jul 2007 15:36:56 +0000 Subject: Add an API to pass exception information into the handler (#192). r=ted.mielczarek http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/42e9ee1a636bca8b git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@191 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/windows/handler/exception_handler.cc | 6 +++++- src/client/windows/handler/exception_handler.h | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src/client') diff --git a/src/client/windows/handler/exception_handler.cc b/src/client/windows/handler/exception_handler.cc index 5a1444c2..d2c6e7d0 100644 --- a/src/client/windows/handler/exception_handler.cc +++ b/src/client/windows/handler/exception_handler.cc @@ -410,7 +410,11 @@ bool ExceptionHandler::WriteMinidumpOnHandlerThread( } bool ExceptionHandler::WriteMinidump() { - bool success = WriteMinidumpOnHandlerThread(NULL, NULL); + return WriteMinidumpForException(NULL); +} + +bool ExceptionHandler::WriteMinidumpForException(EXCEPTION_POINTERS *exinfo) { + bool success = WriteMinidumpOnHandlerThread(exinfo, NULL); UpdateNextID(); return success; } diff --git a/src/client/windows/handler/exception_handler.h b/src/client/windows/handler/exception_handler.h index e4b3f3bb..a9eccd6b 100644 --- a/src/client/windows/handler/exception_handler.h +++ b/src/client/windows/handler/exception_handler.h @@ -144,6 +144,10 @@ class ExceptionHandler { // execution state independently of a crash. Returns true on success. bool WriteMinidump(); + // Writes a minidump immediately, with the user-supplied exception + // information. + bool WriteMinidumpForException(EXCEPTION_POINTERS *exinfo); + // Convenience form of WriteMinidump which does not require an // ExceptionHandler instance. static bool WriteMinidump(const wstring &dump_path, -- cgit v1.2.1