]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
testsuite: get windows PID on MinGW target
authorRohr, Stephan <stephan.rohr@intel.com>
Thu, 20 Mar 2025 13:07:15 +0000 (14:07 +0100)
committerStephan Rohr <stephan.rohr@intel.com>
Wed, 14 May 2025 16:14:16 +0000 (09:14 -0700)
Also translate the MinGW PID to the Windows PID when running on a MinGW
target.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/lib/gdb.exp

index 2a5d37c0657dc1bcf495361ead69dc3ecb504d01..1b04cdc7e2814c8b901728365b220784c0ad6b85 100644 (file)
@@ -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; }" ]