I followed this document: http://www-users.cs.umn.edu/~boutcher/kprobes/kprobes.txt.html to understand kprobe.
As said in the document I created kprobe_example.c and a Makefile. (code for both the files are given in the document. I did a copy-paste and nothing else)
When I compile the Makefile using 'make' command, I am getting this error:
kprobe_example.c:15:16: error: ‘struct pt_regs’ has no member named ‘eip’
p->addr, regs->eip, regs->eflags);
^
I have also included ptrace.h header file in kprobe_example.c, still I am not able resolve the error. Any help on this is greatly appreciated.