Cannot remotely debug an application on a remote computer. The problem occurs when connecting the CodeLite IDE version 12.0.10 and GNU gdbserver (GDB) version 7.6.1. The CodeLite IDE runs on the local computer; GNU gdbserver runs on the remote computer.
The debug build application that you need to debug is pre-copied to the remote computer. GNU gdbserver starts with parameters. GNU gdbserver listens on the specified port. GNU gdbserver startup example:
gdbserver.exe: port name_application.exe
On the local computer, in the project settings of the compiled application in the IDE CodeLite (Settings) in the Debugger tab, remote debugging is set by setting a daw in the "Debugging a remote target" field. In the field "Host / tty" the ip of the remote computer is set. In the "Port" field, the port is set.
After successfully connecting the IDE CodeLite and GNU gdbserver, a debugged application is launched on the local computer in the IDE CodeLite. The application crashes with an error. Presumably, the running application on the remote computer accesses the libraries and cannot find them.
Error code:
Reading C:\WINDOWS\SysWOW64\IPHLPAPI.DLL from remote target...
0x76fef147 in ?? ()
Successfully connected to debugger server
Applying breakpoints...
Applying breakpoints... done
Successfully set breakpoint 2 at: K:\Work\Repositories\MainFrame.cpp:33
Continuing...
Reading C:\WINDOWS\SysWOW64\imm32.dll from remote target...
Thread 1 hit Temporary breakpoint 1, 0x008e9c9e in main ()
Internal breakpoint was hit (id=1), Applying user breakpoints and continuing
Continuing...
Reading C:\WINDOWS\SysWOW64\msctf.dll from remote target...
\nThread
2 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 9272]
0x07850006 in ?? ()
Program Received signal SIGSEGV
How to specify a path GDBServer with libraries?