sigcontext structure
where can i find info on sigcontext structure on linux/ia-64 ? specifically which registers hold the faulting address/type on a segmention fault and the trap no on a SIGTRAP ?
thanks
chetan
Hi,
Using sigaction with siginfo will help you in catching those address.
siginfo.si_addr carry the faulting address
and the below statement shows how it is calcluated siginfo.si_addr = (void *) (regs->cr_iip + ia64_psr(regs)->ri);
where regs is pt_regs.
-aneesh
Quoted 6 lines · shiva chetan
where can i find info on sigcontext structure on linux/ia-64 ? specifically which registers hold the faulting address/type on a segmention fault and the trap no on a SIGTRAP ?
thanks
chetan
Hi,
The sigcontext structure of linux/i386 has the following fields
trapno (stores trap number)
err (stores faulting address)
cr2 (contains type of fault)
what are the equivalent fields in the sigcontext structure of linux/ia64 ? its not very apparent from the definition of the structure.
thanks
chetan
Dept of Computer Science
Univ of Illinois at Urbana-Champaign
Ph: (217) 333-9051, (217) 244-5110 (O)
(217) 384-2173 (R)
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · shiva chetan
Chetan> Hi, The sigcontext structure of linux/i386 has the following Chetan> fields
Chetan> trapno (stores trap number) err (stores faulting address) Chetan> cr2 (contains type of fault)
Chetan> what are the equivalent fields in the sigcontext structure Chetan> of linux/ia64 ? its not very apparent from the definition Chetan> of the structure.
There is no 1-to-1 correspondence, but such info is stored in siginfo on ia64. See siginfo.h.
--david