From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by sourceware.org (Postfix) with ESMTPS id 4A489385C409 for ; Thu, 2 Dec 2021 07:25:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4A489385C409 X-IronPort-AV: E=McAfee;i="6200,9189,10185"; a="235379141" X-IronPort-AV: E=Sophos;i="5.87,281,1631602800"; d="scan'208";a="235379141" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2021 23:25:29 -0800 X-IronPort-AV: E=Sophos;i="5.87,281,1631602800"; d="scan'208";a="677564255" Received: from labpc2407.iul.intel.com (HELO localhost) ([172.28.50.61]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2021 23:25:28 -0800 From: Markus Metzger To: gdb-patches@sourceware.org Subject: [PATCH v2 3/4] gdb, infrun, record: move no-history notification into normal_stop Date: Thu, 2 Dec 2021 08:23:19 +0100 Message-Id: <20211202072320.3048100-4-markus.t.metzger@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211202072320.3048100-1-markus.t.metzger@intel.com> References: <20211202072320.3048100-1-markus.t.metzger@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 02 Dec 2021 07:25:32 -0000 Leave calling gdb::observers::no_history.notify to normal_stop based on the last waitstatus. gdb/ChangeLog: 2021-01-15 Markus Metzger * infrun.c (handle_inferior_event): Remove no-history notification. (keep_going_pass_signal): Likewise. Set last waitstatus. (normal_stop): Notify no-history observers. --- gdb/infrun.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/infrun.c b/gdb/infrun.c index 52a01bcd5dd..cb7baa07c7c 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -5706,8 +5706,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. */ finish_step_over (ecs); @@ -7993,7 +7991,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; @@ -8620,6 +8617,9 @@ normal_stop (void) 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.31.1 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