Stop assuming no-debug-info functions return int
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / info-os.exp
index 0168ccb3c18af3173233a2099c65e375f7fc3cf8..574da26c331ac1265be4eb7224f760b57185c638 100644 (file)
@@ -39,14 +39,18 @@ if ![runto_main] then {
 }
 
 # Get PID of test program.
-set inferior_pid -1
+set inferior_pid ""
 set test "get inferior process ID"
-gdb_test_multiple "call getpid()" $test {
+gdb_test_multiple "call (int) getpid()" $test {
     -re ".* = ($decimal).*$gdb_prompt $" {
        set inferior_pid $expect_out(1,string)
        pass $test
     }
 }
+if {$inferior_pid == ""} {
+    untested "failed to get pid"
+    return
+}
 
 gdb_breakpoint ${srcfile}:[gdb_get_line_number "Set breakpoint here"]
 gdb_continue_to_breakpoint "Set breakpoint here"
This page took 0.026049 seconds and 4 git commands to generate.