From c0717e82e34f96af456309b3786a6808e8e324e4 Mon Sep 17 00:00:00 2001 From: huangyan Date: Wed, 16 Apr 2025 00:43:27 +0800 Subject: [PATCH] Revert "linux-user: Print tid not pid with strace" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 2f37362de1d971cc90c35405705bfa22a33f6cd8. * this change is incomplete, "get_task_state" lacks the implementation. * Moreover, it requires all calls to the "getpid" function to be changed to use "get_task_state", it would cause too much disruption,and it has not been applied in the upstream 8.2.0. --- linux-user/strace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index ac9177ebe4..cf26e55264 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -4176,7 +4176,7 @@ print_syscall(CPUArchState *cpu_env, int num, if (!f) { return; } - fprintf(f, "%d ", get_task_state(env_cpu(cpu_env))->ts_tid); + fprintf(f, "%d ", getpid()); for (i = 0; i < nsyscalls; i++) { if (scnames[i].nr == num) { -- Gitee