debugginggdbeclipse-cdtwindows-11cygwin-64

How can I fix the Eclipse error "Unable to execute MI command: -exec-run" (path error) that occurs debugging a CygWin64 app?


When I try to debug any application - even hello.c - using Eclipse 2023-06 under Windows 10/11 I always get the error:

[![Failed to execute MI command:
-exec-run
Error message from debugger back end:
Error creating process /cygdrive/c/Users/sirjo/Desktop/C:/Users/sirjo/eclipse-workspace/hello2/C:/Users/sirjo/eclipse-workspace/hello2/Debug/hello2.exe, (error 2).
Failed to execute MI command:
-exec-run]

error that clearly indicates - (error 2) - that the path is wrong.

I tried to search the internet for solutions, but none of the ones I found solved the problem; I also tried to change various configurations, but without getting a working solution.

Can anyone tell me what preferences or files I need to modify to get Eclipse to allow me proper debugging of Cygwin64 C/C++ applications on a Windows10/11 system?

enter image description here


Solution

  • After wasting a few days and reading a few things I think I figured out that it's the GDB/MI interface of some GDB versions of Cygwin higher than 9.2 that doesn't work properly with Eclipse (2023-06) under Windows 10/11.

    I was able, albeit with other easily configurable additional problems, to debug C/C++ programs in Eclipse (2023-06) using the 9.2 version of GDB for Cygwin.

    I add that under Linux the debugging of C/C++ applications using Eclipse 2023-06 works with all the latest versions of GDB.