+2019-10-03 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * gdb.reverse/break-precsave.exp: Make test names unique.
+ * gdb.reverse/break-reverse.exp: Likewise.
+ * gdb.reverse/finish-precsave.exp: Likewise.
+ * gdb.reverse/finish-reverse.exp: Likewise.
+ * gdb.reverse/machinestate-precsave.exp: Likewise.
+ * gdb.reverse/machinestate.exp: Likewise.
+ * gdb.reverse/readv-reverse.exp: Likewise.
+ * gdb.reverse/recvmsg-reverse.exp: Likewise.
+ * gdb.reverse/sigall-precsave.exp: Likewise.
+ * gdb.reverse/sigall-reverse.exp: Likewise.
+ * gdb.reverse/step-indirect-call-thunk.exp: Likewise.
+ * gdb.reverse/watch-precsave.exp: Likewise.
+ * gdb.reverse/watch-reverse.exp: Likewise.
+
2019-10-03 Andrew Burgess <andrew.burgess@embecosm.com>
* gdb.threads/stop-with-handle.c: New file.
"Breakpoint $decimal at .* line $bar_location\." \
"set breakpoint on bar"
- gdb_continue_to_breakpoint "foo" ".*$srcfile:$foo_location.*"
- gdb_continue_to_breakpoint "bar" ".*$srcfile:$bar_location.*"
+ gdb_continue_to_breakpoint "foo forward after restore" \
+ ".*$srcfile:$foo_location.*"
+ gdb_continue_to_breakpoint "bar forward after restore" \
+ ".*$srcfile:$bar_location.*"
gdb_test_multiple "continue" "go to end of main forward" {
-re ".*Breakpoint $decimal,.*$srcfile:$end_location.*$gdb_prompt $" {
pass "go to end of main forward"
gdb_test_no_output "set exec-direction forward" "set forward"
- gdb_continue_to_breakpoint "foo" ".*$srcfile:$foo_location.*"
- gdb_continue_to_breakpoint "bar" ".*$srcfile:$bar_location.*"
+ gdb_continue_to_breakpoint "foo forward again" \
+ ".*$srcfile:$foo_location.*"
+ gdb_continue_to_breakpoint "bar forward again" \
+ ".*$srcfile:$bar_location.*"
gdb_test_multiple "continue" "end of record log" {
-re ".*Breakpoint $decimal,.*$srcfile:$end_location.*$gdb_prompt $" {
"Breakpoint $decimal at .* line $end_location\." \
"set breakpoint at end of main"
-gdb_continue_to_breakpoint "foo" ".*$srcfile:$foo_location.*"
-gdb_continue_to_breakpoint "bar" ".*$srcfile:$bar_location.*"
-gdb_continue_to_breakpoint "end" ".*$srcfile:$end_location.*"
+gdb_continue_to_breakpoint "foo forward, the first time" \
+ ".*$srcfile:$foo_location.*"
+gdb_continue_to_breakpoint "bar forward, the first time" \
+ ".*$srcfile:$bar_location.*"
+gdb_continue_to_breakpoint "end forward, the first time" \
+ ".*$srcfile:$end_location.*"
gdb_test_no_output "set exec-direction reverse" "set reverse"
gdb_test_no_output "set exec-direction forward" "set forward"
-gdb_continue_to_breakpoint "foo" ".*$srcfile:$foo_location.*"
-gdb_continue_to_breakpoint "bar" ".*$srcfile:$bar_location.*"
+gdb_continue_to_breakpoint "foo forward again" \
+ ".*$srcfile:$foo_location.*"
+gdb_continue_to_breakpoint "bar forward again" \
+ ".*$srcfile:$bar_location.*"
gdb_test_multiple "continue" "end of record log" {
-re ".*Breakpoint $decimal,.*$srcfile:$end_location.*$gdb_prompt $" {
# Test reverse finish from long long func
set breakloc [gdb_get_line_number "LONG LONG FUNC" "$srcfile"]
-gdb_continue_to_breakpoint "long_long_func" ".*$srcfile:$breakloc.*"
+gdb_continue_to_breakpoint "long_long_func backward" \
+ ".*$srcfile:$breakloc.*"
set test_msg "reverse finish from long_long_func"
gdb_test_multiple "finish" "$test_msg" {
# Test reverse finish from long func
set breakloc [gdb_get_line_number "LONG FUNC" "$srcfile"]
-gdb_continue_to_breakpoint "long_func" ".*$srcfile:$breakloc.*"
+gdb_continue_to_breakpoint "long_func backward" \
+ ".*$srcfile:$breakloc.*"
set test_msg "reverse finish from long_func"
gdb_test_multiple "finish" "$test_msg" {
# Test reverse finish from int func
set breakloc [gdb_get_line_number "INT FUNC" "$srcfile"]
-gdb_continue_to_breakpoint "int_func" ".*$srcfile:$breakloc.*"
+gdb_continue_to_breakpoint "int_func backward" \
+ ".*$srcfile:$breakloc.*"
set test_msg "reverse finish from int_func"
gdb_test_multiple "finish" "$test_msg" {
# Test reverse finish from short func
set breakloc [gdb_get_line_number "SHORT FUNC" "$srcfile"]
-gdb_continue_to_breakpoint "short_func" ".*$srcfile:$breakloc.*"
+gdb_continue_to_breakpoint "short_func backward" \
+ ".*$srcfile:$breakloc.*"
set test_msg "reverse finish from short_func"
gdb_test_multiple "finish" "$test_msg" {
# Test reverse finish from char func
set breakloc [gdb_get_line_number "CHAR FUNC" "$srcfile"]
-gdb_continue_to_breakpoint "char_func" ".*$srcfile:$breakloc.*"
+gdb_continue_to_breakpoint "char_func backward" \
+ ".*$srcfile:$breakloc.*"
set test_msg "reverse finish from char_func"
gdb_test_multiple "finish" "$test_msg" {
# Test reverse finish from void func
set breakloc [gdb_get_line_number "VOID FUNC" "$srcfile"]
-gdb_continue_to_breakpoint "void_func" ".*$srcfile:$breakloc.*"
+gdb_continue_to_breakpoint "void_func backward" \
+ ".*$srcfile:$breakloc.*"
set test_msg "reverse finish from void_func"
gdb_test_multiple "finish" "$test_msg" {
# Test reverse finish from long long func
set breakloc [gdb_get_line_number "LONG LONG FUNC" "$srcfile"]
-gdb_continue_to_breakpoint "long_long_func" ".*$srcfile:$breakloc.*"
+gdb_continue_to_breakpoint "long_long_func backward" \
+ ".*$srcfile:$breakloc.*"
set test_msg "reverse finish from long_long_func"
gdb_test_multiple "finish" "$test_msg" {
# Test reverse finish from long func
set breakloc [gdb_get_line_number "LONG FUNC" "$srcfile"]
-gdb_continue_to_breakpoint "long_func" ".*$srcfile:$breakloc.*"
+gdb_continue_to_breakpoint "long_func backward" \
+ ".*$srcfile:$breakloc.*"
set test_msg "reverse finish from long_func"
gdb_test_multiple "finish" "$test_msg" {
# Test reverse finish from int func
set breakloc [gdb_get_line_number "INT FUNC" "$srcfile"]
-gdb_continue_to_breakpoint "int_func" ".*$srcfile:$breakloc.*"
+gdb_continue_to_breakpoint "int_func backward" \
+ ".*$srcfile:$breakloc.*"
set test_msg "reverse finish from int_func"
gdb_test_multiple "finish" "$test_msg" {
# Test reverse finish from short func
set breakloc [gdb_get_line_number "SHORT FUNC" "$srcfile"]
-gdb_continue_to_breakpoint "short_func" ".*$srcfile:$breakloc.*"
+gdb_continue_to_breakpoint "short_func backward" \
+ ".*$srcfile:$breakloc.*"
set test_msg "reverse finish from short_func"
gdb_test_multiple "finish" "$test_msg" {
# Test reverse finish from char func
set breakloc [gdb_get_line_number "CHAR FUNC" "$srcfile"]
-gdb_continue_to_breakpoint "char_func" ".*$srcfile:$breakloc.*"
+gdb_continue_to_breakpoint "char_func backward" \
+ ".*$srcfile:$breakloc.*"
set test_msg "reverse finish from char_func"
gdb_test_multiple "finish" "$test_msg" {
# Test reverse finish from void func
set breakloc [gdb_get_line_number "VOID FUNC" "$srcfile"]
-gdb_continue_to_breakpoint "void_func" ".*$srcfile:$breakloc.*"
+gdb_continue_to_breakpoint "void_func backward" \
+ ".*$srcfile:$breakloc.*"
set test_msg "reverse finish from void_func"
gdb_test_multiple "finish" "$test_msg" {
gdb_test "print a" ".* = 0$newline" "register var reverse-breakpoint"
gdb_test "step" ".* register post-change .*" ""
-gdb_test "print a" ".* = 1$newline" "register var step post-change"
+gdb_test "print a" ".* = 1$newline" \
+ "register var step post-change, first time"
gdb_test "reverse-step" ".*$newline$breakloc.*" ""
gdb_test "print a" ".* = 0$newline" "register var reverse step-to"
gdb_test "step" ".*$newline$breakloc.*" ""
gdb_test "print a" ".* = 0$newline" "register var forward step-to"
gdb_test "step" ".* register post-change .*" ""
-gdb_test "print a" ".* = 1$newline" "register var step post-change"
+gdb_test "print a" ".* = 1$newline" \
+ "register var step post-change, second time"
# Auto variable, forward
gdb_test "step" ".* register post-change .*" ""
gdb_test "print a" ".* = 1$newline" "register var step post-change"
gdb_test "reverse-step" ".*$newline$breakloc.*" ""
-gdb_test "print a" ".* = 0$newline" "register var reverse step-to"
+gdb_test "print a" ".* = 0$newline" \
+ "register var reverse step-to, first time"
# Proceed to beginning of main
gdb_test "step" ".*$newline$breakloc.*" ""
gdb_test "print a" ".* = 0$newline" "register var forward step-to"
gdb_test "step" ".* register post-change .*" ""
-gdb_test "print a" ".* = 1$newline" "register var step post-change"
+gdb_test "print a" ".* = 1$newline" \
+ "register var step post-change, second time"
# Auto variable, forward
# will be remembered. If not, new contents ("NUXI") will be
# used, and the test will fail.
-gdb_test "print (int)buf\[0]" ".* = 0" "check readv record"
-gdb_test "print (int)buf\[1]" ".* = 0" "check readv record"
-gdb_test "print (int)buf\[2]" ".* = 0" "check readv record"
-gdb_test "print (int)buf\[3]" ".* = 0" "check readv record"
+for { set i 0 } { $i < 4 } { incr i } {
+ gdb_test "print (int)buf\[$i]" ".* = 0" \
+ "check readv record for buf\[$i\]"
+}
gdb_test "print rdata" ".* = \"xxxx\"" "check recvmsg record - rdata"
# rmsg.msg_flags should be zeros, not MSG_TRUNC | MSG_CTRUNC
-gdb_test "print rmsg.msg_flags" ".* = 0" "check recvmsg record - rmsg"
+gdb_test "print rmsg.msg_flags" ".* = 0" \
+ "check recvmsg record - rmsg.msg_flags"
# rmsg.msg_controllen should be sizeof rc, not actual size of control data
# (7 bytes less)
-gdb_test "print rmsg.msg_controllen - sizeof rc" ".* = 0" "check recvmsg record - rmsg"
+gdb_test "print rmsg.msg_controllen - sizeof rc" ".* = 0" \
+ "check recvmsg record - rmsg.msg_controllen"
# rc should be zeros, not received cmsg
gdb_test "print ((struct cmsghdr *)rc)->cmsg_len" ".* = 0" "check recvmsg record - cmsg"
-re "Program received signal SIG$prevsig.*$gdb_prompt " {
pass "reverse to signal event, $prevsig"
- set nested_testmsg "reverse signal delivered"
+ set nested_testmsg "reverse signal $prevsig delivered"
gdb_test_multiple "frame" $nested_testmsg {
-re ".*handle_$prevsig.*$gdb_prompt " {
fail "$nested_testmsg (wrong location)"
set thissig "ABRT"
# test signal handling
-foreach sig [lrange $signals 1 end] {
- test_one_sig $sig
+with_test_prefix "sig-test-1" {
+ foreach sig [lrange $signals 1 end] {
+ test_one_sig $sig
+ }
}
# The last signal (SIGTERM) gets handled slightly differently because
set sig_supported 1
set thissig "ABRT"
-foreach sig [lrange $signals 1 end] {
- test_one_sig $sig
+with_test_prefix "sig-test-2" {
+ foreach sig [lrange $signals 1 end] {
+ test_one_sig $sig
+ }
}
-re "Program received signal SIG$prevsig.*$gdb_prompt " {
pass "reverse to signal event, $prevsig"
- set nested_testmsg "reverse signal delivered"
+ set nested_testmsg "reverse signal $prevsig delivered"
gdb_test_multiple "frame" $nested_testmsg {
-re ".*handle_$prevsig.*$gdb_prompt " {
fail "$nested_testmsg (wrong location)"
set thissig "ABRT"
# test signal handling
-foreach sig [lrange $signals 1 end] {
- test_one_sig $sig
+with_test_prefix "sig-test-1" {
+ foreach sig [lrange $signals 1 end] {
+ test_one_sig $sig
+ }
}
# The last signal (SIGTERM) gets handled slightly differently because
set sig_supported 1
set thissig "ABRT"
-foreach sig [lrange $signals 1 end] {
- test_one_sig $sig
+with_test_prefix "sig-test-2" {
+ foreach sig [lrange $signals 1 end] {
+ test_one_sig $sig
+ }
}
gdb_test "reverse-step" "inc\.3.*" "reverse-step into inc"
gdb_test "reverse-step" "inc\.2.*" "reverse-step inside inc"
gdb_test "reverse-step" "apply\.2.*" \
- "reverse-step through call thunk into apply"
+ "reverse-step through call thunk into apply, first time"
gdb_test "reverse-step" "main\.2.*" "reverse-step into main"
gdb_test "step" "apply\.2.*" "step into apply"
gdb_test "step" "inc\.2.*" "step through call thunk into inc"
gdb_test "reverse-step" "apply\.2.*" \
- "reverse-step through call thunk into apply"
+ "reverse-step through call thunk into apply, second time"
gdb_test "next" "apply\.3.*" "step through thunks and over inc"
gdb_test "reverse-next" "apply\.2.*" \
"reverse-step through thunks and over inc"
###
###
-gdb_test_no_output "set exec-direction reverse" "set reverse"
+gdb_test_no_output "set exec-direction reverse" \
+ "set reverse, first time"
# Reverse until the previous change, from 4 to 3
# Note that this one is outside the loop
###
###
-gdb_test_no_output "set exec-direction reverse" "set reverse"
+gdb_test_no_output "set exec-direction reverse" \
+ "set reverse, second time"
# Reverse until the previous change, from 4 to 3
# Note that this one is outside the loop
###
###
-gdb_test_no_output "set exec-direction reverse" "set reverse"
+gdb_test_no_output "set exec-direction reverse" \
+ "set reverse, first time"
# Reverse until the previous change, from 4 to 3
# Note that this one is outside the loop
###
###
-gdb_test_no_output "set exec-direction reverse" "set reverse"
+gdb_test_no_output "set exec-direction reverse" \
+ "set reverse, second time"
# Reverse until the previous change, from 4 to 3
# Note that this one is outside the loop