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

已完成

Hello,

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?

Thanks

评论操作 固定链接

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.

 

0

请先登录再写评论。