aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/windows/handler/exception_handler.cc4
-rw-r--r--src/client/windows/handler/exception_handler.h11
-rw-r--r--src/processor/testdata/test_app.cc3
3 files changed, 11 insertions, 7 deletions
diff --git a/src/client/windows/handler/exception_handler.cc b/src/client/windows/handler/exception_handler.cc
index 10d5ec08..31127dda 100644
--- a/src/client/windows/handler/exception_handler.cc
+++ b/src/client/windows/handler/exception_handler.cc
@@ -287,7 +287,7 @@ bool ExceptionHandler::WriteMinidumpWithException(DWORD requesting_thread_id,
// HandleException to call any previous handler or return
// EXCEPTION_CONTINUE_SEARCH on the exception thread, allowing it to appear
// as though this handler were not present at all.
- if (filter_&& !filter_(callback_context_)) {
+ if (filter_&& !filter_(callback_context_, exinfo)) {
return false;
}
@@ -342,7 +342,7 @@ bool ExceptionHandler::WriteMinidumpWithException(DWORD requesting_thread_id,
if (callback_) {
success = callback_(dump_path_c_, next_minidump_id_c_, callback_context_,
- success);
+ exinfo, success);
}
return success;
diff --git a/src/client/windows/handler/exception_handler.h b/src/client/windows/handler/exception_handler.h
index 8f4f50a2..33091189 100644
--- a/src/client/windows/handler/exception_handler.h
+++ b/src/client/windows/handler/exception_handler.h
@@ -79,19 +79,21 @@ class ExceptionHandler {
// A callback function to run before Airbag performs any substantial
// processing of an exception. A FilterCallback is called before writing
// a minidump. context is the parameter supplied by the user as
- // callback_context when the handler was created.
+ // callback_context when the handler was created. exinfo points to the
+ // exception record.
//
// If a FilterCallback returns true, Airbag will continue processing,
// attempting to write a minidump. If a FilterCallback returns false, Airbag
// will immediately report the exception as unhandled without writing a
// minidump, allowing another handler the opportunity to handle it.
- typedef bool (*FilterCallback)(void *context);
+ typedef bool (*FilterCallback)(void *context, EXCEPTION_POINTERS *exinfo);
// A callback function to run after the minidump has been written.
// minidump_id is a unique id for the dump, so the minidump
// file is <dump_path>\<minidump_id>.dmp. context is the parameter supplied
- // by the user as callback_context when the handler was created. succeeded
- // indicates whether a minidump file was successfully written.
+ // by the user as callback_context when the handler was created. exinfo
+ // points to the exception record, or NULL if no exception occurred.
+ // succeeded indicates whether a minidump file was successfully written.
//
// If an exception occurred and the callback returns true, Airbag will treat
// the exception as fully-handled, suppressing any other handlers from being
@@ -106,6 +108,7 @@ class ExceptionHandler {
typedef bool (*MinidumpCallback)(const wchar_t *dump_path,
const wchar_t *minidump_id,
void *context,
+ EXCEPTION_POINTERS *exinfo,
bool succeeded);
// Creates a new ExceptionHandler instance to handle writing minidumps.
diff --git a/src/processor/testdata/test_app.cc b/src/processor/testdata/test_app.cc
index e352e638..439c2191 100644
--- a/src/processor/testdata/test_app.cc
+++ b/src/processor/testdata/test_app.cc
@@ -40,7 +40,8 @@
namespace {
static bool callback(const wchar_t *dump_path, const wchar_t *id,
- void *context, bool succeeded) {
+ void *context, EXCEPTION_POINTERS *exinfo,
+ bool succeeded) {
if (succeeded) {
printf("dump guid is %ws\n", id);
} else {