From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 From: Markus Metzger To: gdb-patches@sourceware.org Cc: pedro@palves.net 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-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Mon, 04 Jul 2022 12:58:17 -0000 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