Subject: Re: sigcontext and __gregset_t mapping
To: =?iso-8859-1?B?Suly9G1l?= Laban <email@example.com>
From: Thor Lancelot Simon <firstname.lastname@example.org>
Date: 07/04/2004 14:14:14
On Sun, Jul 04, 2004 at 07:54:48PM +0200, Jérôme Laban wrote:
> Hi everyone,
> I'm having trouble on i386 with the newly introduced mcontext.h file wich
> describes the mapping of the __gregset_t array. This array allows me to get
> the value of the registers in a signal handler.
> However, to be compliant with other implementations, I have to map the array
> to a sigcontext structure. The problem here is that, for example, the
I don't understand what "compliance with another implementation" means.
Why do you need the registers to be in the same order? If you're trying to
represent them in some other structure, it seems to me you're entirely
free to move them around as you wish when constructing that other structure.
If you're using OS-dependent datatypes as internal representations in your
own code, that's a bug; you should fix it.