diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/info-os.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/info-os.exp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.base/info-os.exp b/gdb/testsuite/gdb.base/info-os.exp index 0168ccb..574da26 100644 --- a/gdb/testsuite/gdb.base/info-os.exp +++ b/gdb/testsuite/gdb.base/info-os.exp @@ -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" |