implement GetSignalBacktraceContext on DARWIN
This commit is contained in:
@@ -413,6 +413,12 @@ void GetExceptionBacktraceContext( BacktraceContext *ctx, const ExceptionInforma
|
||||
ctx->FramePtr = (void *) exception->registerImage->R1.lo;
|
||||
}
|
||||
|
||||
void GetSignalBacktraceContext( BacktraceContext *ctx, const ucontext_t *uc )
|
||||
{
|
||||
ctx->PC = (void *) uc->uc_mcontext->ss.srr0;
|
||||
ctx->FramePtr = (void *) uc->uc_mcontext->ss.r1;
|
||||
}
|
||||
|
||||
void InitializeBacktrace() { }
|
||||
|
||||
void GetBacktrace( const void **buf, size_t size, const BacktraceContext *ctx )
|
||||
|
||||
@@ -33,10 +33,8 @@ bool GetThreadBacktraceContext( int ThreadID, 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>
|
||||
|
||||
Reference in New Issue
Block a user