gdb, btrace: make record-btrace per-inferior
authorMarkus Metzger <markus.t.metzger@intel.com>
Fri, 13 Mar 2020 07:52:49 +0000 (08:52 +0100)
committerMarkus Metzger <markus.t.metzger@intel.com>
Tue, 21 Apr 2020 13:56:23 +0000 (15:56 +0200)
commitd89edf9b811ac3c5643b8a866c238a93f35a5e6c
tree0941899b8eb3ed9cc108c7d55a786cbf58164424
parent5897fd4994effd21cbe951e6d2c417097adea162
gdb, btrace: make record-btrace per-inferior

When there is more than one inferior, the "record btrace" command should
only apply to the current inferior.

gdb/ChangeLog:

2020-03-19  Markus Metzger  <markus.t.metzger@intel.com>

* record-btrace.c (record_btrace_enable_warn): Ignore thread if
its inferior is not recorded by us.
(record_btrace_target_open): Replace call to all_non_exited_threads ()
with call to current_inferior ()->non_exited_threads ().
(record_btrace_target::stop_recording): Likewise.
(record_btrace_target::close): Likewise.
(record_btrace_target::wait): Likewise.
(record_btrace_target::record_stop_replaying): Likewise.

gdb/testsuite/ChangeLog:

2020-03-19  Markus Metzger  <markus.t.metzger@intel.com>

* gdb.btrace/multi-inferior.c: New test.
* gdb.btrace/multi-inferior.exp: New file.
gdb/ChangeLog
gdb/record-btrace.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.btrace/multi-inferior.c [new file with mode: 0644]
gdb/testsuite/gdb.btrace/multi-inferior.exp [new file with mode: 0644]