From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8X91FVa98mpZcD0AWB0awg (envelope-from ) for ; Tue, 10 Nov 2026 01:44: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=NrZVlUs6; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 52BC01E06A; Tue, 10 Nov 2026 01:44: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=-3.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,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 9546B1E043 for ; Tue, 10 Nov 2026 01:44:37 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 289014BA7980 for ; Tue, 10 Nov 2026 06:44:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 289014BA7980 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=NrZVlUs6 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by sourceware.org (Postfix) with ESMTPS id 542A64BA23DF for ; Tue, 10 Nov 2026 06:43:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 542A64BA23DF 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 542A64BA23DF 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=1794293018; cv=none; b=vLW3RxSlUai/uuySEM4ELbubga57AUzyPmBffpj9jdYK5CEyr2DnOuPLmyPob5/XGKfCZqD7aHCqNuUIxgbR80mlreG6D8NS12jb3V0jSKbpp2bai7nLWY+LGxZbuMpprmNKtFv2+7nFmDnknVwnXW37MoDP1904g8CNNY5i0yg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1794293018; c=relaxed/simple; bh=vcCDAejuFVobY3ELfPOmnmKkYLFljeY8/2DBLc5Sywk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ZpVbJDrOlJEhhv6CMNNgAG8Xr3rR2AmZa1QaLnyp30JRwEJyqedULLQnRfhtLAl84zcroiE0yrqx74lhHwlva8wbJbFFzlHi9DZ1iqYeSjIfH7pZzf6NicMT5Z4JfVsTMaxmUeVKBtn4++qjn5b5Kng/LIr2yrls2notZ8pmd2c= 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=NrZVlUs6 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 542A64BA23DF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1794293018; x=1825829018; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=vcCDAejuFVobY3ELfPOmnmKkYLFljeY8/2DBLc5Sywk=; b=NrZVlUs6FQIbfjB8+9+wgjw4byzRQu9kLOOb5TOqi6sag0yYIkv6puRe tQUZshxC6t6L1eGZMqkiDEbz22DwjmQzPscDhU4sPkWTfD40fQHDGNYkr JaBcQG0e99o+rR+V8tOC5NSxG2Be3X5J9bJJbHxnaXXD9b0/HDs2x6UY1 Y4Jd+UIg8LSTasUtT+Iz4HF8bzh91IG7ogDpFMhVwJ/o1yW8NXbVuC/bO FGq9iM9XS9oOmoTWY805fPPfLc/KxNKlw/BmPhCxY7/kxUqKFO4z6C8ZB yBOXNUOikspefoUUDRmCo25n3PyIjN2j2x3EQzblJlGx/F5urLqPycjYo g==; X-CSE-ConnectionGUID: Goev1uBDTv2lUn4XO3aDjA== X-CSE-MsgGUID: 1AsfhAO8Q06O5Lo5b5Lvcw== X-IronPort-AV: E=McAfee;i="6800,10657,11961"; a="2921420" X-IronPort-AV: E=Sophos;i="6.27,205,1787036400"; d="scan'208";a="2921420" 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:36 -0800 X-CSE-ConnectionGUID: 2HMf3y5HTjqf2TaVgDu6pA== X-CSE-MsgGUID: Iq+aJ0QpRtSE4AYd83sfug== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,205,1787036400"; d="scan'208";a="8649356" 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:36 -0800 From: Markus Metzger To: gdb-patches@sourceware.org Subject: [PATCH v1 6/7] gdb, btrace: remove the teardown_btrace() target method Date: Tue, 10 Nov 2026 07:43:15 +0100 Message-ID: <20261110064317.405487-7-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 The teardown_btrace() target method is no longer used. Remove it. --- gdb/remote.c | 11 ----------- gdb/target-delegates-gen.c | 24 ------------------------ gdb/target.c | 8 -------- gdb/target.h | 10 ---------- gdb/x86-linux-nat.c | 9 --------- gdb/x86-linux-nat.h | 1 - 6 files changed, 63 deletions(-) diff --git a/gdb/remote.c b/gdb/remote.c index a728d57df6e..38e0802a68a 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -1228,8 +1228,6 @@ class remote_target : public process_stratum_target void disable_btrace (struct btrace_target_info *tinfo) override; - void teardown_btrace (struct btrace_target_info *tinfo) override; - enum btrace_error read_btrace (struct btrace_data *data, struct btrace_target_info *btinfo, enum btrace_read_type type) override; @@ -15708,15 +15706,6 @@ remote_target::disable_btrace (struct btrace_target_info *tinfo) delete tinfo; } -/* Teardown branch tracing. */ - -void -remote_target::teardown_btrace (struct btrace_target_info *tinfo) -{ - /* We must not talk to the target during teardown. */ - delete tinfo; -} - /* Read the branch trace. */ enum btrace_error diff --git a/gdb/target-delegates-gen.c b/gdb/target-delegates-gen.c index b39fd7cb33a..2ef0ae503ef 100644 --- a/gdb/target-delegates-gen.c +++ b/gdb/target-delegates-gen.c @@ -168,7 +168,6 @@ struct dummy_target : public target_ops bool can_use_agent () override; struct btrace_target_info *enable_btrace (thread_info *arg0, const struct btrace_config *arg1) override; void disable_btrace (struct btrace_target_info *arg0) override; - void teardown_btrace (struct btrace_target_info *arg0) override; enum btrace_error read_btrace (struct btrace_data *arg0, struct btrace_target_info *arg1, enum btrace_read_type arg2) override; const struct btrace_config *btrace_conf (const struct btrace_target_info *arg0) override; enum record_method record_method (ptid_t arg0) override; @@ -349,7 +348,6 @@ struct debug_target : public target_ops bool can_use_agent () override; struct btrace_target_info *enable_btrace (thread_info *arg0, const struct btrace_config *arg1) override; void disable_btrace (struct btrace_target_info *arg0) override; - void teardown_btrace (struct btrace_target_info *arg0) override; enum btrace_error read_btrace (struct btrace_data *arg0, struct btrace_target_info *arg1, enum btrace_read_type arg2) override; const struct btrace_config *btrace_conf (const struct btrace_target_info *arg0) override; enum record_method record_method (ptid_t arg0) override; @@ -3693,28 +3691,6 @@ debug_target::disable_btrace (struct btrace_target_info *arg0) target_debug_print_btrace_target_info_p (arg0).c_str ()); } -void -target_ops::teardown_btrace (struct btrace_target_info *arg0) -{ - this->beneath ()->teardown_btrace (arg0); -} - -void -dummy_target::teardown_btrace (struct btrace_target_info *arg0) -{ - tcomplain (); -} - -void -debug_target::teardown_btrace (struct btrace_target_info *arg0) -{ - target_debug_printf_nofunc ("-> %s->teardown_btrace (...)", this->beneath ()->shortname ()); - this->beneath ()->teardown_btrace (arg0); - target_debug_printf_nofunc ("<- %s->teardown_btrace (%s)", - this->beneath ()->shortname (), - target_debug_print_btrace_target_info_p (arg0).c_str ()); -} - enum btrace_error target_ops::read_btrace (struct btrace_data *arg0, struct btrace_target_info *arg1, enum btrace_read_type arg2) { diff --git a/gdb/target.c b/gdb/target.c index 56a5f78c4c0..10f24d954fa 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -4051,14 +4051,6 @@ target_disable_btrace (struct btrace_target_info *btinfo) /* See target.h. */ -void -target_teardown_btrace (struct btrace_target_info *btinfo) -{ - current_inferior ()->top_target ()->teardown_btrace (btinfo); -} - -/* See target.h. */ - enum btrace_error target_read_btrace (struct btrace_data *btrace, struct btrace_target_info *btinfo, diff --git a/gdb/target.h b/gdb/target.h index 38bdc68f6a3..3df31199feb 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -1208,13 +1208,6 @@ struct target_ops virtual void disable_btrace (struct btrace_target_info *tinfo) TARGET_DEFAULT_NORETURN (tcomplain ()); - /* Disable branch tracing and deallocate TINFO. This function is similar - to to_disable_btrace, except that it is called during teardown and is - only allowed to perform actions that are safe. A counter-example would - be attempting to talk to a remote target. */ - virtual void teardown_btrace (struct btrace_target_info *tinfo) - TARGET_DEFAULT_NORETURN (tcomplain ()); - /* Read branch trace data for the thread indicated by BTINFO into DATA. DATA is cleared before new trace is added. */ virtual enum btrace_error read_btrace (struct btrace_data *data, @@ -2618,9 +2611,6 @@ extern struct btrace_target_info * /* See to_disable_btrace in struct target_ops. */ extern void target_disable_btrace (struct btrace_target_info *btinfo); -/* See to_teardown_btrace in struct target_ops. */ -extern void target_teardown_btrace (struct btrace_target_info *btinfo); - /* See to_read_btrace in struct target_ops. */ extern enum btrace_error target_read_btrace (struct btrace_data *, struct btrace_target_info *, diff --git a/gdb/x86-linux-nat.c b/gdb/x86-linux-nat.c index 9c49b3bed47..9fe8afe98f3 100644 --- a/gdb/x86-linux-nat.c +++ b/gdb/x86-linux-nat.c @@ -146,15 +146,6 @@ x86_linux_nat_target::disable_btrace (struct btrace_target_info *tinfo) error (_("Could not disable branch tracing.")); } -/* Teardown branch tracing. */ - -void -x86_linux_nat_target::teardown_btrace (struct btrace_target_info *tinfo) -{ - /* Ignore errors. */ - linux_disable_btrace (tinfo); -} - enum btrace_error x86_linux_nat_target::read_btrace (struct btrace_data *data, struct btrace_target_info *btinfo, diff --git a/gdb/x86-linux-nat.h b/gdb/x86-linux-nat.h index 61d534a3adf..10c44416bf8 100644 --- a/gdb/x86-linux-nat.h +++ b/gdb/x86-linux-nat.h @@ -37,7 +37,6 @@ struct x86_linux_nat_target : public x86_nat_target struct btrace_target_info *enable_btrace (thread_info *tp, const struct btrace_config *conf) override; void disable_btrace (struct btrace_target_info *tinfo) override; - void teardown_btrace (struct btrace_target_info *tinfo) override; enum btrace_error read_btrace (struct btrace_data *data, struct btrace_target_info *btinfo, enum btrace_read_type type) override; -- 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.