From: Rohr, Stephan Date: Thu, 20 Mar 2025 13:07:15 +0000 (+0100) Subject: testsuite: get windows PID on MinGW target X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=18335ab52002c9ccad7165dcc3d7129e59419009;p=thirdparty%2Fbinutils-gdb.git testsuite: get windows PID on MinGW target Also translate the MinGW PID to the Windows PID when running on a MinGW target. Approved-By: Tom Tromey --- diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 2a5d37c0657..1b04cdc7e28 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -6920,7 +6920,7 @@ proc kill_wait_spawned_process { proc_spawn_id } { proc spawn_id_get_pid { spawn_id } { set testpid [exp_pid -i $spawn_id] - if { [istarget "*-*-cygwin*"] } { + if { [istarget "*-*-cygwin*"] || [istarget "*-*-mingw*"] } { # testpid is the Cygwin PID, GDB uses the Windows PID, which # might be different due to the way fork/exec works. set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ]