diff --git a/gdb/testsuite/gdb.arch/amd64-disp-step.exp b/gdb/testsuite/gdb.arch/amd64-disp-step.exp --- a/gdb/testsuite/gdb.arch/amd64-disp-step.exp +++ b/gdb/testsuite/gdb.arch/amd64-disp-step.exp @@ -222,7 +222,10 @@ proc rip_test { reg test_start_label tes # If we use 'signal' to send the signal GDB doesn't actually do # the displaced step, but instead just delivers the signal. set inferior_pid [get_inferior_pid] - remote_exec target "kill -ALRM $inferior_pid" + # Ensure that $inferior_pid refers to a single process. + if {$inferior_pid > 0} { + remote_exec target "kill -ALRM $inferior_pid" + } } gdb_test "continue" \