1 #ifndef SIZEOF_STRUCT_SPARC_STACKF 2 # define SIZEOF_STRUCT_SPARC_STACKF sizeof(struct sparc_stackf) 3 #endif 4 #ifndef SIZEOF_STRUCT_PT_REGS 5 # define SIZEOF_STRUCT_PT_REGS sizeof(struct pt_regs) 6 #endif 7 #ifndef PERSONALITY_WORDSIZE 8 # define PERSONALITY_WORDSIZE PERSONALITY0_WORDSIZE 9 #endif 10 11 static void 12 arch_sigreturn(struct tcb *tcp) 13 { 14 unsigned long addr = sparc_regs.u_regs[U_REG_FP] + 15 SIZEOF_STRUCT_SPARC_STACKF + SIZEOF_STRUCT_PT_REGS; 16 struct { 17 unsigned int mask; 18 char fpu_save[PERSONALITY_WORDSIZE]; 19 char insns[PERSONALITY_WORDSIZE * 2] ATTRIBUTE_ALIGNED(8); 20 unsigned int extramask[NSIG_BYTES / sizeof(int) - 1]; 21 } frame; 22 23 if (umove(tcp, addr, &frame) < 0) { 24 tprintf("{mask=%#lx}", addr); 25 } else { 26 unsigned int mask[NSIG_BYTES / sizeof(int)]; 27 28 mask[0] = frame.mask; 29 memcpy(mask + 1, frame.extramask, sizeof(frame.extramask)); 30 tprintsigmask_addr("{mask=", mask); 31 tprints("}"); 32 } 33 } 34 35 #undef PERSONALITY_WORDSIZE 36 #undef SIZEOF_STRUCT_PT_REGS 37 #undef SIZEOF_STRUCT_SPARC_STACKF 38