From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by sourceware.org (Postfix) with ESMTPS id 30F683851C26 for ; Tue, 16 Mar 2021 09:35:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 30F683851C26 IronPort-SDR: gUtAadz7Vn14EFatIXvuAGO2QVJtAGUNNj5zNY7HupT34Sjly9g3VbfgKeoullFtB1G/Qe4qeH Sc0v0UMOZ70Q== X-IronPort-AV: E=McAfee;i="6000,8403,9924"; a="188589361" X-IronPort-AV: E=Sophos;i="5.81,251,1610438400"; d="scan'208";a="188589361" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2021 02:35:13 -0700 IronPort-SDR: 1CRtct011TVPaBMrgLZJcfSu6Zxg1SuXnpnjuouBY1ihQrV4UYa8mJ/WK8tQGw3HmAbpVv6gEU viEWHC5YrXhg== X-IronPort-AV: E=Sophos;i="5.81,251,1610438400"; d="scan'208";a="605193585" Received: from labpc2407.iul.intel.com (HELO localhost) ([172.28.50.61]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2021 02:35:12 -0700 From: Markus Metzger To: gdb-patches@sourceware.org Subject: [PATCH 3/4] gdb, infrun, record: move no-history notification into normal_stop Date: Tue, 16 Mar 2021 10:35:00 +0100 Message-Id: <20210316093501.936148-4-markus.t.metzger@intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210316093501.936148-1-markus.t.metzger@intel.com> References: <20210316093501.936148-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=-9.6 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: Tue, 16 Mar 2021 09:35:15 -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 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gdb/infrun.c b/gdb/infrun.c index e79094ad2b2..81e31cf0019 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -5544,8 +5544,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); @@ -7835,7 +7833,8 @@ 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.kind = TARGET_WAITKIND_NO_HISTORY; + target_last_waitstatus = ecs->ws; stop_waiting (ecs); normal_stop (); return; @@ -8463,6 +8462,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.29.2 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