]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.mi/mi-start.exp
GDB copyright headers update after running GDB's copyright.py script.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.mi / mi-start.exp
1 # Copyright 2013-2016 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 load_lib mi-support.exp
17 set MIFLAGS "-i=mi"
18
19 # The purpose of this testcase is to test the --start option of
20 # the -exec-run command. If we cannot use the -exec-run command,
21 # then there is no point in running this testcase...
22 if [target_info exists use_gdb_stub] {
23 untested "cannot use -exec-run command"
24 return -1
25 }
26
27 gdb_exit
28 if [mi_gdb_start] {
29 continue
30 }
31
32 standard_testfile mi-start.c
33
34 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
35 untested "could not build mi-start"
36 return -1
37 }
38
39 mi_delete_breakpoints
40 mi_gdb_reinitialize_dir $srcdir/$subdir
41 mi_gdb_reinitialize_dir $srcdir/$subdir
42 mi_gdb_load ${binfile}
43
44 # First, verify that the debugger correctly advertises support
45 # for the --start option of the -exec-run command.
46 mi_gdb_test "-list-features" \
47 "\\^done,features=\\\[.*\"exec-run-start-option\".*\\\]" \
48 "-list-features includes \"exec-run-start-option\""
49
50 mi_run_cmd "--start"
51 mi_expect_stop "breakpoint-hit" "main" "" ".*mi-start.c" "$decimal" \
52 { "" "disp=\"del\"" } "run to main"
53