]>
Commit | Line | Data |
---|---|---|
1e620590 TBA |
1 | # Copyright 2020 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 | # Test defining bad conditions for breakpoints. | |
17 | ||
18 | standard_testfile | |
19 | ||
20 | if {[prepare_for_testing "failed to prepare" ${binfile} ${srcfile}]} { | |
21 | return | |
22 | } | |
23 | ||
24 | set bp_location [gdb_get_line_number "break-here"] | |
25 | gdb_breakpoint "$bp_location" | |
26 | set bpnum [get_integer_valueof "\$bpnum" 0 "get bpnum"] | |
27 | ||
28 | # Define a 'bad' condition. The breakpoint should stay unconditional. | |
29 | gdb_test "cond $bpnum gibberish" \ | |
30 | "No symbol \"gibberish\" in current context." \ | |
31 | "attempt a bad condition" | |
32 | ||
33 | set fill "\[^\r\n\]*" | |
34 | ||
35 | gdb_test "info break" \ | |
36 | [multi_line \ | |
37 | "Num${fill}What" \ | |
38 | "${decimal}${fill}breakpoint${fill}keep y${fill}:${bp_location}"] \ | |
39 | "breakpoint is unconditional" | |
40 |