[0/6] pr gdb/19340

Message ID 20240307132845.2909415-1-markus.t.metzger@intel.com
Headers
Series pr gdb/19340 |

Message

Metzger, Markus T March 7, 2024, 1:28 p.m. UTC
  Fix PR gdb/19340 by stopping replaying the current thread before disabling
recording.

While writing the test for this, I wondered whether it would also work if
there was more than one process and if some were recording while others
were replaying.

It turned out that recording one process while some other process is
replaying doesn't work.  You first have to stop replaying everything
before you can continue recording.  Since btrace is per inferior, this
seems like an unnecessary restriction.

The first patch fixes gdb/pr19340; the rest makes recording work together
with replaying on inferior level.

Markus Metzger (6):
  gdb, btrace: fix pr19340
  gdb, btrace: simplify gdb.btrace/multi-inferior.exp
  gdb, btrace: remove record_btrace_target::supports_*()
  gdb, btrace: set wait status to ignore if nothing is moving
  gdb, infrun: wait for single inferior
  gdb, btrace, infrun: per-inferior run-control

 gdb/infrun.c                                | 39 ++++++++---
 gdb/linux-nat.c                             | 16 +++--
 gdb/record-btrace.c                         | 78 +++++++--------------
 gdb/testsuite/gdb.btrace/multi-inferior.c   | 10 ++-
 gdb/testsuite/gdb.btrace/multi-inferior.exp | 33 ++++-----
 gdb/testsuite/gdb.btrace/step.exp           | 22 ++++--
 6 files changed, 110 insertions(+), 88 deletions(-)