Stephen J. Turnbull wrote:
Glynn> Right. Replacing
Glynn> #include <sigcontext.h> with #include
Glynn> <asm/sigcontext.h>
Glynn> allows it to compile for libc-5 (for me, anyhow).
Did it run? :-) What version of libc5?
Yes. libc.so.5.4.46, linux-2.2.0-pre7.
It didn't compile for my RedHat libc.so.5.3.12, but (a) it's
a Sparc
system,
Right. `struct sigcontext' is totally processor-specific; it appears
to be a dump of certain registers. On i386, the CR2 register (which
contains the fault address) is stored in the cr2 field.
The Sparc version of asm/sigcontext.h contains a different sigcontext
struct. It may be possible to obtain the relevant information from
this; it depends upon what the Sparc does when an address fault
occurs.
--
Glynn Clements <glynn(a)sensei.co.uk>