On Tue, Feb 13, 2007 at 09:27:20AM +0100, Franck Bui-Huu wrote: > On 2/12/07, Atsushi Nemoto <anemo@xxxxxxxxxxxxx> wrote: > >If N32 userland refers asm-mips/sigcontext.h, struct sigcontext cause > >some troubles. > > > >#if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 > > > >struct sigcontext { > > unsigned long sc_regs[32]; > >... > > > > > >The kernel use 64-bit for sc_regs[0], and both N32/N64 userland > >expects it was 64-bit. But size of 'long' on N32 is actually 32-bit. > >So this definition make some confusion. > > > >glibc has its own sigcontext.h and it uses 'unsigned long long' for > >sc_regs, so no real problem with glibc. Looks like a case for __u32, __u64 then. > Just out of curiosity, for what purpose does the glibc use sigcontext ? Afair it doesn't use sigcontext itself but makes it available to applications through <signal.h>. Typical users are virtual machines, JITs, debuggers, user space virtual memory. Ralf