Attempt prep work for 64 bit just in case.

If SDL2 fails, someone (not me) will have to try to
keep these updated.
This commit is contained in:
Jason Felds
2014-02-12 19:40:27 -05:00
parent 0715c38475
commit 9bbefe2240
4 changed files with 22 additions and 22 deletions
+5 -6
View File
@@ -460,10 +460,14 @@ void GetSignalBacktraceContext( BacktraceContext *ctx, const ucontext_t *uc )
ctx->ip = (void *) uc->uc_mcontext->ss.eip;
ctx->bp = (void *) uc->uc_mcontext->ss.ebp;
ctx->sp = (void *) uc->uc_mcontext->ss.esp;
#else
#elif defined(__i386__)
ctx->ip = (void *) uc->uc_mcontext->__ss.__eip;
ctx->bp = (void *) uc->uc_mcontext->__ss.__ebp;
ctx->sp = (void *) uc->uc_mcontext->__ss.__esp;
#elif defined(__x86_64__)
ctx->ip = (void *) uc->uc_mcontext->__ss.__rip;
ctx->bp = (void *) uc->uc_mcontext->__ss.__rbp;
ctx->sp = (void *) uc->uc_mcontext->__ss.__rsp;
#endif
}
@@ -635,13 +639,8 @@ struct Frame
void GetSignalBacktraceContext( BacktraceContext *ctx, const ucontext_t *uc )
{
#if defined(__ppc__)
ctx->PC = (const void *) uc->uc_mcontext->__ss.__srr0;
ctx->FramePtr = (const Frame *) uc->uc_mcontext->__ss.__r1;
#else
ctx->PC = (const void *) uc->uc_mcontext->ss.srr0;
ctx->FramePtr = (const Frame *) uc->uc_mcontext->ss.r1;
#endif
}
void InitializeBacktrace() { }