From patchwork Wed Sep 28 20:27:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 12992921 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2CF8BC04A95 for ; Wed, 28 Sep 2022 20:54:10 +0000 (UTC) Received: from localhost ([::1]:57538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ode4H-0006vZ-9A for qemu-devel@archiver.kernel.org; Wed, 28 Sep 2022 16:54:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odden-00083z-JL for qemu-devel@nongnu.org; Wed, 28 Sep 2022 16:27:49 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:59753) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oddek-0006OR-De for qemu-devel@nongnu.org; Wed, 28 Sep 2022 16:27:49 -0400 Received: from quad ([82.142.8.70]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Mo73N-1p2Uw237Nb-00pa8B; Wed, 28 Sep 2022 22:27:41 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Cc: Helge Deller , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 06/37] linux-user: Log failing executable in EXCP_DUMP() Date: Wed, 28 Sep 2022 22:27:06 +0200 Message-Id: <20220928202737.793171-7-laurent@vivier.eu> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220928202737.793171-1-laurent@vivier.eu> References: <20220928202737.793171-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:QKz51L2dLExlrD4+UolF2jfX3cQlIVLYiM6BW3rURTH7pyrI0P1 pLe7m94cJGbj65rLd0xfM8xAHyL6nalSztk6Mcg44yexOiUPlWtHaNRDYGQM4ncd0rAKnSM dR9uOFuPZWf2ywvO/5SwXptbQ7frOD2Ezr1IOKYDIqAClYvMj7DndMnpYJkb1OAMHp7A7Om vXEaBpQML+jzPajwj7Waw== X-UI-Out-Filterresults: notjunk:1;V03:K0:jORduZTM7Bc=:CzXuDWFUWrNDok1SUZbNb0 EOH5HKiwAWD7h2rhKbNN4I3VsFIszGSAh0na3uwTMGxc2g23jlbY8YTmXnbhN9D6CV/yCF29f FFB/5zOIFQZZW6p1luTFMdzkOj/7eX/nLCrj7YV1cxq23Rev4p49Lm3SEbmmctxdqqlZ3hWFw EzWTCsDbL5ssMvJOaUrQYwepjJsRdMqlP/B3SrhsCWg697+VGKBcPdiTJAR5JQOF0tyvBOj95 nQjBDrXZVfVh2YVjloUkw9mJI3ZVPlg8iAMnC3Yj+Nqo3maOdVo9DtIl8rh0x6RCOTMAKqnoP Yni8isnXZIyBqiONqsmskbrmSXmkJ6n1TEJPhPz/oMt4RGyp/rCacR+kObrbgXVFSFrOS7cTH V0TlVo9BTF/YrZGT13Xpyzn7Ncs8tesyEd2QEDtoGtWtWU8oMDWj2rZsYHHy9m+jk2TCBtv6X yFayoUuWNAqVr/MEP9/catYLx76r5AclNPAZxFXiQBnqOnL6MHZ8y4rQI4ZU65WO2DmspsTlu UydoYpxbpFk65D5Uxe1kQ6l9hlu/AD+r7zM08ALDC48j8OYw3qXgKpFSom2Z5ZWsLwdwAmCMO jjnLO8La0Gi/KN5ekHKaYuOY5U7yuxzlQrwtE/swWYq8RnEXW5WdwnE8eReA6cB1uySaFQmxP t1urOLM0vEOkKHmE89fAIi+Lv4bHBe1iLYjhqRsaiB2yNBnqd1BgNI85WMaeCa1oPOqkPCuj1 T3dDT8H2OYssSrc5g09wx0vWvXzKVY6Foj0c/GMlUhkXPDJenVzPJ9brP0negcsy5J4kWSGiS erfCmPu Received-SPF: none client-ip=217.72.192.75; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Helge Deller Enhance the EXCP_DUMP() macro to print out the failing program too. During debugging it's sometimes hard to track down the actual failing program if you are e.g. building a whole debian package. Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220918194555.83535-5-deller@gmx.de> Signed-off-by: Laurent Vivier --- linux-user/cpu_loop-common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/cpu_loop-common.h b/linux-user/cpu_loop-common.h index dc0042e4de35..36ff5b14f2a7 100644 --- a/linux-user/cpu_loop-common.h +++ b/linux-user/cpu_loop-common.h @@ -27,9 +27,11 @@ do { \ CPUState *cs = env_cpu(env); \ fprintf(stderr, fmt , ## __VA_ARGS__); \ + fprintf(stderr, "Failing executable: %s\n", exec_path); \ cpu_dump_state(cs, stderr, 0); \ if (qemu_log_separate()) { \ qemu_log(fmt, ## __VA_ARGS__); \ + qemu_log("Failing executable: %s\n", exec_path); \ log_cpu_state(cs, 0); \ } \ } while (0)