From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EGTTKw3kwmLx+gsAWB0awg (envelope-from ) for ; Mon, 04 Jul 2022 08:58:53 -0400 Received: by simark.ca (Postfix, from userid 112) id AE7041E22B; Mon, 4 Jul 2022 08:58:53 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=SAVbc490; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 468261E222 for ; Mon, 4 Jul 2022 08:58:53 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EC4D5385C311 for ; Mon, 4 Jul 2022 12:58:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EC4D5385C311 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1656939533; bh=96r9lTu6ZfN8u8QCIVof80sB0n48NXjntrSK5uj+qEo=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=SAVbc490t8twOMAIsyma01kW73bTjkGV615zTLZ0MN8IEtcioWarH+6hnFjnFqX7j xkuCZf0JjsPdbhmV3xtu/P6KHYGxsaoCY4Ns0za1twK5j9124LhYcoRT4G7blCtsds 3hXeKNj3cktN//djmTxv3eeLN/6djZORaTfSN8jY= Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by sourceware.org (Postfix) with ESMTPS id C54C6385BAE0 for ; Mon, 4 Jul 2022 12:58:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C54C6385BAE0 X-IronPort-AV: E=McAfee;i="6400,9594,10397"; a="262916172" X-IronPort-AV: E=Sophos;i="5.92,243,1650956400"; d="scan'208";a="262916172" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2022 05:58:10 -0700 X-IronPort-AV: E=Sophos;i="5.92,243,1650956400"; d="scan'208";a="695322653" Received: from labpc2407.iul.intel.com (HELO localhost) ([172.28.48.175]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2022 05:58:09 -0700 To: gdb-patches@sourceware.org Subject: [PATCH v3 3/4] gdb, infrun, record: move no-history notification into normal_stop Date: Mon, 4 Jul 2022 13:54:06 +0200 Message-Id: <20220704115407.1239498-4-markus.t.metzger@intel.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220704115407.1239498-1-markus.t.metzger@intel.com> References: <20220704115407.1239498-1-markus.t.metzger@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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: , From: Markus Metzger via Gdb-patches Reply-To: Markus Metzger Cc: pedro@palves.net Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Leave calling gdb::observers::no_history.notify to normal_stop based on the last waitstatus. --- gdb/infrun.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/infrun.c b/gdb/infrun.c index 3fa262efb01..2e42d3663a7 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -5875,8 +5875,6 @@ handle_inferior_event (struct execution_control_state *ecs) if (handle_stop_requested (ecs)) return; - gdb::observers::no_history.notify (); - /* Cancel an in-flight step-over. It will not succeed since we won't be able to step at the end of the execution history. */ { @@ -8184,7 +8182,6 @@ keep_going_pass_signal (struct execution_control_state *ecs) if (ecs->event_thread->control.is_replaying && !target_record_is_replaying (ecs->event_thread->ptid)) { - gdb::observers::no_history.notify (); ecs->ws.set_no_history (); set_last_target_status (ecs->target, ecs->ptid, ecs->ws); stop_print_frame = true; @@ -8808,6 +8805,9 @@ normal_stop (void) if (saved_context.changed ()) return 1; + if (last.kind () == TARGET_WAITKIND_NO_HISTORY) + gdb::observers::no_history.notify (); + /* Notify observers about the stop. This is where the interpreters print the stop event. */ if (inferior_ptid != null_ptid) -- 2.35.3 Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928