implement GetSignalBacktraceContext on DARWIN

This commit is contained in:
Glenn Maynard
2004-04-16 07:03:14 +00:00
parent f952f9fc4f
commit f38983f3d3
2 changed files with 6 additions and 2 deletions
@@ -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 )
-2
View File
@@ -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>