RE: ucontext.h
"Tian, Kevin" <[email protected]> Fri, 8 Oct 2004 09:31:05 +0800
| Newsgroups | gmane.linux.redhat.ia64.general |
|---|---|
| Message-ID | <571ACEFD467F7749BC50E0A98C17CDD805149DB7@pdsmsx403> |
>-----Original Message----- >From: [email protected] [mailto:[email protected]] On >Behalf Of pramod sharma >Sent: Wednesday, October 06, 2004 2:56 PM >For the intel x86 , running on Linux, >the struct ucontext *ucp ; >ucp->uc_mcontext.gregs[ERR]" field can be used to find >out whether READ or WRITE caused the page fault. This >field simply means that we get the interrupted >instruction from ucontext (saved user context) and >check whether it is read or write. > >but for IA -64 , there is no structure defined like >this .......is this not supported for IA64 . > > >How can I acheive this in IA64 ? > >Any pointers in this direction will be helpful. > >Regards >Pramod Hi, Pramod, Checking siginfo should be enough to retrieve necessary info about fault (Si_code and si_errno). Like SEGV_ACCERR for si_code stands for invalid permissions for destination, including both read and write operations. Furthermore, ISR is kept in siginfo for SIGSEGV, etc, which describes complete faulting info, like r/w/x. You can refer to manuals for ISR details.=20 Thanks, Kevin