From: Kung Hsu Date: Fri, 31 Mar 1995 02:09:59 +0000 (+0000) Subject: * gdb.base/list.exp: Adjust line contents after adding new lines in X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a04abeccfcbcad541012a1c9863f1b2b5b1f1ee1;p=binutils-gdb.git * gdb.base/list.exp: Adjust line contents after adding new lines in list0.c. Also fix a syntax error. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index b6a32b02b88..8083dd30706 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,8 @@ Thu Mar 30 15:36:55 1995 Kung Hsu + * gdb.base/list.exp: Adjust line contents after adding new lines in + list0.c. Also fix a syntax error. + * lib/gdb.exp (gdb_run_cmd): Special handling for targets use stubs. * gdb.base/break.exp: ditto. * gdb.base/list.exp: ditto. diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp index 16214c941f3..91bf2153432 100644 --- a/gdb/testsuite/gdb.base/list.exp +++ b/gdb/testsuite/gdb.base/list.exp @@ -86,7 +86,7 @@ proc test_listsize {} { setup_xfail "a29k-*-udi" send "list\n" expect { - -re "1\[ \t\]+#include \"list0.h\".*10\[ \t\]+foo .x\[+)\]+;\r\n$prompt $" { + -re "1\[ \t\]+#include \"list0.h\".*10\[ \t\]+x = 0;\r\n$prompt $" { pass "show default lines around main" } -re ".*$prompt $" { @@ -294,7 +294,7 @@ proc test_listsize {} { if [ set_listsize 100 ] then { send "list 1\n" expect { - -re "1\[ \t\]+#include \"list0.h\".*\r\n39\[ \t\]+\}\r\n$prompt $" { + -re "1\[ \t\]+#include \"list0.h\".*\r\n42\[ \t\]+\}\r\n$prompt $" { pass "list line 1 with listsize 100" } timeout { @@ -304,11 +304,11 @@ proc test_listsize {} { send "list 10\n" expect { - -re "1\[ \t\]+#include \"list0.h\".*\r\n39\[ \t\]+\}\r\n$prompt $" { - pass "list line 1 with listsize 100" + -re "1\[ \t\]+#include \"list0.h\".*\r\n42\[ \t\]+\}\r\n$prompt $" { + pass "list line 10 with listsize 100" } timeout { - fail "list line 1 with listsize 100" + fail "list line 10 with listsize 100" } } } @@ -501,7 +501,7 @@ proc test_list_function {} { setup_xfail "a29k-*-udi" send "list main\n" expect { - -re "1\[ \t\]+#include .*8\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { + -re "1\[ \t\]+#include .*8\[ \t\]+breakpoint\[(\]\[)\]+;\r\n$prompt $" { pass "list function in source file 1" } -re "2\[ \t\]+.*11\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { @@ -573,16 +573,16 @@ proc test_list_forward {} { send "list\n" expect { - -re "25\[ \t\]+foo \[(\]+.*\[)\]+;.*34\[ \t\]+\r\n$prompt $" { incr testcnt } + -re "25\[ \t\]+foo \[(\]+.*\[)\]+;.*34\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { incr testcnt } -re ".*$prompt $" { fail "list 25-34" ; return } timeout { fail "list 25-34 (timeout)" ; return } } send "list\n" expect { - -re "35\[ \t\]+static void.*39\[ \t\]+\}\r\n$prompt $" { incr testcnt } - -re ".*$prompt $" { fail "list 35-39" ; return } - timeout { fail "list 35-39 (timeout)" ; return } + -re "35\[ \t\]+foo \[(\]+.*\[)\]+;.*42\[ \t\]+\}\r\n$prompt $" { incr testcnt } + -re ".*$prompt $" { fail "list 35-42" ; return } + timeout { fail "list 35-42 (timeout)" ; return } } pass "successive list commands to page forward ($testcnt tests)" @@ -593,32 +593,32 @@ proc test_list_backwards {} { set testcnt 0 - send "list list0.c:30\n" + send "list list0.c:33\n" expect { - -re "25\[ \t\]+foo \[(\]+.*\[)\]+;.*34\[ \t\]+\r\n$prompt $" { incr testcnt } - -re ".*$prompt $" { fail "list list0.c:30" ; return } - timeout { fail "list list0.c:30" ; return } + -re "28\[ \t\]+foo \[(\]+.*\[)\]+;.*37\[ \t\]+\r\n$prompt $" { incr testcnt } + -re ".*$prompt $" { fail "list list0.c:33" ; return } + timeout { fail "list list0.c:33" ; return } } send "list -\n" expect { - -re "15\[ \t\]+foo \[(\]+.*\[)\]+;.*24\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { incr testcnt } - -re ".*$prompt $" { fail "list 15-24" ; return } - timeout { fail "list 15-24 (timeout)" ; return } + -re "18\[ \t\]+foo \[(\]+.*\[)\]+;.*27\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { incr testcnt } + -re ".*$prompt $" { fail "list 18-27" ; return } + timeout { fail "list 18-27 (timeout)" ; return } } send "list -\n" expect { - -re "5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { incr testcnt } - -re ".*$prompt $" { fail "list 5-14" ; return } - timeout { fail "list 5-14 (timeout)" ; return } + -re "8\[ \t\]+breakpoint\[(\]\[)\];.*17\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { incr testcnt } + -re ".*$prompt $" { fail "list 8-17" ; return } + timeout { fail "list 8-17 (timeout)" ; return } } send "list -\n" expect { - -re "1\[ \t\]+#include .*4\[ \t\]+\{\r\n$prompt $" { incr testcnt } - -re ".*$prompt $" { fail "list 1-4" ; return } - timeout { fail "list 1-4 (timeout)" ; return } + -re "1\[ \t\]+#include .*7\[ \t\]+set_debug_traps\[(\]\[)\]+;\r\n$prompt $" { incr testcnt } + -re ".*$prompt $" { fail "list 1-7" ; return } + timeout { fail "list 1-7 (timeout)" ; return } } pass "$testcnt successive \"list -\" commands to page backwards" @@ -667,22 +667,22 @@ proc test_list_range {} { #timeout { fail "-100,-40" } #} - send "list 30,40\n" + send "list 30,43\n" expect { - -re "30\[ \t\]+foo \[(\]+.*\[)\]+;.*39\[ \t\]+\}\r\n$prompt $" { + -re "30\[ \t\]+foo \[(\]+.*\[)\]+;.*42\[ \t\]+\}\r\n$prompt $" { pass "list range; upper bound past EOF" } - -re ".*$prompt $" { fail "list 30,40" } - timeout { fail "list 30,40" } + -re ".*$prompt $" { fail "list 30,43" } + timeout { fail "list 30,43" } } - send "list 40,100\n" + send "list 43,100\n" expect { - -re "Line number 40 out of range; .*list0.c has 39 lines.\r\n$prompt $" { + -re "Line number 43 out of range; .*list0.c has 42 lines.\r\n$prompt $" { pass "list range; both bounds past EOF" } - -re ".*$prompt $" { fail "40,100" } - timeout { fail "40,100" } + -re ".*$prompt $" { fail "43,100" } + timeout { fail "43,100" } } send "list list0.c:2,list1.c:17\n" @@ -711,7 +711,7 @@ proc test_list_filename_and_function {} { setup_xfail "a29k-*-udi" send "list list0.c:main\n" expect { - -re "1\[ \t\]+#include .*8\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { + -re "1\[ \t\]+#include .*8\[ \t\]+breakpoint\[(\]\[)\]+;\r\n$prompt $" { incr testcnt } -re "2\[ \t\]+.*11\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { @@ -728,10 +728,10 @@ proc test_list_filename_and_function {} { setup_xfail "rs6000-*-aix*" send "list list0.c:unused\n" expect { - -re "32\[ \t\]+foo \[(\]+.*\[)\]+;.*39\[ \t\]+\}\r\n$prompt $" { + -re "36\[ \t\]+\}.*42\[ \t\]+\}\r\n$prompt $" { incr testcnt } - -re "34.*39\[ \t\]+\}\r\n$prompt $" { + -re "36.*42\[ \t\]+\}\r\n$prompt $" { incr testcnt } -re ".*$prompt $" { fail "list list0.c:unused" } @@ -907,6 +907,7 @@ if $usestubs { -re "main.* at .*$prompt $" {} timeout { fail "single step at breakpoint() (timeout)" ; return 0 } } +} send "set width 0\n" expect -re "$prompt $"