]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.mi/list-thread-groups-no-inferior.exp
Automatic Copyright Year update after running gdb/copyright.py
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.mi / list-thread-groups-no-inferior.exp
1 # Copyright 2018-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 # The purpose of this test is to verify that GDB is able to handle
17 # the "-list-thread-groups --available" command, even when there is
18 # no inferior. In particular, we want to verify that GDB does not
19 # crash.
20
21 load_lib mi-support.exp
22 set MIFLAGS "-i=mi"
23
24 gdb_exit
25 if [mi_gdb_start] {
26 continue
27 }
28
29 # Try the "-list-thread-groups --available". This command can generate
30 # a very large amount of output, potentially exceeding expect's buffer
31 # size. So we consume the output in chunks.
32
33 set test "-list-thread-groups --available"
34 gdb_test_multiple $test $test {
35 -re "\}" {
36 exp_continue
37 }
38 -re "\r\n$gdb_prompt " {
39 pass $test
40 }
41 }
42
43 # Verify that GDB is still alive.
44
45 mi_gdb_test "-data-evaluate-expression 1" \
46 ".*\\^done,value=\"1\"" \
47 "GDB is still alive"