aboutsummaryrefslogtreecommitdiff
path: root/src/client/mac/handler/exception_handler.h
diff options
context:
space:
mode:
authorladderbreaker <ladderbreaker@4c0a9323-5329-0410-9bdc-e9ce6186880e>2007-05-02 21:05:49 +0000
committerladderbreaker <ladderbreaker@4c0a9323-5329-0410-9bdc-e9ce6186880e>2007-05-02 21:05:49 +0000
commitde2fd15db9a480c807ba337690669538a97756a4 (patch)
treed75206c937a7f1ae2ab1f6e38957d17cb9345d1a /src/client/mac/handler/exception_handler.h
parentIssue 159: reviewer Waylonis (diff)
downloadbreakpad-de2fd15db9a480c807ba337690669538a97756a4.tar.xz
Issue 159: reviewer Waylonis
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@151 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/handler/exception_handler.h')
-rw-r--r--src/client/mac/handler/exception_handler.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/client/mac/handler/exception_handler.h b/src/client/mac/handler/exception_handler.h
index 11babb73..8d7755a6 100644
--- a/src/client/mac/handler/exception_handler.h
+++ b/src/client/mac/handler/exception_handler.h
@@ -71,6 +71,14 @@ class ExceptionHandler {
const char *minidump_id,
void *context, bool succeeded);
+ // A callback function which will be called directly if an exception occurs.
+ // This bypasses the minidump file writing and simply gives the client
+ // the exception information.
+ typedef bool (*DirectCallback)( void *context,
+ int exception_type,
+ int exception_code,
+ mach_port_t thread_name);
+
// Creates a new ExceptionHandler instance to handle writing minidumps.
// Minidump files will be written to dump_path, and the optional callback
// is called after writing the dump file, as described above.
@@ -80,6 +88,13 @@ class ExceptionHandler {
ExceptionHandler(const string &dump_path,
FilterCallback filter, MinidumpCallback callback,
void *callback_context, bool install_handler);
+
+ // A special constructor if we want to bypass minidump writing and
+ // simply get a callback with the exception information.
+ ExceptionHandler(DirectCallback callback,
+ void *callback_context,
+ bool install_handler);
+
~ExceptionHandler();
// Get and set the minidump path.
@@ -104,7 +119,7 @@ class ExceptionHandler {
bool InstallHandler();
// Uninstall the mach exception handler (if any)
- bool UninstallHandler();
+ bool UninstallHandler(bool in_exception);
// Setup the handler thread, and if |install_handler| is true, install the
// mach exception port handler
@@ -159,6 +174,10 @@ class ExceptionHandler {
MinidumpCallback callback_;
void *callback_context_;
+ // The callback function to be passed back when we don't want a minidump
+ // file to be written
+ DirectCallback directCallback_;
+
// The thread that is created for the handler
pthread_t handler_thread_;