2002-03-25 Michael Snyder <msnyder@redhat.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / list.exp
1 # Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2002
2 # Free Software Foundation, Inc.
3
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 2 of the License, or
7 # (at your option) any later version.
8 #
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.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
18 # Please email any bugs, comments, and/or additions to this file to:
19 # bug-gdb@prep.ai.mit.edu
20
21 # This file was written by Fred Fish. (fnf@cygnus.com)
22
23 if $tracelevel then {
24 strace $tracelevel
25 }
26
27 set prms_id 0
28 set bug_id 0
29
30 set testfile "list"
31 set binfile ${objdir}/${subdir}/${testfile}
32
33 # Need to download the header to the host.
34 remote_download host ${srcdir}/${subdir}/list0.h list0.h
35
36
37 if { [gdb_compile "${srcdir}/${subdir}/list0.c" "${binfile}0.o" object {debug}] != "" } {
38 gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
39 }
40
41 if { [gdb_compile "${srcdir}/${subdir}/list1.c" "${binfile}1.o" object {debug}] != "" } {
42 gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
43 }
44
45 if { [gdb_compile "${binfile}0.o ${binfile}1.o" ${binfile} executable {debug}] != "" } {
46 gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
47 }
48
49
50
51 # Create and source the file that provides information about the compiler
52 # used to compile the test case.
53 if [get_compiler_info ${binfile}] {
54 return -1;
55 }
56
57 #
58 # Local utility proc just to set and verify listsize
59 # Return 1 if success, 0 if fail.
60 #
61
62 set set_listsize_count 0;
63
64 proc set_listsize { arg } {
65 global gdb_prompt
66 global set_listsize_count;
67
68 incr set_listsize_count;
69 if [gdb_test "set listsize $arg" "" "setting listsize to $arg #$set_listsize_count"] {
70 return 0;
71 }
72 if { $arg <= 0 } {
73 set arg "unlimited";
74 }
75
76 if [gdb_test "show listsize" "Number of source lines.* is ${arg}.*" "show listsize $arg #$set_listsize_count"] {
77 return 0;
78 }
79 return 1
80 }
81
82 #
83 # Test display of listsize lines around a given line number.
84 #
85
86 proc test_listsize {} {
87 global gdb_prompt
88 global hp_cc_compiler
89 global hp_aCC_compiler
90
91 # Show default size
92
93 gdb_test "show listsize" "Number of source lines gdb will list by default is 10.*" "show default list size"
94
95 # Show the default lines
96 # The second case is for optimized code, it is still correct.
97
98 gdb_test "list" "(1\[ \t\]+#include \"list0.h\".*10\[ \t\]+x = 0;|2.*11\[ \t\]+foo .x\[+)\]+;)" "list default lines around main"
99
100 # Ensure we can limit printouts to one line
101
102 if [set_listsize 1] {
103 gdb_test "list 1" "1\[ \t\]+#include \"list0.h\"" "list line 1 with listsize 1"
104 gdb_test "list 2" "2\[ \t\]+" "list line 2 with listsize 1"
105 }
106
107 # Try just two lines
108
109 if [ set_listsize 2 ] {
110 gdb_test "list 1" "1\[ \t\]+#include \"list0.h\"\r\n2\[ \t\]+" "list line 1 with listsize 2"
111 gdb_test "list 2" "1\[ \t\]+#include \"list0.h\"\r\n2\[ \t\]+" "list line 2 with listsize 2"
112 gdb_test "list 3" "2\[ \t\]+\r\n3\[ \t\]+int main \[)(\]+" "list line 3 with listsize 2"
113 }
114
115 # Try small listsize > 1 that is an odd number
116
117 if [ set_listsize 3 ] {
118 gdb_test "list 1" "1\[ \t\]+#include \"list0.h\".*3\[ \t\]+int main \[)(\]+" "list line 1 with listsize 3"
119 gdb_test "list 2" "1\[ \t\]+#include \"list0.h\".*3\[ \t\]+int main \[)(\]+" "list line 2 with listsize 3"
120 gdb_test "list 3" "2\[ \t\]+\r\n3\[ \t\]+int main \[(\]+\[)\]+\r\n4\[ \t\]+\{" "list line 3 with listsize 3"
121 }
122
123 # Try small listsize > 2 that is an even number.
124
125 if [ set_listsize 4 ] then {
126 gdb_test "list 1" "1\[ \t\]+#include \"list0.h\".*4\[ \t\]+\{" "list line 1 with listsize 4"
127 gdb_test "list 2" "1\[ \t\]+#include \"list0.h\".*4\[ \t\]+\{" "list line 2 with listsize 4"
128
129 gdb_test "list 3" "1\[ \t\]+#include \"list0.h\".*4\[ \t\]+\{" "list line 3 with listsize 4"
130 gdb_test "list 4" "2\[ \t\]+\r\n.*5\[ \t\]+int x;.*" "list line 4 with listsize 4"
131 }
132
133 # Try a size larger than the entire file.
134
135 if [ set_listsize 100 ] then {
136 gdb_test "list 1" "1\[ \t\]+#include \"list0.h\".*\r\n4\[23\]\[ \t\]+\}" "list line 1 with listsize 100"
137
138 gdb_test "list 10" "1\[ \t\]+#include \"list0.h\".*\r\n4\[23\]\[ \t\]+\}" "list line 10 with listsize 100"
139 }
140
141 # Try listsize of 0 which suppresses printing.
142
143 set_listsize 0
144 gdb_test "list 1" "" "listsize of 0 suppresses output"
145
146 # Try listsize of -1 which is special, and means unlimited.
147
148 set_listsize -1
149 setup_xfail "*-*-*"
150 gdb_test "list 1" "1\[ \t\]+#include .*\r\n39\[ \t\]+\}" "list line 1 with unlimited listsize"
151 }
152
153 #
154 # Test "list filename:number" for C include file
155 #
156
157 proc test_list_include_file {} {
158 global gdb_prompt
159
160 # OBSOLETE setup_xfail "a29k-*-udi"
161 setup_xfail_format "DWARF 1"
162 setup_xfail_format "COFF"
163 gdb_test "list list0.h:1" "1\[ \t\]+/\[*\]+ An include file .*10\[ \t\]+bar \\(x\\+\\+\\);" "list line 1 in include file"
164
165 # OBSOLETE setup_xfail "a29k-*-udi"
166 setup_xfail_format "DWARF 1"
167 setup_xfail_format "COFF"
168 gdb_test "list list0.h:100" "Line number 95 out of range; .*list0.h has 3\[67\] lines." "list message for lines past EOF"
169 }
170
171 #
172 # Test "list filename:number" for C source file
173 #
174
175 proc test_list_filename_and_number {} {
176 global gdb_prompt
177
178 set testcnt 0
179
180 send_gdb "list list0.c:1\n"
181 gdb_expect {
182 -re "1\[ \t\]+#include \"list0.h\".*10\[ \t]+x = 0;\r\n$gdb_prompt $" {
183 incr testcnt
184 }
185 -re ".*$gdb_prompt $" { fail "list list0.c:1" ; gdb_suppress_tests }
186 timeout { fail "list list0.c:1 (timeout)" ; gdb_suppress_tests }
187 }
188 send_gdb "list list0.c:10\n"
189 gdb_expect {
190 -re "5\[ \t\]+int x;.*14\[ \t\]+foo .x\[+)\]+;\r\n$gdb_prompt $" {
191 incr testcnt
192 }
193 -re ".*$gdb_prompt $" { fail "list list.c:10" ; gdb_suppress_tests }
194 timeout { fail "list list.c:10 (timeout)" ; gdb_suppress_tests }
195 }
196 send_gdb "list list1.c:1\n"
197 gdb_expect {
198 -re "1\[ \t\]+\#include.*4\[ \t\]+.*int oof\[ \t\]*\(.*\);\r\n.*$gdb_prompt $" {
199 incr testcnt
200 }
201 -re ".*$gdb_prompt $" { fail "list list1.c:1" ; gdb_suppress_tests }
202 timeout { fail "list list1.c:1 (timeout)" ; gdb_suppress_tests }
203 }
204 send_gdb "list list1.c:12\n"
205 gdb_expect {
206 -re "12\[ \t\]+long_line \[(\]+.*\[)\]+;.*13\[ \t\]+\}\r\n.*$gdb_prompt $" {
207 incr testcnt
208 }
209 -re ".*$gdb_prompt $" { fail "list list1.c:12" ; gdb_suppress_tests }
210 timeout { fail "list list1.c:12 (timeout)" ; gdb_suppress_tests }
211 }
212 pass "list filename:number ($testcnt tests)"
213 gdb_stop_suppressing_tests;
214 }
215
216 #
217 # Test "list function" for C source file
218 #
219
220 proc test_list_function {} {
221 global gdb_prompt
222 global gcc_compiled
223
224 # gcc appears to generate incorrect debugging information for code
225 # in include files, which breaks this test.
226 # SunPRO cc is the second case below, it's also correct.
227 # OBSOLETE setup_xfail "a29k-*-udi"
228 gdb_test "list main" "(5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;|1\[ \t\]+#include .*10\[ \t\]+x = 0;)" "list function in source file 1"
229
230 # Ultrix gdb takes the second case below; it's also correct.
231 # SunPRO cc is the third case.
232 gdb_test "list bar" "(4\[ \t\]+void.*\[ \t\]*long_line.*;.*bar.*9\[ \t\]*.*|1\[ \t\]+void.*8\[ \t\]+\}|1\[ \t\]+void.*7\[ \t\]*long_line ..;|7\[ \t\]+void.*14\[ \t\]+\})" "list function in source file 2"
233
234 # Test "list function" for C include file
235 # Ultrix gdb is the second case, still correct.
236 # SunPRO cc is the third case.
237 setup_xfail "powerpc-*-*"
238 setup_xfail_format "DWARF 1"
239 gdb_test "list foo" "(3\[ \t\]+.*12\[ \t\]+bar \[(\]+.*\[)\]+;|2\[ \t\]+including file.*11\[ \t\]+bar \[(\]+.*\[)\]+;|1\[ \t\]+/. An include file.*10\[ \t\]+bar \[(\]+.*\[)\]+;)" "list function in include file"
240 }
241
242 proc test_list_forward {} {
243 global gdb_prompt
244
245 set testcnt 0
246
247 send_gdb "list list0.c:10\n"
248 gdb_expect {
249 -re "5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
250 -re ".*$gdb_prompt $" { fail "list list0.c:10" ; gdb_suppress_tests }
251 timeout { fail "list list0.c:10 (timeout)" ; gdb_suppress_tests }
252 }
253
254 send_gdb "list\n"
255 gdb_expect {
256 -re "15\[ \t\]+foo \[(\]+.*\[)\]+;.*24\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
257 -re ".*$gdb_prompt $" { fail "list 15-24" ; gdb_suppress_tests }
258 timeout { fail "list 15-24 (timeout)" ; gdb_suppress_tests }
259 }
260
261 send_gdb "list\n"
262 gdb_expect {
263 -re "25\[ \t\]+foo \[(\]+.*\[)\]+;.*34\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
264 -re ".*$gdb_prompt $" { fail "list 25-34" ; gdb_suppress_tests }
265 timeout { fail "list 25-34 (timeout)" ; gdb_suppress_tests }
266 }
267
268 send_gdb "list\n"
269 gdb_expect {
270 -re "35\[ \t\]+foo \\(.*\\);.*42\[ \t\]+.*\}\r\n$gdb_prompt $" { incr testcnt }
271 -re ".*$gdb_prompt $" { fail "list 35-42" ; gdb_suppress_tests }
272 timeout { fail "list 35-42 (timeout)" ; gdb_suppress_tests }
273 }
274
275 pass "successive list commands to page forward ($testcnt tests)"
276 gdb_stop_suppressing_tests;
277 }
278
279 # Test that repeating the list linenum command doesn't print the same
280 # lines over again. Note that this test makes sure that the argument
281 # linenum is dropped, when we repeat the previous command. 'x/5i $pc'
282 # works the same way.
283
284 proc test_repeat_list_command {} {
285 global gdb_prompt
286
287 set testcnt 0
288
289 send_gdb "list list0.c:10\n"
290 gdb_expect {
291 -re "5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
292 -re ".*$gdb_prompt $" { fail "list list0.c:10" ; gdb_suppress_tests }
293 timeout { fail "list list0.c:10 (timeout)" ; gdb_suppress_tests }
294 }
295
296 send_gdb "\n"
297 gdb_expect {
298 -re "15\[ \t\]+foo \[(\]+.*\[)\]+;.*24\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
299 -re ".*$gdb_prompt $" { fail "list 15-24" ; gdb_suppress_tests }
300 timeout { fail "list 15-24 (timeout)" ; gdb_suppress_tests }
301 }
302
303 send_gdb "\n"
304 gdb_expect {
305 -re "25\[ \t\]+foo \[(\]+.*\[)\]+;.*34\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
306 -re ".*$gdb_prompt $" { fail "list 25-34" ; gdb_suppress_tests }
307 timeout { fail "list 25-34 (timeout)" ; gdb_suppress_tests }
308 }
309
310 send_gdb "\n"
311 gdb_expect {
312 -re "35\[ \t\]+foo \\(.*\\);.*42\[ \t\]+.*\}\r\n$gdb_prompt $" { incr testcnt }
313 -re ".*$gdb_prompt $" { fail "list 35-42" ; gdb_suppress_tests }
314 timeout { fail "list 35-42 (timeout)" ; gdb_suppress_tests }
315 }
316
317 pass "repeat list commands to page forward using 'return' ($testcnt tests)"
318 gdb_stop_suppressing_tests;
319 }
320
321 proc test_list_backwards {} {
322 global gdb_prompt
323
324 set testcnt 0
325
326 send_gdb "list list0.c:33\n"
327 gdb_expect {
328 -re "28\[ \t\]+foo \\(.*\\);.*37\[ \t\]+\}\r\n$gdb_prompt $" { incr testcnt }
329 -re ".*$gdb_prompt $" { fail "list list0.c:33" ; gdb_suppress_tests }
330 timeout { fail "list list0.c:33 (timeout)" ; gdb_suppress_tests }
331 }
332
333 send_gdb "list -\n"
334 gdb_expect {
335 -re "18\[ \t\]+foo \[(\]+.*\[)\]+;.*27\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
336 -re ".*$gdb_prompt $" { fail "list 18-27" ; gdb_suppress_tests }
337 timeout { fail "list 18-27 (timeout)" ; gdb_suppress_tests }
338 }
339
340 send_gdb "list -\n"
341 gdb_expect {
342 -re "8\[ \t\]+breakpoint\[(\]\[)\];.*17\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
343 -re ".*$gdb_prompt $" { fail "list 8-17" ; gdb_suppress_tests }
344 timeout { fail "list 8-17 (timeout)" ; gdb_suppress_tests }
345 }
346
347 send_gdb "list -\n"
348 gdb_expect {
349 -re "1\[ \t\]+#include .*7\[ \t\]+set_debug_traps\[(\]\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
350 -re ".*$gdb_prompt $" { fail "list 1-7" ; gdb_suppress_tests }
351 timeout { fail "list 1-7 (timeout)" ; gdb_suppress_tests }
352 }
353
354 pass "$testcnt successive \"list -\" commands to page backwards"
355 gdb_stop_suppressing_tests;
356 }
357
358 #
359 # Test "list first,last"
360 #
361
362 proc test_list_range {} {
363 global gdb_prompt
364
365 gdb_test "list list0.c:2,list0.c:5" "2\[ \t\]+\r\n3\[ \t\]+int main \[)(\]+.*5\[ \t\]+int x;" "list range; filename:line1,filename:line2"
366
367 gdb_test "list 2,5" "2\[ \t\]+\r\n3\[ \t\]+int main \[)(\]+.*5\[ \t\]+int x;" "list range; line1,line2"
368
369 # gdb_test "list -1,6" "Line number 0 out of range; .*list0.c has 39 lines." "list range; lower bound negative"
370
371 # gdb_test "list -100,-40" "Line number -60 out of range; .*list0.c has 39 lines." "list range; both bounds negative"
372
373 gdb_test "list 30,45" "30\[ \t\]+foo \(.*\);.*43\[ \t\]+\}" "list range; upper bound past EOF"
374
375 gdb_test "list 45,100" "Line number 45 out of range; .*list0.c has 43 lines." "list range; both bounds past EOF"
376
377 gdb_test "list list0.c:2,list1.c:17" "Specified start and end are in different files." "list range, must be same files"
378 }
379
380 #
381 # Test "list filename:function"
382 #
383
384 proc test_list_filename_and_function {} {
385 global gdb_prompt
386
387 set testcnt 0
388
389 # gcc appears to generate incorrect debugging information for code
390 # in include files, which breaks this test.
391 # SunPRO cc is the second case below, it's also correct.
392 # OBSOLETE setup_xfail "a29k-*-udi"
393 send_gdb "list list0.c:main\n"
394 gdb_expect {
395 -re "1\[ \t\]+#include .*10\[ \t\]+x = 0;\r\n$gdb_prompt $" {
396 incr testcnt
397 }
398 -re "5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" {
399 pass "list function in source file 1"
400 }
401 -re ".*$gdb_prompt $" { fail "list list0.c:main" }
402 timeout { fail "list list0.c:main (timeout)" }
403 }
404
405 # The i960 is a second case
406 # OBSOLETE # The a29k-amd-udi is a second case
407
408 # Not sure what the point of having this function be unused is.
409 # AIX is legitimately removing it.
410 setup_xfail "rs6000-*-aix*"
411 send_gdb "list list0.c:unused\n"
412 gdb_expect {
413 -re "40\[ \t\]+unused.*43\[ \t\]+\}\r\n$gdb_prompt $" {
414 incr testcnt
415 }
416 -re "37.*42\[ \t\]+\}\r\n$gdb_prompt $" {
417 incr testcnt
418 }
419 -re ".*$gdb_prompt $" { fail "list list0.c:unused" }
420 timeout { fail "list list0.c:unused (timeout)" }
421 }
422 clear_xfail "rs6000-*-aix*"
423
424 # gcc appears to generate incorrect debugging information for code
425 # in include files, which breaks this test.
426 # Ultrix gdb is the second case, one line different but still correct.
427 # SunPRO cc is the third case.
428 setup_xfail "rs6000-*-*" 1804
429 setup_xfail "powerpc-*-*" 1804
430 # OBSOLETE setup_xfail "a29k-*-udi"
431 setup_xfail_format "DWARF 1"
432 setup_xfail_format "COFF"
433 send_gdb "list list0.h:foo\n"
434 gdb_expect {
435 -re "2\[ \t\]+including file. This.*11\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$gdb_prompt $" {
436 incr testcnt
437 }
438 -re "1\[ \t\]+/. An include file.*10\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$gdb_prompt $" {
439 incr testcnt
440 }
441 -re "3\[ \t\]+.*12\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$gdb_prompt $" {
442 incr testcnt
443 }
444 -re "No source file named list0.h.\r\n$gdb_prompt $" {
445 fail "list list0.h:foo"
446 }
447 -re ".*$gdb_prompt $" { fail "list list0.h:foo" }
448 timeout { fail "list list0.h:foo (timeout)" }
449 }
450
451 # Ultrix gdb is the second case.
452 # OBSOLETE # a29k-amd-udi is the third case.
453 send_gdb "list list1.c:bar\n"
454 gdb_expect {
455 -re "4\[ \t\]+void.*13\[ \t\]+\}\r\n$gdb_prompt $" {
456 incr testcnt
457 }
458 -re "4\[ \t\]+void.*12\[ \t\]*long_line ..;\r\n$gdb_prompt $" {
459 incr testcnt
460 }
461 -re "4\[ \t\]+void.*11\[ \t\]*\r\n$gdb_prompt $" {
462 incr testcnt
463 }
464 -re ".*$gdb_prompt $" { fail "list list1.c:bar" }
465 timeout { fail "list list1.c:bar (timeout)" }
466 }
467
468 # The i960 is a second case
469 # OBSOLETE # The a29k-amd-udi is a second case
470
471 # Not sure what the point of having this function be unused is.
472 # AIX is legitimately removing it.
473 setup_xfail "rs6000-*-aix*"
474 send_gdb "list list1.c:unused\n"
475 gdb_expect {
476 -re "12\[ \t\]+long_line \[(\]\[)\];.*13\[ \t\]+\}\r\n.*$gdb_prompt $" {
477 incr testcnt
478 }
479 -re "14.*19\[ \t\]+\}\r\n.*$gdb_prompt $" {
480 incr testcnt
481 }
482 -re ".*$gdb_prompt $" { fail "list list1.c:unused" }
483 timeout { fail "list list1.c:unused (timeout)" }
484 }
485 clear_xfail "rs6000-*-aix*"
486
487 pass "list filename:function ($testcnt tests)"
488
489 # Test some invalid specs
490 # The following test takes the FIXME result on most systems using
491 # DWARF. It fails to notice that main() is not in the file requested.
492
493 setup_xfail "*-*-*"
494
495 # Does this actually work ANYWHERE? I believe not, as this is an `aspect' of
496 # lookup_symbol(), where, when it is given a specific symtab which does not
497 # contain the requested symbol, it will subsequently search all of the symtabs
498 # for the requested symbol.
499
500 gdb_test "list list0.c:foo" "Function \"foo\" not defined in .*list0.c" "list filename:function; wrong filename rejected"
501
502 gdb_test "list foobar.c:main" "No source file named foobar.c.|Location not found" "list filename:function; nonexistant file"
503
504 setup_xfail_format "DWARF 1"
505 gdb_test "list list0.h:foobar" "Function \"foobar\" not defined.|Location not found" "list filename:function; nonexistant function"
506
507 }
508
509 proc test_forward_search {} {
510 global timeout
511
512 gdb_test "set listsize 4" ""
513 # On SunOS4, this gives us lines 19-22. On AIX, it gives us
514 # lines 20-23. This depends on whether the line number of a function
515 # is considered to be the openbrace or the first statement--either one
516 # is acceptable.
517 gdb_test "list long_line" "24\[ \t\]+long_line .*"
518
519 gdb_test "search 4321" " not found"
520
521 gdb_test "search 6789" "28\[ \t\]+oof .6789.;"
522
523 # Test that GDB won't crash if the line being searched is extremely long.
524
525 set oldtimeout $timeout
526 set timeout [expr "$timeout + 300"]
527 verbose "Timeout is now $timeout seconds" 2
528 gdb_test "search 1234" ".*1234.*" "search extremely long line (> 5000 chars)"
529 set timeout $oldtimeout
530 verbose "Timeout is now $timeout seconds" 2
531 }
532
533 # Start with a fresh gdb.
534
535 gdb_exit
536 gdb_start
537 gdb_reinitialize_dir $srcdir/$subdir
538 gdb_load ${binfile}
539
540 if [target_info exists gdb_stub] {
541 gdb_step_for_stub;
542 }
543
544 gdb_test "set width 0" "" "set width 0"
545
546 test_listsize
547 get_debug_format
548 if [ set_listsize 10 ] then {
549 test_list_include_file
550 test_list_filename_and_number
551 test_list_function
552 test_list_forward
553 test_list_backwards
554 test_repeat_list_command
555 test_list_range
556 test_list_filename_and_function
557 test_forward_search
558 }
559
560 remote_exec build "rm -f list0.h"
This page took 0.041512 seconds and 4 git commands to generate.