[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Fault addres from sigcontext



Do you mean the address of the inctruction that caused the fault
or the address that was accessed when the fault occured?
The first is in sc.regs.irp and the other in sc.regs.csraddr.
(when looking in arch/i36/mm/fault.c it looks like you want
sc.regs.csraddr).

-----Original Message-----
From: owner-dev-etrax@xxxxxxx.com">mailto:owner-dev-etrax@xxxxxxx.com] On
Behalf Of Simon Posnjak
Sent: Wednesday, October 06, 2004 11:03 AM
To: dev-etrax
Subject: Fault addres from sigcontext


Hi all,

While porting Boehm GC to CRIS i ran in to a problem. In the function
GC_write_fault_handler which (surprisingly) handles write fault signal, 
I need to get the address on which the fault occurred. On i386 they do:

char * addr = (char *) (sc.cr2);

where sc is of type sigcontext (defined in 
linux/include/asm-i386/sigcontext.h). On ARM they do:

char * addr = (char *)sc.fault_address;

again the sc is of type sigcontext (defined in 
linux/include/asm-arm/sigcontext.h).

So on Cris I should do... What? Thank you.

		Regards Simon