Subject: Re: add a register to i386 sigcontext
To: Jason Thorpe <>
From: Yorick Hardy <>
List: tech-kern
Date: 03/28/2003 20:41:49
> >What are the opinions on adding the i386 cr2 register to
> >struct sigcontext ?
> You cannot add it to the middle of the structure like that; it must be 
> added to the end, in order to preserve binary compatibility with older 
> versions of that structure.
I did not even think of this, please forgive my inexperience.

> That does Wine want to use %cr2 for?
It seems wine uses page fault information somehow for its emulation
when it receives SIGSEGV. It does manage segmentation faults in the
windows programs and informs the user, so I think it is used for
this at least. I used the incorrect patch and it made a big difference
in what wine could run successfully.

I noticed FreeBSD puts this information in the sc_err field, but
I don't know why they do it this way.

Wine is used to execute (emulate) windows programs by the way.

Thank you for your comments,

Yorick Hardy