From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nx247.node02.secure-mailgate.com (nx247.node02.secure-mailgate.com [192.162.87.247]) by sourceware.org (Postfix) with ESMTPS id 1685838618D7 for ; Wed, 31 Mar 2021 02:52:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1685838618D7 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 1lRQyX-004hdz-Ii for gdb-patches@sourceware.org; Wed, 31 Mar 2021 04:52:58 +0200 X-SecureMailgate-Identity: host202.checkdomain.de Received: from Trande0001.fritz.box (x4dbe5b1d.dyn.telefonica.de [77.190.91.29]) (Authenticated sender: zied.guermazi@trande.de) by host202.checkdomain.de (Postfix) with ESMTPSA id 0EED02C1806; Wed, 31 Mar 2021 04:52:57 +0200 (CEST) X-SecureMailgate-Identity: host202.checkdomain.de From: Zied Guermazi To: gdb-patches@sourceware.org Cc: Zied Guermazi Subject: [PATCH v3 5/7] fix issue: gdb hangs in the command following a commad returning with TARGET_WAITKIND_NO_HISTORY Date: Wed, 31 Mar 2021 04:52:32 +0200 Message-Id: <20210331025234.518688-6-zied.guermazi@trande.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210331025234.518688-1-zied.guermazi@trande.de> References: <20210331025234.518688-1-zied.guermazi@trande.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-PPP-Message-ID: <20210331025257.3784856.33499@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: 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H/om1Q5bfFmsvt+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=-10.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, 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: Wed, 31 Mar 2021 02:53:06 -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/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