[binutils-gdb] btrace: do not allow moving running threads with 'record goto'
Markus Metzger
mmetzger@sourceware.org
Mon Nov 3 06:40:45 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9a8c16ee84879c8f1abbc7d9b8f85a27d74288c1
commit 9a8c16ee84879c8f1abbc7d9b8f85a27d74288c1
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Wed Aug 13 14:38:10 2025 +0000
btrace: do not allow moving running threads with 'record goto'
With asynchronous commands, a thread can be replaying in the background
while it is being moved using the 'record goto' command in the foreground.
Do not allow that.
Diff:
---
gdb/record-btrace.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 1534b76de77..6308808f413 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -2847,6 +2847,9 @@ record_btrace_set_replay (struct thread_info *tp,
{
struct btrace_thread_info *btinfo;
+ if (tp->state == THREAD_RUNNING)
+ error (_("You cannot do that while the thread is running."));
+
btinfo = &tp->btrace;
if (it == NULL)
More information about the Gdb-cvs
mailing list