1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-06-03 09:42:38 +02:00

Fix IP vs. PC confusion in tests on ARM

The intention in the test cases is to print the "instruction pointer"
value at certain places, and on ARM we will want to get the Program
Counter in these cases. IP is a scratch register, and not very
interesting.
This commit is contained in:
Tommi Rantala 2012-07-31 15:18:03 +03:00
parent a26f1eac22
commit 9158e522db
2 changed files with 2 additions and 2 deletions

View file

@ -208,7 +208,7 @@ sighandler (int signal, void *siginfo, void *context)
printf (" @ %lx", (unsigned long) uc->uc_mcontext.mc_rip);
#endif
#elif defined UNW_TARGET_ARM
printf (" @ %lx", (unsigned long) uc->uc_mcontext.arm_ip);
printf (" @ %lx", (unsigned long) uc->uc_mcontext.arm_pc);
#endif
printf ("\n");
}

View file

@ -214,7 +214,7 @@ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
#elif defined(UNW_TARGET_X86_64)
ip = uc->uc_mcontext.gregs[REG_RIP];
#elif defined(UNW_TARGET_ARM)
ip = uc->uc_mcontext.arm_ip;
ip = uc->uc_mcontext.arm_pc;
#endif
#elif defined(__FreeBSD__)
#ifdef __i386__