Automatic Copyright Year update after running gdb/copyright.py
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.multi / info-threads.exp
1 # Copyright 2009-2022 Free Software Foundation, Inc.
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 # Regression test for PR threads/19354. If you have a threaded
17 # inferior running (thread_db must be loaded), switch to another
18 # inferior, one that is NOT running yet, and do "info threads", you
19 # would get back an error.
20
21 standard_testfile hello.c
22
23 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {pthreads debug}] } {
24 return -1
25 }
26
27 clean_restart ${testfile}
28
29 if { ![runto_main] } then {
30 return -1
31 }
32
33 # Add another inferior.
34 gdb_test "add-inferior" "Added inferior 2.*" "add empty inferior 2"
35 gdb_test "inferior 2" "Switching to inferior 2.*" "switch to inferior 2"
36
37 # "info threads" while inferior 1 has execution and inferior 2 is not
38 # running yet should show inferior 1's thread, and give no error.
39 gdb_test "info threads" "1\.1 .* main .* at .*$srcfile:.*No selected thread.*"
This page took 0.032436 seconds and 4 git commands to generate.