no GetSignalBacktraceContext or CrashSignalHandler on DARWIN
This commit is contained in:
@@ -34,8 +34,10 @@ void GetCurrentBacktraceContext( BacktraceContext *ctx );
|
||||
|
||||
/* Set up a BacktraceContext to get a backtrace after receiving a signal, given
|
||||
* a ucontext_t (see sigaction(2)). (This interface is UNIX-specific.) */
|
||||
#if !defined(DARWIN)
|
||||
#include <ucontext.h>
|
||||
void GetSignalBacktraceContext( BacktraceContext *ctx, const ucontext_t *uc );
|
||||
#endif
|
||||
|
||||
#if defined(DARWIN)
|
||||
#include <MachineExceptions.h>
|
||||
|
||||
@@ -337,6 +337,7 @@ void ForceCrashHandler( const char *reason )
|
||||
RunCrashHandler( &crash );
|
||||
}
|
||||
|
||||
#if !defined(DARWIN)
|
||||
void CrashSignalHandler( int signal, siginfo_t *si, const ucontext_t *uc )
|
||||
{
|
||||
CrashData crash;
|
||||
@@ -347,6 +348,7 @@ void CrashSignalHandler( int signal, siginfo_t *si, const ucontext_t *uc )
|
||||
GetSignalBacktraceContext( &crash.ctx, uc );
|
||||
RunCrashHandler( &crash );
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(DARWIN)
|
||||
OSStatus CrashExceptionHandler( ExceptionInformation *e )
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
#ifndef CRASH_HANDLER_H
|
||||
#define CRASH_HANDLER_H
|
||||
|
||||
#include <signal.h>
|
||||
#include <ucontext.h>
|
||||
|
||||
void ForceCrashHandler( const char *reason );
|
||||
void CrashSignalHandler( int signal, siginfo_t *si, const ucontext_t *uc );
|
||||
void CrashHandlerHandleArgs( int argc, char* argv[] );
|
||||
void InitializeCrashHandler();
|
||||
|
||||
#if !defined(DARWIN)
|
||||
#include <signal.h>
|
||||
#include <ucontext.h>
|
||||
void CrashSignalHandler( int signal, siginfo_t *si, const ucontext_t *uc );
|
||||
#endif
|
||||
|
||||
#if defined(DARWIN)
|
||||
#include <MachineExceptions.h>
|
||||
OSStatus CrashExceptionHandler( ExceptionInformation *e );
|
||||
|
||||
Reference in New Issue
Block a user