cannot convert ‘mcontext_t*’ to ‘sigcontext*’ in assignment
Posted
by user353573
on Stack Overflow
See other posts from Stack Overflow
or by user353573
Published on 2010-06-06T11:56:27Z
Indexed on
2010/06/07
13:42 UTC
Read the original article
Hit count: 197
i have checked asm/ucontext.h
it should be sigcontext, but why pop up the error message cannot convert ‘mcontext_t*’ to ‘sigcontext*’ in assignment
#include <stdio.h>
#include <signal.h>
#include <asm/ucontext.h>
static unsigned long target;
void handler(int signum, siginfo_t *siginfo, void *uc0){
struct ucontext *uc;
struct sigcontext *sc;
uc = (struct ucontext *)uc0;
sc = &uc->uc_mcontext;
sc->eip = target;
}
struct ucontext {
unsigned long uc_flags;
struct ucontext *uc_link;
stack_t uc_stack;
struct sigcontext uc_mcontext;
sigset_t uc_sigmask; /* mask last for extensibility */
};
© Stack Overflow or respective owner