error: ‘struct mcontext_t’ has no member named ‘eip’
- by user353573
original is struct sigcontext *sc;
after changing to struct mcontext_t, error occur. How to fix it?
error: ‘struct mcontext_t’ has no member named ‘eip’
#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;
mcontext_t *sc;
uc = (struct ucontext *)uc0;
sc = &uc->uc_mcontext;
sc->eip = target;
}