[SOLVED] CLion remote debug cross-compiled application (Linux -> Windows)



I've created a Windows executable with debugging symbols using a docker based cross-compile toolchain.

The executable is copied to a Windows 10 machine and executed using mingw gdbserver.

In CLion I've setup a remote debug connection.

The debugger connects but no breakpoint is available: "The breakpoint will not currently be hit. No executable code is associated with this line."

I tried without symbol file and also giving the Windows executable as symbol file. 

Any hints?

Also, do i really need to setup Path mappings? There is no source code on the remote host, so what are the mappings good for in such a case?


1 comment
Comment actions Permalink

I will answer the questions myself.

Both the symbol file and path mapping are needed.

The path mapping translates the source file location from the debugging symbols to the the actual location on the local system (CLion).

In my case the problem was that due to the docker based cross-compile the path within the executable is the path of the project directory inside the docker container. In my case "/app".

So i needed to setup a path mapping for Remote "/app" to Local "<path to project dir>".

Now breakpoints are working as excpected.



Please sign in to leave a comment.