Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix arch-depend IP usage to be clang friendly.

This is OK for gcc, too.
  • Loading branch information...
commit 1470c8b56c39892c7a2627694511bb3dc427695c 1 parent 54824f1
KIMURA Masaru hiyuh authored committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/util.c
4 src/util.c
View
@@ -76,7 +76,7 @@
#else
#define ARCH_IP_REG __eip
#endif
-#elif defined __powerpc
+#elif defined __ppc__ || defined __powerpc__
#define ARCH_IP_REG __nip
#elif defined __CYGWIN__
#define NO_STACK_TRACE
@@ -374,7 +374,7 @@ static void bt_sighandler(int sig, siginfo_t *info, void *secret)
#ifdef __APPLE__
uintptr_t ip = uc->uc_mcontext->__ss.ARCH_IP_REG;
-#elif defined __powerpc
+#elif defined __ppc__ || defined __powerpc__
uintptr_t ip = uc->uc_mcontext.regs->nip;
#else
uintptr_t ip = uc->uc_mcontext.gregs[ARCH_IP_REG];
Please sign in to comment.
Something went wrong with that request. Please try again.