From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nx244.node02.secure-mailgate.com (nx244.node02.secure-mailgate.com [192.162.87.244]) by sourceware.org (Postfix) with ESMTPS id 98F38384B406 for ; Thu, 11 Mar 2021 02:51:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 98F38384B406 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 node02.secure-mailgate.com with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1lKBPl-00BFn2-2a for gdb-patches@sourceware.org; Thu, 11 Mar 2021 03:51:05 +0100 X-SecureMailgate-Identity: host202.checkdomain.de Received: from Trande0001.fritz.box (x4db421df.dyn.telefonica.de [77.180.33.223]) (Authenticated sender: zied.guermazi@trande.de) by host202.checkdomain.de (Postfix) with ESMTPSA id 80DAF2A0B1C; Thu, 11 Mar 2021 03:51:04 +0100 (CET) X-SecureMailgate-Identity: host202.checkdomain.de From: Zied Guermazi To: gdb-patches@sourceware.org Cc: Zied Guermazi Subject: [PATCH v2 5/8] fix issue: gdb hangs in the command following a commad returning with TARGET_WAITKIND_NO_HISTORY Date: Thu, 11 Mar 2021 03:50:36 +0100 Message-Id: <20210311025039.57112-6-zied.guermazi@trande.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210311025039.57112-1-zied.guermazi@trande.de> References: <20210311025039.57112-1-zied.guermazi@trande.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-PPP-Message-ID: <20210311025104.3192086.8451@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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fFmsvt+9xZNiurJd4Yaqfb/08I7T4JveQXzz6X1UF1PxiyS9jcqrLDn7GLuL R/D4pTpxobFuL+e0fy34oD/dFk2QXR0pcnE0axI2jIHIygW3/AVBWvF+WByBawaHTiVQQhQ3cXtT qZg6zYv+9efs9Nqx2AbbYAO73tfvTX/QeA== X-Report-Abuse-To: spam@node04.secure-mailgate.com X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, 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: Thu, 11 Mar 2021 02:51:10 -0000 This patch fixes an issue observed with btrace when replaying the execution. The issue was observed on ARMv7 processors. To reproduce the issue 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. 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/ChangeLog | 6 ++++++ gdb/infrun.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d22ec8b5976..d4ed6fe0255 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2021-02-25 Zied Guermazi + + * infrun.c (set_step_over_info): add debug print. + (handle_inferior_event): clear step over info + in case TARGET_WAITKIND_NO_HISTORY + 2021-02-25 Zied Guermazi * nat/linux-btrace.h (btrace_tinfo_etm): New. diff --git a/gdb/infrun.c b/gdb/infrun.c index a271220b261..9c2522376f2 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -1308,6 +1308,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; @@ -5536,7 +5537,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