Skip to content

Commit

Permalink
Fix compilation on non-x86 platforms.
Browse files Browse the repository at this point in the history
Refs. #3558.
  • Loading branch information
Safety0ff committed Jun 21, 2012
1 parent 6382bbb commit 6c61804
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/exceptionhandler/exceptionhandler.cpp
Expand Up @@ -494,9 +494,9 @@ static bool gdbExtendedBacktrace(int const dumpFile)
* additions to the frame-pointer register's content.
*/
void const * const frame =
#if defined(SA_SIGINFO) && __WORDSIZE == 64
#if defined(SA_SIGINFO) && defined(REG_RBP)
sigcontext ? (void*)(sigcontext->uc_mcontext.gregs[REG_RBP] + sizeof(greg_t) + sizeof(void (*)(void))) : NULL;
#elif defined(SA_SIGINFO) && __WORDSIZE == 32
#elif defined(SA_SIGINFO) && defined(REG_EBP)
sigcontext ? (void*)(sigcontext->uc_mcontext.gregs[REG_EBP] + sizeof(greg_t) + sizeof(void (*)(void))) : NULL;
#else
NULL;
Expand All @@ -506,9 +506,9 @@ static bool gdbExtendedBacktrace(int const dumpFile)
* Faulting instruction.
*/
void (*instruction)(void) =
#if defined(SA_SIGINFO) && __WORDSIZE == 64
#if defined(SA_SIGINFO) && defined(REG_RIP)
sigcontext ? (void (*)(void))sigcontext->uc_mcontext.gregs[REG_RIP] : NULL;
#elif defined(SA_SIGINFO) && __WORDSIZE == 32
#elif defined(SA_SIGINFO) && defined(REG_EIP)
sigcontext ? (void (*)(void))sigcontext->uc_mcontext.gregs[REG_EIP] : NULL;
#else
NULL;
Expand Down

0 comments on commit 6c61804

Please sign in to comment.