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 $" {
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 {
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"
}
}
}
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 $" {
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)"
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"
#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"
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 $" {
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" }
-re "main.* at .*$prompt $" {}
timeout { fail "single step at breakpoint() (timeout)" ; return 0 }
}
+}
send "set width 0\n"
expect -re "$prompt $"