From patchwork Wed Apr 10 07:46:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Metzger, Markus T" X-Patchwork-Id: 88279 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E645F3858CDA for ; Wed, 10 Apr 2024 07:47:37 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by sourceware.org (Postfix) with ESMTPS id 63EBB3858CDA for ; Wed, 10 Apr 2024 07:46:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 63EBB3858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 63EBB3858CDA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712735189; cv=none; b=TGsWLwBvsa6wOiqQKjq1mJe39ECP/LBAwd1zi/ACLiqdNJ1ZVF7KogYdfBusL0CFcEuePrVbHuei13ighWgb365UdFyv/vaKTFwAnk2XEhQBmxhCxD1hO4klArZQuwpNrk9fdX6cylcFtjrOPCRfNxOEwPALoUD+/l3ttwTtppQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712735189; c=relaxed/simple; bh=eLXfKy/jksuFSw0J/gc5M4W+COJlyDu2bFsoXBshYxM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=HHDWxmsd+K9U05/bCV/kl3168kqoS+/FzWV7SYP2tGniD1oLEcaSLVttgAf9WYK6ZJHa3sX3tYw4kzpuor221t98qSqwQlwFVLUcbj6JcOgHuYjHavWq/T86PDilhog8xP6rnrh36OdA+kPD9f9x3y+TJGpx3imna67GfVmDRVI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712735186; x=1744271186; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eLXfKy/jksuFSw0J/gc5M4W+COJlyDu2bFsoXBshYxM=; b=EF389jau1/t2Wrn+6LHDYBMXwpmLew25K7utzr6gi3h6REwj30loQ9X3 DZZMvOd1byEEltSoOu3JjTPs36XTEh9LI8ijRvlT8LO6FKxiCKu6/YsnP d25xL+0fJZy5KWwmiOkXgN/mzKV7Pgh00M1P8TaayHYELjG53yjOYsIH2 ISAIMou0tveF1ZOAB0NxdWQDnlCZDG2G8vR5HM2CsQ8N0+1mMkEb2Jutd 9UJfNcC1y89U/J6HY8RqnAGEfa5jbPr3YCkyUxxY9sNn4IBu+ng4xarLv 0o7E89iCqx4yZf4KRjgp9IR6RNK1b5NOKD+K0idv16C75k4UykAcGeSkL w==; X-CSE-ConnectionGUID: c2C7t83nTmi3MGv0szL6tQ== X-CSE-MsgGUID: 9c248IhmQqqolUFXIj1bXA== X-IronPort-AV: E=McAfee;i="6600,9927,11039"; a="8249788" X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208";a="8249788" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2024 00:46:26 -0700 X-CSE-ConnectionGUID: oKnn37DtTdeb7CUt/aYZOA== X-CSE-MsgGUID: BWFsU6CjRFi28gi5ZF9UzQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208";a="24958959" Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2024 00:46:25 -0700 From: Markus Metzger To: gdb-patches@sourceware.org Cc: pedro@palves.net, Guinevere Larsen Subject: [PATCH v5 3/4] gdb, infrun, record: move no-history notification into normal_stop Date: Wed, 10 Apr 2024 07:46:12 +0000 Message-Id: <20240410074613.54520-4-markus.t.metzger@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240410074613.54520-1-markus.t.metzger@intel.com> References: <20240410074613.54520-1-markus.t.metzger@intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP 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.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Leave calling gdb::observers::no_history.notify to normal_stop based on the last waitstatus. Reviewed-By: Guinevere Larsen --- gdb/infrun.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/infrun.c b/gdb/infrun.c index cda9afc3dfb..d3738ebbd66 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -6573,8 +6573,6 @@ handle_inferior_event (struct execution_control_state *ecs) if (handle_stop_requested (ecs)) return; - interps_notify_no_history (); - /* 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. */ { @@ -9037,7 +9035,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)) { - interps_notify_no_history (); ecs->ws.set_no_history (); set_last_target_status (ecs->target, ecs->ptid, ecs->ws); stop_print_frame = true; @@ -9677,6 +9674,9 @@ normal_stop () if (saved_context.changed ()) return true; + if (last.kind () == TARGET_WAITKIND_NO_HISTORY) + interps_notify_no_history (); + /* Notify observers about the stop. This is where the interpreters print the stop event. */ notify_normal_stop ((inferior_ptid != null_ptid