X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=gdb%2Ftestsuite%2Fgdb.threads%2Flinux-dp.exp;h=18febdc2411fef4f0ba0f4395fe1b40e45665d1a;hb=c2d11a7da0372ef052af1c74d56e264d8aae4743;hp=87dc868f9d48359ea4e43bd8213c62e50b4cf2e3;hpb=1e37c28164d4f504b2ae8189d0b82a862cfa323d;p=thirdparty%2Fbinutils-gdb.git diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.threads/linux-dp.exp index 87dc868f9d4..18febdc2411 100644 --- a/gdb/testsuite/gdb.threads/linux-dp.exp +++ b/gdb/testsuite/gdb.threads/linux-dp.exp @@ -66,7 +66,25 @@ gdb_test "info threads" "" "info threads 1" gdb_breakpoint [gdb_get_line_number "linuxthreads.exp: create philosopher"] for {set i 0} {$i < 5} {incr i} { gdb_continue_to_breakpoint "about to create philosopher: $i" - gdb_test "next" "\\\[New Thread .*\\\].*" "create philosopher: $i" + send_gdb "next\n" + gdb_expect { + -re "\\\[New Thread .*\\\].*$gdb_prompt $" { + pass "create philosopher: $i" + } + -re "Program received signal.*(Unknown signal|SIGUSR).*$gdb_prompt $" { + # It would be nice if we could catch the message that GDB prints + # when it first notices that the thread library doesn't support + # debugging, or if we could explicitly ask GDB somehow. + unsupported "This GDB does not support threads on this system." + return -1 + } + -re "$gdb_prompt $" { + fail "create philosopher: $i" + } + timeout { + fail "(timeout) create philosopher: $i" + } + } } # Run until there are some threads.