From: Denys Vlasenko Date: Mon, 14 May 2012 14:40:28 +0000 (+0200) Subject: On clearing "breakpopint", restore syscall number too X-Git-Tag: v4.8~233 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=55980f5b72000406e3fd843b098b5c1328a21e45;p=strace On clearing "breakpopint", restore syscall number too This fixes Fedora bug 659382. Low risk: this code is not supposed to be used on any non-acient kernel. * util.c (clearbpt): Restore syscall number too. Signed-off-by: Denys Vlasenko --- diff --git a/util.c b/util.c index f27acdf6..3975f492 100644 --- a/util.c +++ b/util.c @@ -1512,9 +1512,9 @@ setbpt(struct tcb *tcp) || set_arg0(tcp, &state, new_arg0) < 0 || arg_finish_change(tcp, &state) < 0) return -1; - tcp->flags |= TCB_BPTSET; tcp->inst[0] = tcp->u_arg[arg0_index]; tcp->inst[1] = tcp->u_arg[arg1_index]; + tcp->flags |= TCB_BPTSET; return 0; } @@ -1528,6 +1528,7 @@ clearbpt(struct tcb *tcp) { arg_setup_state state; if (arg_setup(tcp, &state) < 0 + || change_syscall(tcp, tcp->scno) < 0 || restore_arg0(tcp, &state, tcp->inst[0]) < 0 || restore_arg1(tcp, &state, tcp->inst[1]) < 0 || arg_finish_change(tcp, &state))