]>
Commit | Line | Data |
---|---|---|
21e051b3 TBA |
1 | # This testcase is part of GDB, the GNU debugger. |
2 | ||
1d506c26 | 3 | # Copyright 2020-2024 Free Software Foundation, Inc. |
21e051b3 TBA |
4 | |
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. | |
9 | # | |
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. | |
14 | # | |
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/>. | |
17 | ||
18 | # Test that breakpoint commands are taken into account when the | |
19 | # debuggee program is executed with a "run" command given through the | |
20 | # '-ex' option. | |
21 | ||
22 | standard_testfile | |
23 | ||
24 | if {[build_executable "failed to prepare" $testfile $srcfile]} { | |
25 | return -1 | |
26 | } | |
27 | ||
28 | set script_file $srcdir/$subdir/$testfile.gdb | |
29 | ||
30 | save_vars { GDBFLAGS } { | |
31 | append GDBFLAGS " -x ${script_file}" | |
32 | append GDBFLAGS " -ex run" | |
33 | append GDBFLAGS " --args ${binfile}" | |
34 | ||
35 | gdb_exit | |
36 | if {[gdb_spawn] != 0} { | |
37 | fail "spawn gdb" | |
38 | return -1 | |
39 | } | |
40 | } | |
41 | ||
42 | gdb_test_multiple "" "execute bp commands" { | |
43 | -re " = 123\r\n$gdb_prompt $" { | |
44 | pass $gdb_test_name | |
45 | } | |
46 | -re "Don't know how to run.*$gdb_prompt $" { | |
47 | unsupported $gdb_test_name | |
48 | } | |
49 | } |