gdb/testsuite/ChangeLog 2016-01-08 Jan Kratochvil * gdb.base/foll-vfork.exp (tcatch_vfork_then_parent_follow) (tcatch_vfork_then_child_follow_exec) (tcatch_vfork_then_child_follow_exit): Revert back DWARF vfork identification. diff --git a/gdb/testsuite/gdb.base/foll-vfork.exp b/gdb/testsuite/gdb.base/foll-vfork.exp index efa1b39..ebbe4ad 100644 --- a/gdb/testsuite/gdb.base/foll-vfork.exp +++ b/gdb/testsuite/gdb.base/foll-vfork.exp @@ -222,8 +222,17 @@ proc tcatch_vfork_then_parent_follow {} { gdb_test_no_output "set follow-fork parent" gdb_test "tcatch vfork" "Catchpoint .*(vfork).*" - gdb_test "continue" "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*" \ - "continue to vfork" + + # It may stop in either "vfork" or "_vfork". + set test "continue to vfork" + gdb_test_multiple "continue" $test { + -re "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*$gdb_prompt " { + pass $test + } + -re "vfork \\(\\) at.*$gdb_prompt " { + pass $test + } + } set linenum [gdb_get_line_number "pid = vfork ();"] set test "finish" @@ -254,8 +263,17 @@ proc tcatch_vfork_then_child_follow_exec {} { gdb_test_no_output "set follow-fork child" gdb_test "tcatch vfork" "Catchpoint .*(vfork).*" - gdb_test "continue" "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*" \ - "continue to vfork" + + # It may stop in either "vfork" or "_vfork". + set test "continue to vfork" + gdb_test_multiple "continue" $test { + -re "vfork \\(\\) at .*$gdb_prompt $" { + pass $test + } + -re "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*$gdb_prompt " { + pass $test + } + } set linenum1 [gdb_get_line_number "pid = vfork ();"] set linenum2 [gdb_get_line_number "printf(\"Hello from vforked-prog" ${srcfile2}] @@ -290,8 +308,17 @@ proc tcatch_vfork_then_child_follow_exit {} { gdb_test_no_output "set follow-fork child" gdb_test "tcatch vfork" "Catchpoint .*(vfork).*" - gdb_test "continue" "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*" \ - "continue to vfork" + + # It may stop in either "vfork" or "_vfork". + set test "continue to vfork" + gdb_test_multiple "continue" $test { + -re "vfork \\(\\) at .*$gdb_prompt $" { + pass $test + } + -re "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*$gdb_prompt " { + pass $test + } + } set test "finish" gdb_test_multiple "finish" $test {