OLD | NEW |
1 # Copyright 2006-2012 Free Software Foundation, Inc. | 1 # Copyright 2006-2012 Free Software Foundation, Inc. |
2 | 2 |
3 # This program is free software; you can redistribute it and/or modify | 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 | 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 | 5 # the Free Software Foundation; either version 3 of the License, or |
6 # (at your option) any later version. | 6 # (at your option) any later version. |
7 # | 7 # |
8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 # GNU General Public License for more details. | 11 # GNU General Public License for more details. |
12 # | 12 # |
13 # You should have received a copy of the GNU General Public License | 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/>. | 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 |
16 # Test that the source command's verbose mode works, the 'set trace-commands' | 16 # Test that the source command's verbose mode works, the 'set trace-commands' |
17 # command works, and that the nest depth is correct in various circumstances. | 17 # command works, and that the nest depth is correct in various circumstances. |
18 | 18 |
19 if $tracelevel then { | |
20 strace $tracelevel | |
21 } | |
22 | |
23 gdb_exit | 19 gdb_exit |
24 gdb_start | 20 gdb_start |
25 | 21 |
26 # Create a file to source | 22 # Create a file to source |
27 set fd [open "tracecommandsscript" w] | 23 set fd [open "tracecommandsscript" w] |
28 puts $fd "\ | 24 puts $fd "\ |
29 echo in tracecommandsscript\\n | 25 echo in tracecommandsscript\\n |
30 define func | 26 define func |
31 echo in func \$arg0\\n | 27 echo in func \$arg0\\n |
32 end | 28 end |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 gdb_test_sequence "if 1\nif 2\nload\necho should not get here\\n\nend\nend" \ | 113 gdb_test_sequence "if 1\nif 2\nload\necho should not get here\\n\nend\nend" \ |
118 "depth resets on error part 1" { | 114 "depth resets on error part 1" { |
119 {[\r\n]\+if 1} | 115 {[\r\n]\+if 1} |
120 {[\r\n]\+\+if 2} | 116 {[\r\n]\+\+if 2} |
121 {[\r\n]\+\+\+load} | 117 {[\r\n]\+\+\+load} |
122 {[\r\n]No executable file specified\.} | 118 {[\r\n]No executable file specified\.} |
123 {[\r\n]Use the "file" or "exec-file" command\.} | 119 {[\r\n]Use the "file" or "exec-file" command\.} |
124 } | 120 } |
125 gdb_test "echo hi\\n" {[\r\n]\+echo hi\\n[\r\n]+hi} \ | 121 gdb_test "echo hi\\n" {[\r\n]\+echo hi\\n[\r\n]+hi} \ |
126 "depth resets on error part 2" | 122 "depth resets on error part 2" |
OLD | NEW |