1 # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
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 2 of the License, or
6 # (at your option) any later version.
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.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
17 # Please email any bugs, comments, and/or additions to this file to:
18 # bug-gdb@prep.ai.mit.edu
20 # This file was written by Fred Fish. (fnf@cygnus.com)
30 set binfile ${objdir}/${subdir}/${testfile}
31 if { [compile "-g -c ${srcdir}/${subdir}/list0.c"] != "" } {
32 perror "Couldn't compile ${testfile}0.c to object"
35 execute_anywhere "mv list0.o ${binfile}0.o"
36 if { [compile "-g -c ${srcdir}/${subdir}/list1.c"] != "" } {
37 perror "Couldn't compile ${testfile}1.c to object"
40 execute_anywhere "mv list1.o ${binfile}1.o"
41 if { [compile "${binfile}0.o ${binfile}1.o -o ${binfile}"] != "" } {
42 perror "Couldn't link ${testfile}."
46 # Create and source the file that provides information about the compiler
47 # used to compile the test case.
48 execute_anywhere "rm -f ${binfile}.ci"
49 if { [compile "-E ${srcdir}/${subdir}/compiler.c > ${binfile}.ci"] != "" } {
50 perror "Couldn't make ${binfile}.ci file"
56 # Local utility proc just to set and verify listsize
57 # Return 1 if success, 0 if fail.
60 proc set_listsize { arg } {
63 send "set listsize $arg\n"
65 -re "set listsize $arg\[\r\n\]+$prompt $" {}
66 -re ".*$prompt $" { fail "setting listsize to $arg" ; return 0 }
67 timeout { fail "set listsize to $arg (timeout)" ; return 0 }
70 send "show listsize\n"
72 -re "Number of source lines .* is $arg.\r\n.*$prompt $" {}
73 -re ".*$prompt $" { fail "listsize not set to $arg" ; return 0 }
74 timeout { fail "show listsize (timeout)" ; return 0 }
80 # Test display of listsize lines around a given line number.
83 proc test_listsize {} {
88 send "show listsize\n"
90 -re "Number of source lines gdb will list by default is 10.*$prompt $" {
91 pass "show default list size"
94 fail "show default listsize (10)"
97 fail "show listsize (timeout)"
101 # Show the default lines
102 # The second case is for optimized code, it is still correct.
104 # This doesn't work for COFF targets.
105 setup_xfail "a29k-*-udi"
108 -re "1\[ \t\]+#include \"list0.h\".*10\[ \t\]+x = 0;\r\n$prompt $" {
109 pass "list default lines around main"
111 -re "2.*11\[ \t\]+foo .x\[+)\]+;\r\n$prompt $" {
112 pass "list default lines around main"
115 fail "list default lines around main"
118 fail "list default lines around main (timeout)"
122 # Ensure we can limit printouts to one line
124 if [ set_listsize 1 ] then {
128 -re "1\[ \t\]+#include \"list0.h\"\r\n$prompt $" {
129 pass "list line 1 with listsize 1"
131 -re "list 1\r\n$prompt $" {
132 fail "list line 1 with listsize 1"
135 fail "list line 1 with listsize 1"
138 fail "list line 1 with listsize 1 (timeout)"
145 -re "2\[ \t\]+\r\n$prompt $" {
146 pass "list line 2 with listsize 1"
148 -re "list 2\r\n$prompt $" {
149 fail "list line 2 with listsize 1"
152 fail "list line 2 with listsize 1"
155 fail "list line 2 with listsize 1 (timeout)"
162 if [ set_listsize 2 ] then {
165 -re "1\[ \t\]+#include \"list0.h\"\r\n$prompt $" {
166 pass "list line 1 with listsize 2"
169 fail "list line 1 with listsize 2"
172 fail "list line 1 with listsize 2 (timeout)"
178 -re "1\[ \t\]+#include \"list0.h\"\r\n2\[ \t\]+\r\n$prompt $" {
179 pass "list line 2 with listsize 2"
182 fail "list line 2 with listsize 2"
185 fail "list line 2 with listsize 2 (timeout)"
191 -re "2\[ \t\]+\r\n3\[ \t\]+main \[)(\]+\r\n$prompt $" {
192 pass "list line 3 with listsize 2"
195 fail "list line 3 with listsize 2"
198 fail "list line 3 with listsize 2 (timeout)"
203 # Try small listsize > 1 that is an odd number
205 if [ set_listsize 3 ] then {
209 -re "1\[ \t\]+#include \"list0.h\"2\[ \t\]+\r\n$prompt $" {
210 pass "list line 1 with listsize 3"
212 -re "1\[ \t\]+#include \"list0.h\"\r\n$prompt $" {
213 fail "list line 1 with listsize 3"
216 fail "list line 1 with listsize 3"
219 fail "list line 1 with listsize 3 (timeout)"
226 -re "1\[ \t\]+#include \"list0.h\".*3\[ \t\]+main \[)(\]+\r\n$prompt $" {
227 pass "list line 2 with listsize 3"
229 -re "1\[ \t\]+#include \"list0.h\"\r\n2\[ \t\]+\r\n$prompt $" {
230 fail "list line 2 with listsize 3"
233 fail "list line 2 with listsize 3"
236 fail "list line 2 with listsize 3 (timeout)"
243 -re "2\[ \t\]+\r\n3\[ \t\]+main \[(\]+\[)\]+\r\n4\[ \t\]+\{\r\n$prompt $" {
244 pass "list line 3 with listsize 3"
246 -re "2\[ \t\]+\r\n3\[ \t\]+main \[)(\]+\r\n$prompt $" {
247 fail "list line 3 with listsize 3"
250 fail "list line 3 with listsize 3"
253 fail "list line 3 with listsize 3 (timeout)"
258 # Try small listsize > 2 that is an even number.
260 if [ set_listsize 4 ] then {
263 -re "1\[ \t\]+#include \"list0.h\"\r\n2\[ \t\]+\r\n$prompt $" {
264 pass "list line 1 with listsize 4"
267 fail "list line 1 with listsize 4"
270 fail "list line 1 with listsize 4 (timeout)"
276 -re "1\[ \t\]+#include \"list0.h\".*3\[ \t\]+main \[)(\]+\r\n$prompt $" {
277 pass "list line 2 with listsize 4"
280 fail "list line 2 with listsize 4"
283 fail "list line 2 with listsize 4 (timeout)"
289 -re "1\[ \t\]+#include \"list0.h\".*4\[ \t\]+\{\r\n$prompt $" {
290 pass "list line 3 with listsize 4"
293 fail "list line 3 with listsize 4"
296 fail "list line 3 with listsize 4 (timeout)"
302 -re "2\[ \t\]+\r\n.*5\[ \t\]+int x;\r\n$prompt $" {
303 pass "list line 4 with listsize 4"
306 fail "list line 4 with listsize 4"
309 fail "list line 4 with listsize 4 (timeout)"
314 # Try a size larger than the entire file.
316 if [ set_listsize 100 ] then {
319 -re "1\[ \t\]+#include \"list0.h\".*\r\n42\[ \t\]+\}\r\n$prompt $" {
320 pass "list line 1 with listsize 100"
323 fail "list line 1 with listsize 100"
326 fail "list line 1 with listsize 100 (timeout)"
332 -re "1\[ \t\]+#include \"list0.h\".*\r\n42\[ \t\]+\}\r\n$prompt $" {
333 pass "list line 10 with listsize 100"
336 fail "list line 10 with listsize 100"
339 fail "list line 10 with listsize 100 (timeout)"
344 # Try listsize of 0 which suppresses printing.
346 send "set listsize 0\n"
348 -re "set listsize 0\[\r\n\]+$prompt $" {
350 send "show listsize\n"
352 -re "Number of source lines .* is 0.\r\n.*$prompt $" {
353 pass "listsize of 0 displays as 0"
355 -re "Number of source lines .* is unlimited.\r\n.*$prompt $" {
356 fail "listsize of 0 displays as unlimited"
359 fail "listsize not set to unlimited (0)"
362 fail "show listsize (timeout)"
367 -re "list 1\[\r\n\]+$prompt $" {
368 pass "listsize of 0 suppresses output"
371 fail "listsize of 0 should suppress output"
374 fail "listsize of 0 suppresses output (timeout)"
379 fail "setting listsize to 0"
382 fail "set listsize to 0 (timeout)"
386 # Try listsize of -1 which is special, and means unlimited.
388 send "set listsize -1\n"
390 -re "set listsize -1\[\r\n\]+$prompt $" {
391 send "show listsize\n"
393 -re "Number of source lines .* is unlimited.\r\n.*$prompt $" {
394 pass "listsize of -1 displays as unlimited"
397 fail "listsize not set to unlimited (-1)"
400 fail "show listsize (timeout)"
406 -re "1\[ \t\]+#include .*\r\n39\[ \t\]+\}\r\n$prompt $" {
407 pass "list line 1 with unlimited listsize"
409 -re "list 1\[\r\n\]+$prompt $" {
410 fail "listsize of -1 (unlimited) suppresses output"
413 fail "list line 1 with unlimited listsize (timeout)"
418 fail "setting listsize to -1"
421 fail "set listsize to -1 (timeout)"
427 # Test "list filename:number" for C include file
430 proc test_list_include_file {} {
433 # FIXME Fails for COFF as well, I think.
434 setup_xfail "a29k-*-udi"
435 send "list list0.h:1\n"
437 -re "1\[ \t\]+/\[*\]+ An include file .*5\[ \t\]+foo \[(\]+x\[)\]+\r\n$prompt $" {
438 pass "list line 1 in include file"
440 -re "No source file named list0.h.\r\n$prompt $" {
441 fail "list line 1 in include file"
444 fail "list line 1 in include file"
447 fail "list line 1 in include file (timeout)"
451 # FIXME Fails for COFF as well, I think.
452 setup_xfail "a29k-*-udi"
453 send "list list0.h:100\n"
455 -re "Line number 95 out of range; .*list0.h has 36 lines.\r\n$prompt $" {
456 pass "list message for lines past EOF"
458 -re "No source file named list0.h.\r\n$prompt $" {
459 fail "list message for lines past EOF"
462 fail "list message for lines past EOF"
465 fail "list message for lines past EOF (timeout)"
471 # Test "list filename:number" for C source file
474 proc test_list_filename_and_number {} {
479 send "list list0.c:1\n"
481 -re "1\[ \t\]+#include \"list0.h\".*5\[ \t\]+int x;\r\n$prompt $" {
484 -re ".*$prompt $" { fail "list list0.c:1" ; return }
485 timeout { fail "list list0.c:1 (timeout)" ; return }
487 send "list list0.c:10\n"
489 -re "5\[ \t\]+int x;.*14\[ \t\]+foo .x\[+)\]+;\r\n$prompt $" {
492 -re ".*$prompt $" { fail "list list.c:10" ; return }
493 timeout { fail "list list.c:10 (timeout)" ; return }
495 send "list list1.c:1\n"
497 -re "1\[ \t\]+void.*5\[ \t\]+printf \[(\]+.*\[)\]+;\r\n$prompt $" {
500 -re ".*$prompt $" { fail "list list1.c:1" ; return }
501 timeout { fail "list list1.c:1 (timeout)" ; return }
503 send "list list1.c:12\n"
505 -re "7\[ \t\]+long_line \[(\]+.*\[)\]+;.*14\[ \t\]+\}\r\n.*$prompt $" {
508 -re ".*$prompt $" { fail "list list1.c:12" ; return }
509 timeout { fail "list list1.c:12 (timeout)" ; return }
511 pass "list filename:number ($testcnt tests)"
515 # Test "list function" for C source file
518 proc test_list_function {} {
522 # gcc appears to generate incorrect debugging information for code
523 # in include files, which breaks this test.
524 # SunPRO cc is the second case below, it's also correct.
525 setup_xfail "a29k-*-udi"
528 -re "1\[ \t\]+#include .*8\[ \t\]+breakpoint\[(\]\[)\]+;\r\n$prompt $" {
529 pass "list function in source file 1"
531 -re "5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" {
532 pass "list function in source file 1"
534 -re ".*$prompt $" { fail "list main" ; return }
535 timeout { fail "list main (timeout)" ; return }
538 # Ultrix gdb takes the second case below; it's also correct.
539 # SunPRO cc is the third case.
542 -re "1\[ \t\]+void.*8\[ \t\]+\}\r\n$prompt $" {
543 pass "list function in source file 2"
545 -re "1\[ \t\]+void.*7\[ \t\]*long_line ..;\r\n$prompt $" {
546 pass "list function in source file 2"
548 -re "1\[ \t\]+void.*7\[ \t\]*long_line ..;.*9\[ \t\]*\r\n$prompt $" {
549 pass "list function in source file 2"
551 -re ".*$prompt $" { fail "list bar" ; return }
552 timeout { fail "list bar (timeout)" ; return }
555 # Test "list function" for C include file
556 # Ultrix gdb is the second case, still correct.
557 # SunPRO cc is the third case.
558 setup_xfail "powerpc-*-*"
561 -re "2\[ \t\]+including file.*11\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$prompt $" {
562 pass "list function in include file"
564 -re "1\[ \t\]+/. An include file.*10\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$prompt $" {
565 pass "list function in include file"
567 -re "3\[ \t\]+.*12\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$prompt $" {
568 pass "list function in include file"
570 -re ".*main \[)(\]+.*$prompt $" {
571 fail "list function in include file"
573 -re ".*$prompt $" { fail "list foo (in include file)" ; return }
574 timeout { fail "list foo (timeout)" ; return }
578 proc test_list_forward {} {
583 send "list list0.c:10\n"
585 -re "5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { incr testcnt }
586 -re ".*$prompt $" { fail "list list0.c:10" ; return }
587 timeout { fail "list list0.c:10 (timeout)" ; return }
592 -re "15\[ \t\]+foo \[(\]+.*\[)\]+;.*24\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { incr testcnt }
593 -re ".*$prompt $" { fail "list 15-24" ; return }
594 timeout { fail "list 15-24 (timeout)" ; return }
599 -re "25\[ \t\]+foo \[(\]+.*\[)\]+;.*34\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { incr testcnt }
600 -re ".*$prompt $" { fail "list 25-34" ; return }
601 timeout { fail "list 25-34 (timeout)" ; return }
606 -re "35\[ \t\]+foo \[(\]+.*\[)\]+;.*42\[ \t\]+\}\r\n$prompt $" { incr testcnt }
607 -re ".*$prompt $" { fail "list 35-42" ; return }
608 timeout { fail "list 35-42 (timeout)" ; return }
611 pass "successive list commands to page forward ($testcnt tests)"
614 proc test_list_backwards {} {
619 send "list list0.c:33\n"
621 -re "28\[ \t\]+foo \[(\]+.*\[)\]+;.*37\[ \t\]+\r\n$prompt $" { incr testcnt }
622 -re ".*$prompt $" { fail "list list0.c:33" ; return }
623 timeout { fail "list list0.c:33 (timeout)" ; return }
628 -re "18\[ \t\]+foo \[(\]+.*\[)\]+;.*27\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { incr testcnt }
629 -re ".*$prompt $" { fail "list 18-27" ; return }
630 timeout { fail "list 18-27 (timeout)" ; return }
635 -re "8\[ \t\]+breakpoint\[(\]\[)\];.*17\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { incr testcnt }
636 -re ".*$prompt $" { fail "list 8-17" ; return }
637 timeout { fail "list 8-17 (timeout)" ; return }
642 -re "1\[ \t\]+#include .*7\[ \t\]+set_debug_traps\[(\]\[)\]+;\r\n$prompt $" { incr testcnt }
643 -re ".*$prompt $" { fail "list 1-7" ; return }
644 timeout { fail "list 1-7 (timeout)" ; return }
647 pass "$testcnt successive \"list -\" commands to page backwards"
651 # Test "list first,last"
654 proc test_list_range {} {
657 send "list list0.c:2,list0.c:5\n"
659 -re "2\[ \t\]+\r\n3\[ \t\]+main \[)(\]+.*5\[ \t\]+int x;\r\n$prompt $" {
660 pass "list range; filename:line1,filename:line2"
662 -re ".*$prompt $" { fail "list list0.c:2,list0.c:5" }
663 timeout { fail "list list0.c:2,list0.c:5 (timeout)" }
668 -re "2\[ \t\]+\r\n3\[ \t\]+main \[)(\]+.*5\[ \t\]+int x;\r\n$prompt $" {
669 pass "list range; line1,line2"
671 -re ".*$prompt $" { fail "list 2,5" }
672 timeout { fail "list 2,5 (timeout)" }
677 #-re "Line number 0 out of range; .*list0.c has 39 lines.\r\n$prompt $" {
678 #pass "list range; lower bound negative"
680 #-re ".*$prompt $" { fail "list -1,6" }
681 #timeout { fail "list -1,6 (timeout)" }
684 #send "list -100,-40\n"
686 #-re "Line number -60 out of range; .*list0.c has 39 lines.\r\n$prompt $" {
687 #pass "list range; both bounds negative"
689 #-re ".*$prompt $" { fail "-100,-40" }
690 #timeout { fail "-100,-40 (timeout)" }
695 -re "30\[ \t\]+foo \[(\]+.*\[)\]+;.*42\[ \t\]+\}\r\n$prompt $" {
696 pass "list range; upper bound past EOF"
698 -re ".*$prompt $" { fail "list 30,43" }
699 timeout { fail "list 30,43 (timeout)" }
704 -re "Line number 43 out of range; .*list0.c has 42 lines.\r\n$prompt $" {
705 pass "list range; both bounds past EOF"
707 -re ".*$prompt $" { fail "43,100" }
708 timeout { fail "43,100 (timeout)" }
711 send "list list0.c:2,list1.c:17\n"
713 -re "Specified start and end are in different files.\r\n$prompt $" {
714 pass "list range, must be same files"
716 -re ".*$prompt $" { fail "list0.c:2,list1.c:17" }
717 timeout { fail "list0.c:2,list1.c:17 (timeout)" }
722 # Test "list filename:function"
725 proc test_list_filename_and_function {} {
730 # gcc appears to generate incorrect debugging information for code
731 # in include files, which breaks this test.
732 # SunPRO cc is the second case below, it's also correct.
733 setup_xfail "a29k-*-udi"
734 send "list list0.c:main\n"
736 -re "1\[ \t\]+#include .*8\[ \t\]+breakpoint\[(\]\[)\]+;\r\n$prompt $" {
739 -re "5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" {
740 pass "list function in source file 1"
742 -re ".*$prompt $" { fail "list list0.c:main" }
743 timeout { fail "list list0.c:main (timeout)" }
746 # The i960 and a29k-amd-udi are the second case
748 # Not sure what the point of having this function be unused is.
749 # AIX is legitimately removing it.
750 setup_xfail "rs6000-*-aix*"
751 send "list list0.c:unused\n"
753 -re "36\[ \t\]+\}.*42\[ \t\]+\}\r\n$prompt $" {
756 -re "37.*42\[ \t\]+\}\r\n$prompt $" {
759 -re ".*$prompt $" { fail "list list0.c:unused" }
760 timeout { fail "list list0.c:unused (timeout)" }
762 clear_xfail "rs6000-*-aix*"
764 # gcc appears to generate incorrect debugging information for code
765 # in include files, which breaks this test.
766 # Ultrix gdb is the second case, one line different but still correct.
767 # SunPRO cc is the third case.
768 setup_xfail "rs6000-*-*" 1804
769 setup_xfail "powerpc-*-*" 1804
770 # FIXME Fails for COFF as well, I think.
771 setup_xfail "a29k-*-udi"
772 send "list list0.h:foo\n"
774 -re "2\[ \t\]+including file. This.*11\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$prompt $" {
777 -re "1\[ \t\]+/. An include file.*10\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$prompt $" {
780 -re "3\[ \t\]+.*12\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$prompt $" {
783 -re "No source file named list0.h.\r\n$prompt $" {
784 fail "list list0.h:foo"
786 -re ".*$prompt $" { fail "list list0.h:foo" }
787 timeout { fail "list list0.h:foo (timeout)" }
790 # Ultrix gdb is the second case.
791 # a29k-amd-udi is the third case.
792 send "list list1.c:bar\n"
794 -re "1\[ \t\]+void.*8\[ \t\]+\}\r\n$prompt $" {
797 -re "1\[ \t\]+void.*7\[ \t\]*long_line ..;\r\n$prompt $" {
800 -re "1\[ \t\]+void.*9\[ \t\]*\r\n$prompt $" {
803 -re ".*$prompt $" { fail "list list1.c:bar" }
804 timeout { fail "list list1.c:bar (timeout)" }
807 # The i960 and a29k-amd-udi are the second case
809 # Not sure what the point of having this function be unused is.
810 # AIX is legitimately removing it.
811 setup_xfail "rs6000-*-aix*"
812 send "list list1.c:unused\n"
814 -re "7\[ \t\]+long_line \[(\]\[)\];.*14\[ \t\]+\}\r\n.*$prompt $" {
817 -re "9.*14\[ \t\]+\}\r\n.*$prompt $" {
820 -re ".*$prompt $" { fail "list list1.c:unused" }
821 timeout { fail "list list1.c:unused (timeout)" }
823 clear_xfail "rs6000-*-aix*"
825 pass "list filename:function ($testcnt tests)"
827 # Test some invalid specs
828 # The following test takes the FIXME result on most systems using
829 # DWARF. It fails to notice that main() is not in the file requested.
833 # Does this actually work ANYWHERE? I believe not, as this is an `aspect' of
834 # lookup_symbol(), where, when it is given a specific symtab which does not
835 # contain the requested symbol, it will subsequently search all of the symtabs
836 # for the requested symbol.
838 send "list list0.c:foo\n"
840 -re "Function \"foo\" not defined in .*list0.c\r\n$prompt $" {
841 pass "list filename:function; wrong filename rejected"
843 -re "2\[ \t\]+including file.*11\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$prompt $" {
844 fail "list filename:function; wrong filename not rejected"
846 -re ".*main \[)(\]+.*$prompt $" {
847 fail "list filename:function; wrong filename not rejected"
850 fail "list filename:function; wrong filename not rejected"
853 fail "list filename:function; wrong filename (timeout)"
857 send "list foobar.c:main\n"
859 -re "No source file named foobar.c.\r\n$prompt $" {
860 pass "list filename:function; nonexistant file"
863 fail "list filename:function; nonexistant file"
866 fail "list filename:function; nonexistant file (timeout)"
870 send "list list0.h:foobar\n"
872 -re "Function \"foobar\" not defined.\r\n$prompt $" {
873 pass "list filename:function; nonexistant function"
875 -re "No source file named list0.h.\r\n$prompt $" {
876 fail "list filename:function; nonexistant function"
879 fail "list filename:function; nonexistant function"
882 fail "list filename:function; nonexistant function (timeout)"
888 proc test_forward_search {} {
891 gdb_test "set listsize 4" ""
892 # On SunOS4, this gives us lines 19-22. On AIX, it gives us
893 # lines 20-23. This depends on whether the line number of a function
894 # is considered to be the openbrace or the first statement--either one
896 gdb_test "list long_line" "20\[ \t\]+long_line .*"
898 gdb_test "search 4321" " not found"
900 gdb_test "search 6789" "24\[ \t\]+oof .6789.;"
902 # Test that GDB won't crash if the line being searched is extremely long.
904 set oldtimeout $timeout
905 set timeout [expr "$timeout + 60"]
906 verbose "Timeout is now $timeout seconds" 2
908 gdb_test "search 1234" ".*1234.*" "search extremely long line (> 5000 chars)"
909 set timeout $oldtimeout
910 verbose "Timeout is now $timeout seconds" 2
913 # Start with a fresh gdb.
917 gdb_reinitialize_dir $srcdir/$subdir
922 # if use stubs step out of the breakpoint() function.
924 -re "main.* at .*$prompt $" {}
925 timeout { fail "single step at breakpoint() (timeout)" ; return 0 }
930 expect -re "$prompt $"
933 if [ set_listsize 10 ] then {
934 test_list_include_file
935 test_list_filename_and_number
940 test_list_filename_and_function