]>
Commit | Line | Data |
---|---|---|
b811d2c2 | 1 | # Copyright 1997-2020 Free Software Foundation, Inc. |
45ce1b47 SDJ |
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 | standard_testfile normal.c | |
17 | ||
18 | if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } { | |
19 | return -1 | |
20 | } | |
21 | ||
22 | if { ![runto_main] } { | |
23 | fail "can't run to main" | |
24 | return -1 | |
25 | } | |
26 | ||
27 | gdb_test "info program" "Program stopped at $hex\.\r\nIt stopped at breakpoint $decimal\.\r\nType \"info stack\" or \"info registers\" for more information\." \ | |
28 | "info program after run to main" | |
29 | ||
30 | # We don't really care where this step lands, so long as it gets | |
31 | # the inferior pushed off the breakpoint it's currently on... | |
32 | gdb_test "next" "$decimal\t.*" "step before info program" | |
33 | ||
34 | gdb_test "info program" "Program stopped at $hex\.\r\nIt stopped after being stepped\.\r\nType \"info stack\" or \"info registers\" for more information\." \ | |
35 | "info program after next" | |
36 | ||
37 | if { ![runto_main] } then { | |
38 | fail "can't restart program" | |
39 | return -1 | |
40 | } | |
41 | ||
42 | delete_breakpoints | |
43 | ||
44 | gdb_test "info program" "Program stopped at $hex\.\r\nIt stopped at a breakpoint that has since been deleted\.\r\nType \"info stack\" or \"info registers\" for more information\." \ | |
45 | "info program after deleting all breakpoints" |