]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
btrace: do not stop replaying or recording while a thread is running
authorMarkus Metzger <markus.t.metzger@intel.com>
Wed, 13 Aug 2025 14:25:27 +0000 (14:25 +0000)
committerMarkus Metzger <markus.t.metzger@intel.com>
Mon, 3 Nov 2025 06:21:11 +0000 (06:21 +0000)
commit92dc62fe6e1f60ca9085ed19876dd4f990cb824f
tree27c5765db4c0abd4fab2571832ebcffeeb18f3ce
parent0b6e72d4c138e9af09201560c2056658e8b0499e
btrace: do not stop replaying or recording while a thread is running

With asynchronous stepping commands, one may start replaying a thread in
the background and then stop recording its inferior in the foreground.

This causes the execution history to be cleared and the record target to
be unpushed while the thread is using said execution history.

I fail to see a use-case for this, so rather than trying to make this
work, I prevent such a scenario by not allowing replaying or recording to
be stopped while a thread is running.

We could do this only when a thread is running in replay mode and preserve
the existing behavior of being able to stop recording while threads are
running in recording mode.  It seems more consistent to not allow this for
both replaying and recording threads, though.
gdb/record-btrace.c
gdb/testsuite/gdb.btrace/enable-running.exp