无法远程调试远程计算机上的应用程序。连接CodeLite IDE 12.0.10版和GNU gdbserver(GDB)7.6.1版时,会发生此问题。 CodeLite IDE在本地计算机上运行。 GNU gdbserver在远程计算机上运行。
您需要调试的调试构建应用程序已预先复制到远程计算机。 GNU gdbserver以参数开头。 GNU gdbserver侦听指定的端口。 GNU gdbserver启动示例:
gdbserver.exe:端口名_application.exe
在本地计算机上,在“调试器”选项卡的IDE CodeLite(设置)中已编译应用程序的项目设置中,通过在“调试远程目标”字段中设置daw来设置远程调试。在“主机/ tty”字段中,设置了远程计算机的IP。在“端口”字段中,设置了端口。
成功连接IDE CodeLite和GNU gdbserver之后,将在IDE CodeLite中的本地计算机上启动调试的应用程序。应用程序因错误而崩溃。据推测,远程计算机上正在运行的应用程序将访问这些库,但找不到它们。
错误代码:
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
如何使用库指定路径GDBServer?