Blob Blame History Raw
From 38a060e855568e2990affd5cd37aeda372f79c33 Mon Sep 17 00:00:00 2001
From: Eugene Syromyatnikov <evgsyr@gmail.com>
Date: Sun, 10 Feb 2019 19:49:46 +0100
Subject: [PATCH 20/27] 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 7fe6548..f2aa846 100644
--- a/strace.c
+++ b/strace.c
@@ -380,7 +380,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)
-- 
2.1.4