diff options
author | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2008-03-18 16:10:10 +0000 |
---|---|---|
committer | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2008-03-18 16:10:10 +0000 |
commit | dd2ff4a21c57672170eb14ccc5142efd7d92f3f1 (patch) | |
tree | 0d8ced3d3cd41773a89aae46a9b269ebd29935a1 /src/client/solaris/handler/exception_handler.h | |
parent | Issue 245: refactoring minidump_format.h into architecture & platform specifi... (diff) | |
download | breakpad-dd2ff4a21c57672170eb14ccc5142efd7d92f3f1.tar.xz |
issue 223 - Fixes for SOlaris handler during integration with Firefox. patch by Alfred Peng, r=mento,me
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@250 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/solaris/handler/exception_handler.h')
-rw-r--r-- | src/client/solaris/handler/exception_handler.h | 42 |
1 files changed, 15 insertions, 27 deletions
diff --git a/src/client/solaris/handler/exception_handler.h b/src/client/solaris/handler/exception_handler.h index ab035905..4d72485f 100644 --- a/src/client/solaris/handler/exception_handler.h +++ b/src/client/solaris/handler/exception_handler.h @@ -32,9 +32,6 @@ #ifndef CLIENT_SOLARIS_HANDLER_EXCEPTION_HANDLER_H__ #define CLIENT_SOLARIS_HANDLER_EXCEPTION_HANDLER_H__ -#include <pthread.h> -#include <semaphore.h> - #include <map> #include <string> #include <vector> @@ -119,9 +116,11 @@ class ExceptionHandler { bool install_handler); ~ExceptionHandler(); - // Set the minidump path. + // Get and Set the minidump path. + string dump_path() const { return dump_path_; } void set_dump_path(const string &dump_path) { - dump_path_c_ = dump_path.c_str(); + dump_path_ = dump_path; + dump_path_c_ = dump_path_.c_str(); } // Writes a minidump immediately. This can be used to capture the @@ -150,36 +149,25 @@ class ExceptionHandler { // Signal handler. static void HandleException(int signo); - // Trigger the call to InternalWriteMinidump and wait for the return value. - bool WriteMinidumpOnHandlerThread(int signo); - // Write all the information to the dump file. - bool InternalWriteMinidump(); + // If called from a signal handler, sighandler_ebp is the ebp of + // that signal handler's frame, and sig_ctx is an out parameter + // that will be set to point at the ucontext_t that was placed + // on the stack by the kernel. You can pass zero and NULL + // for the second and third parameters if you are not calling + // this from a signal handler. + bool InternalWriteMinidump(int signo, uintptr_t sighandler_ebp, + ucontext_t **sig_ctx); private: - // Signal number when crash happed. Can be 0 if this is a requested dump. - int signo_; - - // The exception handler thread. - pthread_t handler_thread_; - - // Semaphores used to move exception handling between the exception thread - // and the handler thread. handler_start_semaphore_ is signalled by the - // exception thread to wake up the handler thread when an exception occurs. - // handler_finish_semaphore_ is signalled by the handler thread to wake up - // the exception thread when handling is complete. - sem_t handler_start_semaphore_; - sem_t handler_finish_semaphore_; - - // The return value of the handler, passed from the handler thread back to - // the requesting thread. - bool handler_return_value_; - // The callbacks before and after writing the dump file. FilterCallback filter_; MinidumpCallback callback_; void *callback_context_; + // The directory in which a minidump will be written, set by the dump_path + // argument to the constructor, or set_dump_path. + string dump_path_; // C style dump path. Keep this when setting dump path, since calling // c_str() of std::string when crashing may not be safe. const char *dump_path_c_; |