]>
Commit | Line | Data |
---|---|---|
1d506c26 | 1 | # Copyright 2013-2024 Free Software Foundation, Inc. |
5713b9b5 JB |
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... | |
8ce7423f | 22 | require !use_gdb_stub |
5713b9b5 | 23 | |
5713b9b5 JB |
24 | standard_testfile mi-start.c |
25 | ||
26 | if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { | |
27 | untested "could not build mi-start" | |
28 | return -1 | |
29 | } | |
30 | ||
3ad2b4af TT |
31 | if {[mi_clean_restart $binfile]} { |
32 | return | |
33 | } | |
5713b9b5 | 34 | |
72bfa06c JB |
35 | # First, verify that the debugger correctly advertises support |
36 | # for the --start option of the -exec-run command. | |
37 | mi_gdb_test "-list-features" \ | |
38 | "\\^done,features=\\\[.*\"exec-run-start-option\".*\\\]" \ | |
39 | "-list-features includes \"exec-run-start-option\"" | |
40 | ||
5713b9b5 JB |
41 | mi_run_cmd "--start" |
42 | mi_expect_stop "breakpoint-hit" "main" "" ".*mi-start.c" "$decimal" \ | |
43 | { "" "disp=\"del\"" } "run to main" | |
44 |