From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EYvDN5K98mq6cD0AWB0awg (envelope-from ) for ; Tue, 10 Nov 2026 01:45:38 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=YvrE7Cm9; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id DDE191E06A; Tue, 10 Nov 2026 01:45:38 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 5C0671E043 for ; Tue, 10 Nov 2026 01:45:38 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5A4A34BA23F0 for ; Tue, 10 Nov 2026 06:45:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5A4A34BA23F0 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=YvrE7Cm9 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by sourceware.org (Postfix) with ESMTPS id AF4DB4BA23D8 for ; Tue, 10 Nov 2026 06:43:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AF4DB4BA23D8 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 AF4DB4BA23D8 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1794293012; cv=none; b=SpzsN7JpUNfGlis4xvnAz5jvuDXxGXAwo/8fNLW7IUDH6FRit/EsY7f/U8FDE61dFxGveqYGeLntb3Xorox3+QpZ/Y3d8IhSl2Ic6jGPXJirF56uO1fDFliPOl9GZS1qhQ5ilAVph30kIs9Qsd0epl3o2C8C1mNAEac72zTacwQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1794293012; c=relaxed/simple; bh=bSbf74pwrh5/7BKuxvUdNuv+PEKaAKO9gRwNlxqeRPM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=dP6KZWWxaonw/CE/li/YhlPeEhCw9BcN3HTiOoVnepeWdzYZJvhP0epeu5MHS5HstmwRY7LTi5txA43la0PJSPGCPLZYpzBGeFWbu0gpEGyQ8omb4ENOoBz1JLTSTJNEdARQoIXwo+cgntUGMykCwspdIhYaIQJbedKsK7Zp8AI= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=YvrE7Cm9 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AF4DB4BA23D8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1794293012; x=1825829012; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=bSbf74pwrh5/7BKuxvUdNuv+PEKaAKO9gRwNlxqeRPM=; b=YvrE7Cm9AsHFlzrJ19R4CYJz3YkEKvTS7rQj3qb148fzcn2jzD26dluu kAX6COEvq7TnWPQRWOSmkEObW/a1wsUJri0faDtwUFjEmzmIMPBURY2Mi gV5vzjbKe4Mds1iyde6gqokI3kAfSyKTtDcsa0mR+k1qQ1fco7Br8dW3q y4FukUJfXzg1YRvAw7IukQz2cak+1Lh5tbEn2F4u/6lk63grrlCsh3Wfh Kue2i21BY1g9MP2i6F3mhZ1WDumWWbJOWdRYBNTPpowm1mV5Y8RPflFE+ Sa6Ahs14k5tL1R+jdMlo/dq/jfwfn/6rIgfykd/6cMd9g5vwXa6xyLd3Z Q==; X-CSE-ConnectionGUID: wt4Ns3uTTOGuwB2MGxtCOA== X-CSE-MsgGUID: 6GUvqwsHS+aC3Azhv5DwmA== X-IronPort-AV: E=McAfee;i="6800,10657,11961"; a="2921406" X-IronPort-AV: E=Sophos;i="6.27,205,1787036400"; d="scan'208";a="2921406" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2026 22:43:31 -0800 X-CSE-ConnectionGUID: F0OccZmTREC+7hlAzHAqug== X-CSE-MsgGUID: BksPdnXtT7+tYKf7sAs9tw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,205,1787036400"; d="scan'208";a="8649341" Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2026 22:43:30 -0800 From: Markus Metzger To: gdb-patches@sourceware.org Subject: [PATCH v1 4/7] gdb, btrace: do not stop recording on close Date: Tue, 10 Nov 2026 07:43:13 +0100 Message-ID: <20261110064317.405487-5-markus.t.metzger@intel.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261110064317.405487-1-markus.t.metzger@intel.com> References: <20261110064317.405487-1-markus.t.metzger@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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~public-inbox=simark.ca@sourceware.org When the record-btrace target is closed, it has already been removed from all inferior target stacks and target_teardown_btrace() would end up in the dummy target and throw an exception (see parent patch). Recording has already been stopped before unpushing the record-btrace target except for disconnect(), where we call clear_btrace_resources() to release branch tracing resources for all threads that are exited when unpushing the remote target. --- gdb/record-btrace.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c index dae243ee2db..cbebb3dbee2 100644 --- a/gdb/record-btrace.c +++ b/gdb/record-btrace.c @@ -453,11 +453,6 @@ record_btrace_target::close () /* Make sure automatic recording gets disabled even if we did not stop recording before closing the record-btrace target. */ record_btrace_auto_disable (); - - /* We should have already stopped recording. - Tear down btrace in case we have not. */ - for (thread_info &tp : current_inferior ()->non_exited_threads ()) - btrace_teardown (&tp); } /* The async method of target record-btrace. */ -- 2.53.0 ________________________________________ Intel Deutschland GmbH Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany Tel: +49 (89) 99143-0 www.intel.de Managing Directors: Candice Moore, Jeffrey Schneiderman, Ramachandran Sitaraman Chairperson of the Supervisory Board: Sonja Pierer Registered Seat: Munich Commercial Register B: Amtsgericht Munich HRB 186928 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.