From: Markus Metzger <markus.t.metzger@intel.com>
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 [thread overview]
Message-ID: <20261110064317.405487-5-markus.t.metzger@intel.com> (raw)
In-Reply-To: <20261110064317.405487-1-markus.t.metzger@intel.com>
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.
next prev parent reply other threads:[~2026-11-10 6:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 6:43 [PATCH v1 0/7] gdb, btrace: fix unexpected core file Markus Metzger
2026-11-10 6:43 ` [PATCH v1 1/7] gdb, btrace: add clear_btrace_resources() Markus Metzger
2026-11-10 6:43 ` [PATCH v1 2/7] gdb, btrace: disable tracing in linux_btrace_target_info dtor Markus Metzger
2026-11-10 6:43 ` [PATCH v1 3/7] gdb, btrace: do not use btrace_teardown() for an exited thread Markus Metzger
2026-11-10 6:43 ` Markus Metzger [this message]
2026-11-10 6:43 ` [PATCH v1 5/7] gdb, btrace: remove btrace_teardown() Markus Metzger
2026-11-10 6:43 ` [PATCH v1 6/7] gdb, btrace: remove the teardown_btrace() target method Markus Metzger
2026-11-10 6:43 ` [PATCH v1 7/7] gdb, btrace: remove the disconnect() record-btrace " Markus Metzger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261110064317.405487-5-markus.t.metzger@intel.com \
--to=markus.t.metzger@intel.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox