From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by sourceware.org (Postfix) with ESMTPS id 2698E3AAA0D7 for ; Thu, 4 Feb 2021 08:11:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2698E3AAA0D7 IronPort-SDR: 3vbVvgyQEbNkirOy70my47qJH0LsakN/mN0AGn02AjgGcjv/g1sl2Y88NLk3yxQEeTS7vBcPuM ylvITUZR4vLQ== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="200178827" X-IronPort-AV: E=Sophos;i="5.79,400,1602572400"; d="scan'208";a="200178827" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2021 00:11:14 -0800 IronPort-SDR: rC+IZ7OKITiqIiqLsKKmeO663MLV8dw2mTXMtn24+NU9jAM6RsnzqdwF7CT8YZi0IcAVMWa9AF gJQ50lEbwbqQ== X-IronPort-AV: E=Sophos;i="5.79,400,1602572400"; d="scan'208";a="372305358" Received: from labpc2407.iul.intel.com (HELO localhost) ([172.28.50.61]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2021 00:11:14 -0800 From: Markus Metzger To: gdb-patches@sourceware.org Subject: [PATCH 2/2] gdb, record: move no-history notification into normal_stop Date: Thu, 4 Feb 2021 09:10:30 +0100 Message-Id: <20210204081037.3712162-5-markus.t.metzger@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210204081037.3712162-1-markus.t.metzger@intel.com> References: <20210204081037.3712162-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.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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: Thu, 04 Feb 2021 08:11:17 -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 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gdb/infrun.c b/gdb/infrun.c index 21513344be1..2de86f80274 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -5542,7 +5542,6 @@ handle_inferior_event (struct execution_control_state *ecs) if (handle_stop_requested (ecs)) return; - gdb::observers::no_history.notify (); stop_waiting (ecs); return; } @@ -7829,7 +7828,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; @@ -8457,6 +8457,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.26.2 Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Gary Kershaw Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928