From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nx233.node01.secure-mailgate.com (nx233.node01.secure-mailgate.com [89.22.108.233]) by sourceware.org (Postfix) with ESMTPS id D3415393A414 for ; Mon, 31 May 2021 21:33:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D3415393A414 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=trande.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=zied.guermazi@trande.de Received: from host202.checkdomain.de ([185.137.168.148]) by node01.secure-mailgate.com with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1lnpXP-0047bS-9k; Mon, 31 May 2021 23:33:31 +0200 X-SecureMailgate-Identity: zied.guermazi@trande.de;host202.checkdomain.de Received: from Trande0001.fritz.box (x4dbe295e.dyn.telefonica.de [77.190.41.94]) (Authenticated sender: zied.guermazi@trande.de) by host202.checkdomain.de (Postfix) with ESMTPSA id D3B2C30041B; Mon, 31 May 2021 23:33:29 +0200 (CEST) X-SecureMailgate-Identity: zied.guermazi@trande.de;host202.checkdomain.de From: Zied Guermazi To: gdb-patches@sourceware.org, markus.t.metzger@intel.com Cc: Zied Guermazi Subject: [PATCH v6 5/7] fix issue: gdb hangs in the command following a commad returning with TARGET_WAITKIND_NO_HISTORY Date: Mon, 31 May 2021 23:33:05 +0200 Message-Id: <20210531213307.275079-6-zied.guermazi@trande.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210531213307.275079-1-zied.guermazi@trande.de> References: <20210531213307.275079-1-zied.guermazi@trande.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-PPP-Message-ID: <20210531213330.2006063.2327@host202.checkdomain.de> X-PPP-Vhost: trande.de X-Originating-IP: 185.137.168.148 X-SecureMailgate-Domain: host202.checkdomain.de X-SecureMailgate-Username: 185.137.168.148 Authentication-Results: secure-mailgate.com; auth=pass smtp.auth=185.137.168.148@host202.checkdomain.de X-SecureMailgate-Outgoing-Class: ham X-SecureMailgate-Outgoing-Evidence: Combined (0.03) X-Recommended-Action: accept X-Filter-ID: Pt3MvcO5N4iKaDQ5O6lkdGlMVN6RH8bjRMzItlySaT9xSISgnziEAfyoFTXMElXOPUtbdvnXkggZ 3YnVId/Y5jcf0yeVQAvfjHznO7+bT5xepKJyYLZISh0ScmnJxtOQL++T0fzDkcbraJCnPSgcQrqW ghmgrvbuYBMbgPFqhEjKF590ee3aGyyzch48U9RYPumU89c8OaxcWLmp7ynpEngaSXkxukss0SCh iHeT32jasE0yYSwoSJtDBJTXEF44+qKA9WNimSzzMEEnsLmJnD3bQmEqUddg4pDcHxi62gxzSOZO aYOlkYc6lCBjGxXRtrdIeJGUu23VykQIijZdTKZmzPG0W5jwUw6mKTNN5a5y8oFzlZDzSFMZMCEJ KqX3DU5uCP5D/CUxYBzL65HHiH6YFrhxVw5i30CZMe0+JKoB15eMIME6iZU0/33rc4pTBldNoc4/ ugpbufbubK+x4vA/QHsSr98zh4ylHHSOvF4EizIlMC06U8aFKFbkglvNo7UbuWzwvM5eRjzlfUYD MWFgOK8gW+hazh84oBeMtGGs+REr5it4yuwWmXN5FmKajBUnmlmmmmIH8Dg80WcRp/siHDX/Zpgn R2L6ZSxUhuCgUnzQUUh7zrY+gccQHlvFmt+fzLCFvNtAPKUqO5VGqp8FbbUxmz2UNr7o91bamklX 2ibJH6e7tvxuTzj4jek2E1+Q9DR4YbQGRn/SCFVSMcnBwnfP7vEWuFdTNkRGVKAamUdylUIKhf3z 2GAHxH7I7m5Ql1U6WB7Oyp8ZVIlN1HFCPG6Eq1YcrLPjrmBzYIObfWLVH3SiPu1qa8CuE/M8MKEd ufaL8m6gQSkvm4wf3L1aLYpQ4uMQ4M1NWF9Moe5LK/EpEWHXF0wlhXRz+wFLERWeKKG4PAQYNyav p7c49Jmjya+e1HlyOkEuocxGFr3Cdsnh+vkfJRXP/c4WyRRYKT5OUZsHHeqPR1CC41oa2DqMg3I2 /4x3icqkQJZIg0Mhu1/rdU1t/SWu+yxj6TsAfJahAYOYB0Zdh+duWe2a3Wkka8VTYGVJWPg8hKlu hS42Df6ZF0q735LO15p1JjFBmbIK2Uo19T7lUH3LO9MZQl/R0Vlf0U/hJ2/TL4CJHf9+nBwWhkxc XLTzYUv2yTYYszlVwj1n2JAvHUSGQgae99MGMevVVKNikwLQ0fq/FOv/N1K8VM5vTIIOsiSAznIa Ah0r7Fnp/G6lXvg2pGEA3A== X-Report-Abuse-To: spam@node04.secure-mailgate.com X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 May 2021 21:33:35 -0000 This patch fixes an issue observed with btrace when replaying the execution. The issue was observed on ARMv7 processors. To reproduce the issue, the user needs to replay in forward direction until he reaches the end of history, then replay backwards (e.g a reverse-next) and then replay forwards. GDB hangs and the user can not issue new commands. This fix keeps the same behaviour of gdb as when TARGET_WAITKIND_NO_HISTORY is hit on other architectures. gdb/ChangeLog * infrun.c (set_step_over_info): add debug print. (handle_inferior_event): clear step over info in case TARGET_WAITKIND_NO_HISTORY. --- gdb/infrun.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdb/infrun.c b/gdb/infrun.c index e9624d2a9b6..c52c8505983 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -1311,6 +1311,7 @@ set_step_over_info (const address_space *aspace, CORE_ADDR address, int nonsteppable_watchpoint_p, int thread) { + infrun_debug_printf ("setting step over info"); step_over_info.aspace = aspace; step_over_info.address = address; step_over_info.nonsteppable_watchpoint_p = nonsteppable_watchpoint_p; @@ -5739,7 +5740,7 @@ handle_inferior_event (struct execution_control_state *ecs) delete_just_stopped_threads_single_step_breakpoints (); ecs->event_thread->suspend.stop_pc = regcache_read_pc (get_thread_regcache (inferior_thread ())); - + clear_step_over_info (); if (handle_stop_requested (ecs)) return; -- 2.25.1