]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.threads/siginfo-threads.exp
Stop assuming no-debug-info functions return int
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.threads / siginfo-threads.exp
index 328168c8eb3970b7ca8d5cd95d95438cb9519154..8ee4c36644cf50badb214af6b1f3bdd45ca1f6fe 100644 (file)
@@ -40,12 +40,17 @@ gdb_test "handle SIGUSR2 stop print pass" \
 gdb_breakpoint [gdb_get_line_number "break-at-exit"]
 
 set test "get pid"
-gdb_test_multiple "p getpid ()" $test {
+set pid ""
+gdb_test_multiple "p (int) getpid ()" $test {
     -re " = (\[0-9\]+)\r\n$gdb_prompt $" {
        set pid $expect_out(1,string)
        pass $test
     }
 }
+if {$pid == ""} {
+    untested "failed to get pid"
+    return
+}
 
 for {set sigcount 0} {$sigcount < 4} {incr sigcount} {
     set test "catch signal $sigcount"