getcontext on Linux PPC64
Sergiy Kyrylkov
sergiy at cs.unm.edu
Fri Apr 2 04:40:47 EST 2004
Hi,
Since getcontext is not implemented on Linux the following thing worked for
me on Linux PPC
void cTrapHandler(int signum, siginfo_t *siginfo, void* arg3) {
sigcontext* context = getLinuxSavedContext(signum, arg3);
printf("SIGSEGV = %d\n", SIGSEGV);
printf("signum = %d\n", signum);
printf("(siginfo->si_addr) = 0x%p\n", (siginfo->si_addr));
.....
}
sigcontext* getLinuxSavedContext(int signum, void* arg3) {
return &((ucontext_t*)arg3)->uc_mcontext;
}
It doesn't seem to work on Linux PPC64. Instead of getting the correct
faulting address:
SIGSEGV = 11
Signum = 11
(siginfo->si_addr) = 0xffffffff4
like it was on the 32-bit PPC, I get
SIGSEGV = 11
Signum = 11
(siginfo->si_addr) = 0x0000000000000380 (instead of 0xffffffffffffffe8)
which is totally wrong.
Does somebody have any idea what will work on Linux PPC64?
Sergiy
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list