* Arguments to signal handler:
*
* a0 = signal number
- * a1 = 0 (should be cause)
+ * a1 = pointer to siginfo_t
* a2 = pointer to ucontext
*
* $25 and c0_epc point to the signal handler, $29 points to
tst = VG_(get_ThreadState)(tid);
frame = (struct rt_sigframe *)(Addr)tst->arch.vex.guest_r29;
priv1 = &frame->priv;
+ vg_assert(priv1->magicPI == 0x31415927);
ucp = &frame->rs_uc;
+ tst->sig_mask = ucp->uc_sigmask;
+ tst->tmp_sig_mask = ucp->uc_sigmask;
mc = &ucp->uc_mcontext;
- vg_assert(priv1->magicPI == 0x31415927);
tst->arch.vex.guest_r1 = mc->sc_regs[1];
tst->arch.vex.guest_r2 = mc->sc_regs[2];
tst->arch.vex.guest_r3 = mc->sc_regs[3];
PRE(sys_rt_sigreturn)
{
+ ThreadState* tst;
PRINT ("rt_sigreturn ( )");
vg_assert (VG_ (is_valid_tid) (tid));
vg_assert (tid >= 1 && tid < VG_N_THREADS);
vg_assert (VG_ (is_running_thread) (tid));
+
+ tst = VG_(get_ThreadState)(tid);
+
+ ML_(fixup_guest_state_to_restart_syscall)(&tst->arch);
+
/* Restore register state from frame and remove it */
VG_ (sigframe_destroy) (tid, True);
/* Tell the driver not to update the guest state with the "result",
.global VG_(nanomips_linux_SUBST_FOR_rt_sigreturn)
VG_(nanomips_linux_SUBST_FOR_rt_sigreturn):
- li $t4,__NR_rt_sigreturn
- syscall 1
+ li $t4, __NR_rt_sigreturn
+ syscall[32]
.long 0
.global VG_(nanomips_linux_REDIR_FOR_index)