Automatic date update in version.in
[binutils-gdb.git] / gdb / testsuite / gdb.btrace / multi-inferior.exp
blob6996b182e6517fb6fec02d9103b3d0a0da76bce5
1 # This testcase is part of GDB, the GNU debugger.
3 # Copyright 2020-2024 Free Software Foundation, Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 # Test that recording is per-inferior.
20 # When recording an inferior, threads from other inferiors, both existing
21 # and newly created, are not automatically recorded.
23 # Each inferior can be recorded separately.
25 require allow_btrace_tests
27 require !use_gdb_stub
29 standard_testfile
30 if [prepare_for_testing "failed to prepare" $testfile {} {debug}] {
31     return -1
34 set host_binfile [gdb_remote_download host $binfile]
36 with_test_prefix "inferior 1" {
37     if ![runto_main] {
38         return -1
39     }
42 with_test_prefix "inferior 2" {
43     gdb_test "add-inferior -exec $host_binfile" "Added inferior 2.*" \
44         "add second inferior"
45     gdb_test "inferior 2" "Switching to inferior 2.*"
47     if ![runto_main] {
48         return -1
49     }
51     gdb_test_no_output "record btrace" "record btrace"
54 with_test_prefix "inferior 1" {
55     gdb_test "inferior 1" "Switching to inferior 1.*"
57     gdb_test "info record" "No recording is currently active\\."
58     gdb_test_no_output "record btrace" "record btrace"
61 with_test_prefix "inferior 3" {
62     gdb_test "add-inferior -exec ${host_binfile}" "Added inferior 3.*" \
63         "add third inferior"
64     gdb_test "inferior 3" "Switching to inferior 3.*"
66     if ![runto_main] {
67         return -1
68     }
70     gdb_test "info record" "No recording is currently active\\."
71     gdb_test_no_output "record btrace" "record btrace"