# Run; should stop at call0a and print actual arguments.
if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
gdb_run_cmd
- gdb_expect {
- -re ".* call0a \\(c=97 'a', s=1, i=2, l=3\\) .*$gdb_prompt $" {
- pass "run to call0a"
- }
- -re "$gdb_prompt $" { fail "run to call0a" ; gdb_suppress_tests }
- timeout { fail "(timeout) run to call0a" ; gdb_suppress_tests }
- }
+ gdb_test "" " call0a \\(c=97 'a', s=1, i=2, l=3\\) .*" "run to call0a"
# Print each arg as a double check to see if we can print
# them here as well as with backtrace.
# Run; should stop at call1a and print actual arguments.
if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
gdb_run_cmd
- gdb_expect {
- -re ".* call1a \\(uc=98 'b', us=6, ui=7, ul=8\\) .*$gdb_prompt $" {
- pass "run to call1a"
- }
- -re "$gdb_prompt $" { fail "run to call1a" ; gdb_suppress_tests; }
- timeout { fail "(timeout) run to call1a" ; gdb_suppress_tests; }
- }
+ gdb_test "" " call1a \\(uc=98 'b', us=6, ui=7, ul=8\\) .*" "run to call1a"
# Print each arg as a double check to see if we can print
# them here as well as with backtrace.
if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" "mips-sgi-irix5*" }
gdb_run_cmd
- gdb_expect {
- -re ".* call2a \\(c=97 'a', f1=4, s=1, d1=5, i=2, f2=4, l=3, d2=5\\) .*$gdb_prompt $" { pass "run to call2a" }
- -re ".* call2a \\(c=97 'a', f1=.*, s=1, d1=5, i=2, f2=4, l=3, d2=5\\) .*$gdb_prompt $" { xfail "run to call2a" }
- -re "$gdb_prompt $" { fail "run to call2a" ; gdb_suppress_tests; }
- timeout { fail "(timeout) run to call2a" ; gdb_suppress_tests; }
+ set test "run to call2a"
+ gdb_test_multiple "" $test {
+ -re ".* call2a \\(c=97 'a', f1=4, s=1, d1=5, i=2, f2=4, l=3, d2=5\\) .*$gdb_prompt $" {
+ pass $test
+ }
+ -re ".* call2a \\(c=97 'a', f1=.*, s=1, d1=5, i=2, f2=4, l=3, d2=5\\) .*$gdb_prompt $" {
+ xfail $test
+ }
}
# Print each arg as a double check to see if we can print
# Run; should stop at call1a and print actual arguments.
gdb_run_cmd
- gdb_expect {
- -re ".* callca \\(f1=1 \\+ 2 \\* I, f2=1 \\+ 2 \\* I, f3=1 \\+ 2 \\* I\\) .*$gdb_prompt $" { pass "run to call2a" }
- timeout { fail "(timeout) run to callca" ; gdb_suppress_tests; }
- }
+ gdb_test "" " callca \\(f1=1 \\+ 2 \\* I, f2=1 \\+ 2 \\* I, f3=1 \\+ 2 \\* I\\) .*" "run to call2a"
+
gdb_test "cont" ".* callcb \\(d1=3 \\+ 4 \\* I, d2=3 \\+ 4 \\* I, d3=3 \\+ 4 \\* I\\) .*" "continue to callcb"
gdb_test "cont" ".* callcc \\(ld1=5 \\+ 6 \\* I, ld2=5 \\+ 6 \\* I, ld3=5 \\+ 6 \\* I\\) .*" "continue to callcc"
gdb_test "cont" ".* callcd \\(fc1=1 \\+ 2 \\* I, dc1=3 \\+ 4 \\* I, ldc1=5 \\+ 6 \\* I\\) .*" "continue to callcd"
# Run; should stop at call1a and print actual arguments.
gdb_run_cmd
- gdb_expect {
- -re ".* callc1a \\(c=97 'a', s=1, i=2, ui=7, l=3, fc1=1 \\+ 2 \\* I, dc1=3 \\+ 4 \\* I, ldc1=5 \\+ 6 \\* I\\) .*$gdb_prompt $" { pass "run to callc1a" }
- timeout { fail "(timeout) run to callc1a" ; gdb_suppress_tests; }
- }
+ gdb_test "" " callc1a \\(c=97 'a', s=1, i=2, ui=7, l=3, fc1=1 \\+ 2 \\* I, dc1=3 \\+ 4 \\* I, ldc1=5 \\+ 6 \\* I\\) .*" "run to callc1a"
+
gdb_test "cont" ".* callc1b \\(ldc1=5 \\+ 6 \\* I\\, c=97 'a', s=1, i=2, fc1=1 \\+ 2 \\* I, ui=7, l=3, dc1=3 \\+ 4 \\* I\\) .*" "continue to callc1b"
}
# Run; should stop at call1a and print actual arguments.
gdb_run_cmd
- gdb_expect {
- -re ".* callc2a \\(c=97 'a', s=1, i=2, ui=7, l=3, f=4, d=5, fc1=1 \\+ 2 \\* I, dc1=3 \\+ 4 \\* I, ldc1=5 \\+ 6 \\* I\\) .*$gdb_prompt $" { pass "run to callc2a" }
- timeout { fail "(timeout) run to callc1a" ; gdb_suppress_tests; }
- }
+ gdb_test "" " callc2a \\(c=97 'a', s=1, i=2, ui=7, l=3, f=4, d=5, fc1=1 \\+ 2 \\* I, dc1=3 \\+ 4 \\* I, ldc1=5 \\+ 6 \\* I\\) .*" "run to callc2a"
+
gdb_test "cont" ".* callc2b \\(fc1=1 \\+ 2 \\* I, c=97 'a', s=1, i=2, ui=7, ldc1=5 \\+ 6 \\* I\\, l=3, f=4, d=5, dc1=3 \\+ 4 \\* I\\) .*" "continue to callc2b"
}
# Try dereferencing the arguments.
gdb_run_cmd
- gdb_expect {
- -re ".* call3a \\(cp=$hex <c> \"a.*\", sp=$hex <s>, ip=$hex <i>, lp=$hex <l>\\) .*$gdb_prompt $" { pass "run to call3a" }
- -re "$gdb_prompt $" { fail "run to call3a" ; gdb_suppress_tests; }
- timeout { fail "(timeout) run to call3a" ; gdb_suppress_tests; }
- }
+ gdb_test "" " call3a \\(cp=$hex <c> \"a.*\", sp=$hex <s>, ip=$hex <i>, lp=$hex <l>\\) .*" "run to call3a"
gdb_test "print *cp" ".* = 97 'a'"
gdb_test "print *sp" ".* = 1"
# Try dereferencing the arguments.
gdb_run_cmd
- gdb_expect {
- -re ".* call4a \\(stp=$hex <st>\\) .*$gdb_prompt $" {
- pass "run to call4a"
- }
- -re "$gdb_prompt $" { fail "run to call4a" ; gdb_suppress_tests; }
- timeout { fail "(timeout) run to call4a" ; gdb_suppress_tests; }
- }
+ gdb_test "" " call4a \\(stp=$hex <st>\\) .*" "run to call4a"
gdb_test "print *stp" ".* = \{s1 = 101, s2 = 102\}"
# Try dereferencing the arguments.
gdb_run_cmd
- gdb_expect {
- -re ".* call5a \\(st=\{s1 = 101, s2 = 102\}\\) .*$gdb_prompt $" {
- pass "run to call5a"
- }
- -re "$gdb_prompt $" { fail "run to call5a" ; gdb_suppress_tests; }
- timeout { fail "(timeout) run to call5a" ; gdb_suppress_tests; }
- }
+ gdb_test "" " call5a \\(st=\{s1 = 101, s2 = 102\}\\) .*" "run to call5a"
gdb_test "print st" ".* = \{s1 = 101, s2 = 102\}"
# Print backtrace.
gdb_run_cmd
- gdb_expect {
- -re ".*Breakpoint $decimal, call6a .*$gdb_prompt $" { pass "run to call6a" }
- -re "$gdb_prompt $" { fail "run to call6a" ; gdb_suppress_tests; }
- timeout { fail "(timeout) run to call6a" ; gdb_suppress_tests; }
- }
+ gdb_test "" "Breakpoint $decimal, call6a .*" "run to call6a"
setup_xfail "rs6000-*-*"
# Print backtrace.
gdb_run_cmd
- gdb_expect {
- -re ".*Breakpoint $decimal, call7a .*$gdb_prompt $" {
- pass "run to call7a"
- }
- -re "$gdb_prompt $" { fail "run to call7a" ; gdb_suppress_tests; }
- timeout { fail "(timeout) run to call7a" ; gdb_suppress_tests; }
- }
+ gdb_test "" "Breakpoint $decimal, call7a .*" "run to call7a"
if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" "mips-sgi-irix5*" }
gdb_test_multiple "backtrace 100" "backtrace from call7a" {
# Run; should stop at hitbottom and print actual arguments.
# Print backtrace.
gdb_run_cmd
- gdb_expect {
- -re ".*Breakpoint $decimal, hitbottom .*$gdb_prompt $" { pass "run to hitbottom" }
- -re "$gdb_prompt $" { fail "run to hitbottom" ; gdb_suppress_tests; }
- timeout { fail "(timeout) run to hitbottom" ; gdb_suppress_tests; }
- }
+ gdb_test "" "Breakpoint $decimal, hitbottom .*" "run to hitbottom"
if ![istarget sparclet-*-*] {
gdb_test_sequence "backtrace 100" "recursive passing of structs by value" {