X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gdb%2Ftestsuite%2Fgdb.python%2Fpy-sync-interp.exp;h=d62f9661666cbafe742efb87e65a7dd6dce17c26;hb=a0eaec95753c0f093f5cb80080ef423030d35edd;hp=b9b86bc9215e33b952b6cd7911b95f928447d816;hpb=31b638d39a426599109be120a9e547126397d40f;p=platform%2Fupstream%2Fgdb.git diff --git a/gdb/testsuite/gdb.python/py-sync-interp.exp b/gdb/testsuite/gdb.python/py-sync-interp.exp index b9b86bc..d62f966 100644 --- a/gdb/testsuite/gdb.python/py-sync-interp.exp +++ b/gdb/testsuite/gdb.python/py-sync-interp.exp @@ -41,15 +41,7 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } { return -1 } -# Start the program running and then wait for a bit, to be sure -# that it can be attached to. -set testpid [eval exec $binfile &] -exec sleep 2 -if { [istarget "*-*-cygwin*"] } { - # testpid is the Cygwin PID, GDB uses the Windows PID, which might be - # different due to the way fork/exec works. - set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ] -} +set testpid [spawn_wait_for_attach $binfile] # Test command 'where' is executed when command 'attach' is done, otherwise # function 'sleep' may not show up in backtrace.