1 # Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1997, 1998, 1999, 2000,
2 # 2001, 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Please email any bugs, comments, and/or additions to this file to:
18 # bug-gdb@prep.ai.mit.edu
25 # test special commands (if, while, etc)
31 set srcfile ${testfile}.c
32 set binfile ${objdir}/${subdir}/commands
33 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
41 gdb_reinitialize_dir $srcdir/$subdir
44 proc gdbvar_simple_if_test {} {
47 gdb_test "set \$foo = 0" "" "set foo in gdbvar_simple_if_test"
48 # All this test should do is print 0xdeadbeef once.
49 gdb_test "if \$foo == 1\np/x 0xfeedface\nelse\np/x 0xdeadbeef\nend" \
50 "\\\$\[0-9\]* = 0xdeadbeef" "gdbvar_simple_if_test #1"
51 # All this test should do is print 0xfeedface once.
52 gdb_test "if \$foo == 0\np/x 0xfeedface\nelse\np/x 0xdeadbeef\nend" \
53 "\\\$\[0-9\]* = 0xfeedface" "gdbvar_simple_if_test #2"
56 proc gdbvar_simple_while_test {} {
59 gdb_test "set \$foo = 5" "" "set foo in gdbvar_simple_while_test"
60 # This test should print 0xfeedface five times.
61 gdb_test "while \$foo > 0\np/x 0xfeedface\nset \$foo -= 1\nend" \
62 "\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface" \
63 "gdbvar_simple_while_test #1"
66 proc gdbvar_complex_if_while_test {} {
69 gdb_test "set \$foo = 4" "" "set foo in gdbvar complex_if_while_test"
70 # This test should alternate between 0xdeadbeef and 0xfeedface two times.
71 gdb_test "while \$foo > 0\nset \$foo -= 1\nif \(\$foo % 2\) == 1\np/x 0xdeadbeef\nelse\np/x 0xfeedface\nend\nend" \
72 "\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface" \
73 "gdbvar_complex_if_while_test #1"
76 proc progvar_simple_if_test {} {
79 if [target_info exists noargs] {
80 verbose "Skipping progvar_simple_if_test because of noargs."
84 if { ![runto factorial] } then { gdb_suppress_tests; }
85 # Don't depend upon argument passing, since most simulators don't
86 # currently support it. Bash value variable to be what we want.
87 gdb_test "p value=5" "" "set value to 5 in progvar_simple_if_test #1"
88 # All this test should do is print 0xdeadbeef once.
89 gdb_test "if value == 1\np/x 0xfeedface\nelse\np/x 0xdeadbeef\nend" \
90 "\\\$\[0-9\]* = 0xdeadbeef" \
91 "progvar_simple_if_test #1"
92 # All this test should do is print 0xfeedface once.
93 gdb_test "if value == 5\np/x 0xfeedface\nelse\np/x 0xdeadbeef\nend" \
94 "\\\$\[0-9\]* = 0xfeedface" \
95 "progvar_simple_if_test #2"
96 gdb_stop_suppressing_tests;
99 proc progvar_simple_while_test {} {
102 if [target_info exists noargs] {
103 verbose "Skipping progvar_simple_while_test because of noargs."
107 gdb_test "set args 5" "" "set args in progvar_simple_while_test"
108 if { ![runto factorial] } then { gdb_suppress_tests }
109 # Don't depend upon argument passing, since most simulators don't
110 # currently support it. Bash value variable to be what we want.
111 gdb_test "p value=5" "" "set value to 5 in progvar_simple_if_test #2"
112 # This test should print 0xfeedface five times.
113 gdb_test "while value > 0\np/x 0xfeedface\nset value -= 1\nend" \
114 "\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface" \
115 "progvar_simple_while_test #1"
116 gdb_stop_suppressing_tests;
119 proc progvar_complex_if_while_test {} {
122 if [target_info exists noargs] {
123 verbose "Skipping progvar_simple_if_while_test because of noargs."
127 gdb_test "set args 4" "" "set args in progvar_complex_if_while_test"
128 if { ![runto factorial] } then { gdb_suppress_tests }
129 # Don't depend upon argument passing, since most simulators don't
130 # currently support it. Bash value variable to be what we want.
131 gdb_test "p value=4" "" "set value to 4 in progvar_simple_if_test"
132 # This test should alternate between 0xdeadbeef and 0xfeedface two times.
133 gdb_test "while value > 0\nset value -= 1\nif \(value % 2\) == 1\np/x 0xdeadbeef\nelse\np/x 0xfeedface\nend\nend" \
134 "\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface" \
135 "progvar_complex_if_while_test #1"
136 gdb_stop_suppressing_tests;
139 proc if_while_breakpoint_command_test {} {
140 if [target_info exists noargs] {
141 verbose "Skipping if_while_breakpoint_command_test because of noargs."
145 gdb_test "set args 5" "" "set args in if_while_breakpoint_command_test"
146 if { ![runto factorial] } then { gdb_suppress_tests }
147 # Don't depend upon argument passing, since most simulators don't
148 # currently support it. Bash value variable to be what we want.
149 gdb_test "p value=5" "" "set value to 5 in progvar_simple_if_test"
151 gdb_test "break factorial" "Breakpoint.*at.*" "break factorial #1"
153 send_gdb "commands\n"
156 pass "commands in if_while_breakpoint_command_test"
159 fail "(timeout or eof) commands in if_while_breakpoint_command_test"
162 # This test should alternate between 0xdeadbeef and 0xfeedface two times.
163 gdb_test "while value > 0\nset value -= 1\nif \(value % 2\) == 1\np/x 0xdeadbeef\nelse\np/x 0xfeedface\nend\nend\nend" \
165 "commands part 2 in if_while_breakpoint_command_test"
166 gdb_test "continue" \
167 "\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface" \
168 "if_while_breakpoint_command_test #1"
169 gdb_test "info break" \
170 "while.*set.*if.*p/x.*else.*p/x.*end.*" \
171 "info break in if_while_breakpoint_command_test"
172 gdb_stop_suppressing_tests;
175 # Test that we can run the inferior from breakpoint commands.
177 # The expected behavior is that all commands after the first "step"
178 # shall be ignored. See the gdb manual, "Break Commands",
179 # subsection "Breakpoint command lists".
181 proc infrun_breakpoint_command_test {} {
182 if [target_info exists noargs] {
183 verbose "Skipping infrun_breakpoint_command_test because of noargs."
187 gdb_test "set args 6" "" "set args in infrun_breakpoint_command_test"
188 if { ![runto factorial] } then { gdb_suppress_tests }
189 # Don't depend upon argument passing, since most simulators don't
190 # currently support it. Bash value variable to be what we want.
191 gdb_test "p value=6" "" "set value to 6 in progvar_simple_if_test #1"
193 gdb_test "break factorial if value == 5" "Breakpoint.*at.*"
195 # infrun_breakpoint_command_test - This test was broken into two parts
196 # to get around a synchronization problem in expect.
197 # part1: issue the gdb command "commands"
198 # part2: send the list of commands
199 send_gdb "commands\n"
202 pass "commands in infrun_breakpoint_command_test #1"
205 fail "(timeout or eof) commands in infrun_breakpoint_command_test"
208 gdb_test "step\nstep\nstep\nstep\nend" "" \
209 "commands in infrun_breakpoint_command_test #2"
211 gdb_test "continue" \
212 "Continuing.*.*.*Breakpoint \[0-9\]*, factorial \\(value=5\\).*at.*\[0-9\]*\[ \]*if \\(value > 1\\) \{.*\[0-9\]*\[ \]*value \\*= factorial \\(value - 1\\);.*" \
213 "continue in infrun_breakpoint_command_test"
215 gdb_stop_suppressing_tests;
218 proc breakpoint_command_test {} {
219 if [target_info exists noargs] {
220 verbose "Skipping breakpoint_command_test because of noargs."
224 gdb_test "set args 6" "" "set args in breakpoint_command_test"
225 if { ![runto factorial] } then { gdb_suppress_tests; }
226 # Don't depend upon argument passing, since most simulators don't
227 # currently support it. Bash value variable to be what we want.
228 gdb_test "p value=6" "" "set value to 6 in progvar_simple_if_test #2"
230 gdb_test "break factorial" "Breakpoint.*at.*" "break factorial #2"
231 gdb_test "commands\nprintf \"Now the value is %d\\n\", value\nend" \
232 "End with.*" "commands in breakpoint_command_test"
233 gdb_test "continue" \
234 "Breakpoint \[0-9\]*, factorial.*Now the value is 5" \
235 "continue in breakpoint_command_test"
236 gdb_test "print value" " = 5" "print value in breakpoint_command_test"
237 gdb_stop_suppressing_tests;
240 # Test a simple user defined command (with arguments)
241 proc user_defined_command_test {} {
244 gdb_test "set \$foo = 4" "" "set foo in user_defined_command_test"
246 send_gdb "define mycommand\n"
249 pass "define mycommand in user_defined_command_test"
252 fail "(timeout or eof) define mycommand in user_defined_command_test"
255 # This test should alternate between 0xdeadbeef and 0xfeedface two times.
256 gdb_test "while \$arg0 > 0\nset \$arg0 -= 1\nif \(\$arg0 % 2\) == 1\np/x 0xdeadbeef\nelse\np/x 0xfeedface\nend\nend\nend" \
258 "enter commands in user_defined_command_test"
260 gdb_test "mycommand \$foo" \
261 "\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface" \
262 "execute user defined command in user_defined_command_test"
263 gdb_test "show user mycommand" \
264 " while \\\$arg0.*set.* if \\\(\\\$arg0.*p/x.* else\[^\n\].*p/x.* end\[^\n\].* end\[^\n\].*" \
265 "display user command in user_defined_command_test"
268 proc watchpoint_command_test {} {
272 if [target_info exists noargs] {
273 verbose "Skipping watchpoint_command_test because of noargs."
277 # Disable hardware watchpoints if necessary.
278 if [target_info exists gdb,no_hardware_watchpoints] {
279 gdb_test "set can-use-hw-watchpoints 0" "" ""
282 gdb_test "set args 6" "" "set args in watchpoint_command_test"
283 if { ![runto factorial] } then { return }
286 # Verify that we can create a watchpoint, and give it a commands
287 # list that continues the inferior. We set the watchpoint on a
288 # local variable, too, so that it self-deletes when the watched
289 # data goes out of scope.
291 # What should happen is: Each time the watchpoint triggers, it
292 # continues the inferior. Eventually, the watchpoint will self-
293 # delete, when the watched variable is out of scope. But by that
294 # time, the inferior should have exited. GDB shouldn't crash or
295 # anything untoward as a result of this.
299 send_gdb "watch local_var\n"
301 -re ".*\[Ww\]atchpoint (\[0-9\]*): local_var.*$gdb_prompt $" {
302 set wp_id $expect_out(1,string)
303 pass "watch local_var"
306 {fail "watch local_var"}
307 timeout {fail "(timeout) watch local_var"}
310 if {$wp_id == -1} {return}
312 send_gdb "commands $wp_id\n"
314 -re "Type commands for when breakpoint $wp_id is hit, one per line.*>" {
315 pass "begin commands on watch"
317 -re "$gdb_prompt $" {fail "begin commands on watch"}
318 timeout {fail "(timeout) begin commands on watch"}
320 send_gdb "print value\n"
322 -re ">" {pass "add print command to watch"}
323 -re "$gdb_prompt $" {fail "add print command to watch"}
324 timeout {fail "(timeout) add print command to watch"}
326 send_gdb "continue\n"
328 -re ">" {pass "add continue command to watch"}
329 -re "$gdb_prompt $" {fail "add continue command to watch"}
330 timeout {fail "(timeout) add continue command to watch"}
334 -re "$gdb_prompt $" {pass "end commands on watch"}
335 timeout {fail "(timeout) end commands on watch"}
337 send_gdb "continue\n"
339 -re "Continuing.*\[Ww\]atchpoint $wp_id deleted because the program has left the block in.*which its expression is valid.*run.c:(57|82).*$gdb_prompt $" {
340 pass "continue with watch"
342 -re "$gdb_prompt $" {fail "continue with watch"}
343 timeout {fail "(timeout) continue with watch"}
347 proc test_command_prompt_position {} {
350 if [target_info exists noargs] {
351 verbose "Skipping test_command_prompt_position because of noargs."
355 if { ![runto factorial] } then { gdb_suppress_tests; }
356 # Don't depend upon argument passing, since most simulators don't
357 # currently support it. Bash value variable to be what we want.
359 gdb_test "break factorial" "Breakpoint.*at.*" "break factorial #3"
360 gdb_test "p value=5" "" "set value to 5 in test_command_prompt_position"
361 # All this test should do is print 0xdeadbeef once.
362 gdb_test "if value == 1\np/x 0xfeedface\nelse\np/x 0xdeadbeef\nend" \
363 "\\\$\[0-9\]* = 0xdeadbeef" \
364 "if test in test_command_prompt_position"
366 # Now let's test for the correct position of the '>' in gdb's
367 # prompt for commands. It should be at the beginning of the line,
368 # and not after one space.
370 send_gdb "commands\n"
372 -re "Type commands.*End with.*\[\r\n\]>$" {
373 send_gdb "printf \"Now the value is %d\\n\", value\n"
375 -re "^printf.*value\r\n>$" {
378 -re "^end\r\n$gdb_prompt $" {
379 pass "> OK in test_command_prompt_position"
381 -re ".*$gdb_prompt $" {
382 fail "some other message in test_command_prompt_position"
385 fail "(timeout) 1 in test_command_prompt_position"
389 -re "^ >$" { fail "> not OK in test_command_prompt_position" }
390 -re ".*$gdb_prompt $" {
391 fail "wrong message in test_command_prompt_position"
394 fail "(timeout) 2 in test_command_prompt_position "
398 -re "Type commands.*End with.*\[\r\n\] >$" {
399 fail "prompt not OK in test_command_prompt_position"
401 -re ".*$gdb_prompt $" {
402 fail "commands in test_command_prompt_position"
404 timeout { fail "(timeout) 3 commands in test_command_prompt_position" }
407 gdb_stop_suppressing_tests;
412 proc deprecated_command_test {} {
413 gdb_test "maintenance deprecate blah" "Can't find command.*" \
414 "tried to deprecate non-existing command"
416 gdb_test "maintenance deprecate p \"new_p\"" "" "maintenance deprecate p \"new_p\" /1/"
418 "Warning: 'p', an alias for the command 'print' is deprecated.*Use 'new_p'.*" \
419 "p deprecated warning, with replacement"
420 gdb_test "p 5" ".\[0-9\]* = 5.*" "Deprecated warning goes away /1/"
422 gdb_test "maintenance deprecate p \"new_p\"" "" "maintenance deprecate p \"new_p\" /2/"
423 gdb_test "maintenance deprecate print \"new_print\"" ""
425 "Warning: command 'print' \\(p\\) is deprecated.*Use 'new_print'.*" \
426 "both alias and command are deprecated"
427 gdb_test "p 5" ".\[0-9\]* = 5.*" "Deprecated warning goes away /2/"
429 gdb_test "maintenance deprecate set remote memory-read-packet-size \"srm\" " \
431 "deprecate long command /1/"
432 gdb_test "set remote memory-read-packet-size" \
433 "Warning: command 'set remote memory-read-packet-size' is deprecated.*Use 'srm'.*" \
434 "long command deprecated /1/"
436 gdb_test "maintenance deprecate set remote memory-read-packet-size" \
438 "deprecate long command /2/"
439 gdb_test "set remote memory-read-packet-size" \
440 "Warning: command 'set remote memory-read-packet-size' is deprecated.*No alternative known.*" \
441 "long command deprecated with no alternative /2/"
443 gdb_test "maintenance deprecate" \
444 "\"maintenance deprecate\".*" \
445 "deprecate with no arguments"
448 proc bp_deleted_in_command_test {} {
451 if [target_info exists noargs] {
452 verbose "Skipping bp_deleted_in_command_test because of noargs."
456 gdb_test "set args 1" "" "set args in bp_deleted_in_command_test"
459 # Create a breakpoint, and associate a command-list to it, with
460 # one command that deletes this breakpoint.
461 gdb_test "break factorial" \
462 "Breakpoint \[0-9\]+ at .*: file .*/run.c, line \[0-9\]+\." \
463 "breakpoint in bp_deleted_in_command_test"
465 send_gdb "commands\n"
467 -re "Type commands for when breakpoint .* is hit, one per line.*>" {
468 pass "begin commands in bp_deleted_in_command_test"
470 -re "$gdb_prompt $" {fail "begin commands in bp_deleted_in_command_test"}
471 timeout {fail "(timeout) begin commands bp_deleted_in_command_test"}
475 -re ">" {pass "add silent command"}
476 -re "$gdb_prompt $" {fail "add silent command"}
477 timeout {fail "(timeout) add silent command"}
479 send_gdb "clear factorial\n"
481 -re ">" {pass "add clear command"}
482 -re "$gdb_prompt $" {fail "add clear command"}
483 timeout {fail "(timeout) add clear command"} }
484 send_gdb "printf \"factorial command-list executed\\n\"\n"
486 -re ">" {pass "add printf command"}
487 -re "$gdb_prompt $" {fail "add printf command"}
488 timeout {fail "(timeout) add printf command"}
492 -re ">" {pass "add cont command"}
493 -re "$gdb_prompt $" {fail "add cont command"}
494 timeout {fail "(timeout) add cont command"} }
497 -re "$gdb_prompt $" {pass "end commands"}
498 timeout {fail "(timeout) end commands"}
503 -re ".*factorial command-list executed.*1.*$gdb_prompt $" {
504 pass "run factorial until breakpoint"
506 -re ".*$gdb_prompt $" {
507 fail "run factorial until breakpoint"
509 default { fail "(timeout) run factorial until breakpoint" }
510 timeout { fail "(timeout) run factorial until breakpoint" }
514 proc temporary_breakpoint_commands {} {
517 if [target_info exists noargs] {
518 verbose "Skipping temporary_breakpoint_commands because of noargs."
522 gdb_test "set args 1" "" "set args in temporary_breakpoint_commands"
525 # Create a temporary breakpoint, and associate a commands list to it.
526 # This test will verify that this commands list is executed when the
528 gdb_test "tbreak factorial" \
529 "Temporary breakpoint \[0-9\]+ at .*: file .*/run.c, line \[0-9\]+\." \
530 "breakpoint in temporary_breakpoint_commands"
532 send_gdb "commands\n"
534 -re "Type commands for when breakpoint .* is hit, one per line.*>" {
535 pass "begin commands in bp_deleted_in_command_test"
537 -re "$gdb_prompt $" {fail "begin commands in bp_deleted_in_command_test"}
538 timeout {fail "(timeout) begin commands bp_deleted_in_command_test"}
542 -re ">" {pass "add silent tbreak command"}
543 -re "$gdb_prompt $" {fail "add silent tbreak command"}
544 timeout {fail "(timeout) add silent tbreak command"}
546 send_gdb "printf \"factorial tbreak commands executed\\n\"\n"
548 -re ">" {pass "add printf tbreak command"}
549 -re "$gdb_prompt $" {fail "add printf tbreak command"}
550 timeout {fail "(timeout) add printf tbreak command"}
554 -re ">" {pass "add cont tbreak command"}
555 -re "$gdb_prompt $" {fail "add cont tbreak command"}
556 timeout {fail "(timeout) add cont tbreak command"} }
559 -re "$gdb_prompt $" {pass "end tbreak commands"}
560 timeout {fail "(timeout) end tbreak commands"}
565 -re ".*factorial tbreak commands executed.*1.*$gdb_prompt $" {
566 pass "run factorial until temporary breakpoint"
568 timeout { fail "(timeout) run factorial until temporary breakpoint" }
572 # Test that GDB can handle $arg0 outside of user functions without
574 proc stray_arg0_test { } {
575 gdb_test "print \$arg0" \
576 "\\\$\[0-9\]* = void" \
579 gdb_test "if 1 == 1\nprint \$arg0\nend" \
580 "\\\$\[0-9\]* = void" \
583 gdb_test "print \$arg0 = 1" \
587 gdb_test "print \$arg0" \
592 # Test that GDB can handle arguments when sourcing files recursively.
593 # If the arguments are overwritten with ####### then the test has failed.
594 proc recursive_source_test {} {
595 set fd [open "file1" w]
601 set fd [open "file2" w]
604 echo 1: <<<$arg0>>>\n
606 echo 2: <<<$arg0>>>\n
610 set fd [open "file3" w]
613 #################################################################"
616 gdb_test "source file1" \
617 "1: <<<qwerty>>>\[\r\n]+in file3\[\r\n]+2: <<<qwerty>>>" \
618 "recursive source test"
625 proc gdb_test_no_prompt { command result msg } {
628 set msg "$command - $msg"
629 set result "^[string_to_regexp $command]\r\n$result$"
630 gdb_test_multiple $command $msg {
643 proc if_commands_test {} {
646 gdb_test "set \$tem = 1" "" "set \$tem in if_commands_test"
648 set test "if_commands_test 1"
649 gdb_test_no_prompt "if \$tem == 2" { >} $test
650 gdb_test_no_prompt "break main" { >} $test
651 gdb_test_no_prompt "else" { >} $test
652 gdb_test_no_prompt "break factorial" { >} $test
653 gdb_test_no_prompt "commands" { >} $test
654 gdb_test_no_prompt "silent" { >} $test
655 gdb_test_no_prompt "set \$tem = 3" { >} $test
656 gdb_test_no_prompt "continue" { >} $test
657 gdb_test_multiple "end" "first end - $test" {
659 pass "first end - $test"
662 fail "first end - $test"
665 gdb_test_multiple "end" "second end - $test" {
666 -re "Breakpoint \[0-9\]+ at .*: file .*/run.c, line \[0-9\]+\.\r\n$gdb_prompt $" {
667 pass "second end - $test"
669 -re "Undefined command: \"silent\".*$gdb_prompt $" {
670 fail "second end - $test"
674 set test "if_commands_test 2"
675 gdb_test_no_prompt "if \$tem == 1" { >} $test
676 gdb_test_no_prompt "break main" { >} $test
677 gdb_test_no_prompt "else" { >} $test
678 gdb_test_no_prompt "break factorial" { >} $test
679 gdb_test_no_prompt "commands" { >} $test
680 gdb_test_no_prompt "silent" { >} $test
681 gdb_test_no_prompt "set \$tem = 3" { >} $test
682 gdb_test_no_prompt "continue" { >} $test
683 gdb_test_multiple "end" "first end - $test" {
685 pass "first end - $test"
688 fail "first end - $test"
691 gdb_test_multiple "end" "second end - $test" {
692 -re "Breakpoint \[0-9\]+ at .*: file .*/run.c, line \[0-9\]+\.\r\n$gdb_prompt $" {
693 pass "second end - $test"
698 gdbvar_simple_if_test
699 gdbvar_simple_while_test
700 gdbvar_complex_if_while_test
701 progvar_simple_if_test
702 progvar_simple_while_test
703 progvar_complex_if_while_test
704 if_while_breakpoint_command_test
705 infrun_breakpoint_command_test
706 breakpoint_command_test
707 user_defined_command_test
708 watchpoint_command_test
709 test_command_prompt_position
710 deprecated_command_test
711 bp_deleted_in_command_test
712 temporary_breakpoint_commands
714 recursive_source_test