From fe64f96ac09bfc97b6554816a19ae1fe138f1cae Mon Sep 17 00:00:00 2001
From: Eugene Syromyatnikov <evgsyr@gmail.com>
Date: Sun, 10 Feb 2019 19:49:46 +0100
Subject: [PATCH 224/293] Make inline message on failed restart attempt more
 verbose

Hopefully, now it is less confusing.

* strace.c (ptrace_restart): Provide intent and pid in the inline error
message.

References: https://bugzilla.redhat.com/show_bug.cgi?id=1662936
---
 strace.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/strace.c b/strace.c
index 6413297..246eb0c 100644
--- a/strace.c
+++ b/strace.c
@@ -382,7 +382,8 @@ ptrace_restart(const unsigned int op, struct tcb *const tcp, unsigned int sig)
 	 * but before we tried to restart it. Log looks ugly.
 	 */
 	if (current_tcp && current_tcp->curcol != 0) {
-		tprintf(" <ptrace(%s):%s>\n", msg, strerror(err));
+		tprintf(" <Cannot restart pid %d with ptrace(%s): %s>\n",
+			tcp->pid, msg, strerror(err));
 		line_ended();
 	}
 	if (err == ESRCH)
-- 
1.7.12.4

