From: Julian Seward Date: Tue, 15 Mar 2005 14:47:30 +0000 (+0000) Subject: Make sys_rt_sigreturn work. X-Git-Tag: svn/VALGRIND_3_0_0~954 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=60aba3e4812f465bf7412e40a06fd20b3a1658d3;p=thirdparty%2Fvalgrind.git Make sys_rt_sigreturn work. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3364 --- diff --git a/coregrind/x86-linux/syscalls.c b/coregrind/x86-linux/syscalls.c index 56a8c31d64..4bd9941dfe 100644 --- a/coregrind/x86-linux/syscalls.c +++ b/coregrind/x86-linux/syscalls.c @@ -579,6 +579,27 @@ PRE(sys_sigreturn, Special) SET_RESULT(RES); } +PRE(sys_rt_sigreturn, Special) +{ + PRINT("rt_sigreturn ( )"); + + /* Adjust esp to point to start of frame; skip back up over handler + ret addr */ + tst->arch.vex.guest_ESP -= sizeof(Addr); + + /* This is only so that the EIP is (might be) useful to report if + something goes wrong in the sigreturn */ + VGA_(restart_syscall)(&tst->arch); + + VGA_(signal_return)(tid, True); + + /* Keep looking for signals until there are none */ + VG_(poll_signals)(tid); + + /* placate return-must-be-set assertion */ + SET_RESULT(RES); +} + PRE(sys_modify_ldt, Special) { PRINT("sys_modify_ldt ( %d, %p, %d )", ARG1,ARG2,ARG3); @@ -1472,7 +1493,7 @@ const struct SyscallTableEntry VGA_(syscall_table)[] = { LINX_(__NR_setresgid, sys_setresgid16), // 170 LINXY(__NR_getresgid, sys_getresgid16), // 171 LINX_(__NR_prctl, sys_prctl), // 172 - // (__NR_rt_sigreturn, sys_rt_sigreturn), // 173 x86/Linux only? + PLAX_(__NR_rt_sigreturn, sys_rt_sigreturn), // 173 x86/Linux only? GENXY(__NR_rt_sigaction, sys_rt_sigaction), // 174 GENXY(__NR_rt_sigprocmask, sys_rt_sigprocmask), // 175