在没有gdbserver的情况下如何使用Eclipse CDT进行远程调试? [英] How to do remote debugging with Eclipse CDT without gdbserver?

查看:154
本文介绍了在没有gdbserver的情况下如何使用Eclipse CDT进行远程调试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在Windows上使用Eclipse CDT 5 C ++ IDE在远程AIX主机上开发C ++应用程序。

We're using the Eclipse CDT 5 C++ IDE on Windows to develop a C++ application on a remote AIX host.

Eclipse CDT能够使用gdbserver执行远程调试。不幸的是,AIX不支持gdbserver。

Eclipse CDT has the ability to perform remote debugging using gdbserver. Unfortunately, gdbserver is not supported on AIX.

是否有人熟悉使用不带gdbserver的Eclipse CDT进行远程调试的方法?

Is anyone familiar with a way to debug remotely using Eclipse CDT without gdbserver? Perhaps using an SSH shell connection to gdb?

推荐答案

终于可以使gdb远程运行了。在任务栏上的错误符号中,我进行了调试配置-GDB硬件调试。

finally I got gdb run remotly anyhow now. At the Bug-symbol on the taskbar I took Debug Configurations - GDB Hardware Debugging.

在主要C / C ++应用程序中,我在可执行文件的Samba共享上设置了完整路径。 ( X:\abin\vlmi9506 )。我还在项目中的 X:\abin 上设置了一个链接文件夹。然后,我在GDB安装程序中修改了我的批处理脚本。它不是在plink-session中直接调用gdb,而是在unix-shell-script中打开gdb。这样,我就有可能在调试之前为程序设置一些unix环境变量。我的批次中的呼叫:

In Main C/C++ Applications I set the full path on the Samba share of the executable (X:\abin\vlmi9506). I also set a linked folder on X:\abin in the project. Then I modified my batch-script in GDB Setup. It's not directly calling gdb in the plink-session but a unix-shell-script, which opens gdb. By this I have the possibility to set some unix environment-variables for the program before doing debug. The call in my batch:

plink.exe prevoax1 -l suttera -pw XXXXX -i /proj/user/dev/suttera/vl/9506/test/vlmi9506ddd.run 20155 dev o m

在Unix脚本中,我以我在以前的尝试中发现的eclipse命令行参数。 shell命令中的调用如下所示:

In the unix script I started gdb with the command line params from eclipse, that I found in my former tryals. The call in the shell command looks like this:

gdb -nw -i mi -cd=$LVarPathExec $LVarPathExec/vlmi9506

然后IBM刚刚为AIX提供了gdb 6.0。我在 http://www.perzl.org的网上找到了6.8版。 /aix/index.php?n=Main.Gdb 。我们的管理员已经安装了它。

Then IBM just gives gdb 6.0 for AIX. I found version 6.8 in the net at http://www.perzl.org/aix/index.php?n=Main.Gdb. Our Admin installed it.

我现在可以逐步执行程序并观察变量。我什至可以直接在控制台视图中编写gdb命令。 yabadabadooooooo

I can now step through the program and watch variables. I even can write gdb-commands directly in the console-view. yabadabadooooooo

希望对他人也有帮助。不能说,什么才是真正的赢家行动。
但是每个答案都会带来更多新问题。现在我有3个了。

Hope that helps to others as well. Can not tell, what was really the winner-action. But each answer gives more new questions. Now I got 3 of them.


  1. 启动调试配置时,我必须单击工具栏中的重新启动才能真正进入主过程。

  2. 在AIX上,我们的程序首先针对嵌入式sql进行了预处理。预处理的c源文件位于另一个目录中。当我双击该行以设置断点时,我得到警告未解决的断点,并且在gdb控制台中,我看到该断点设置为预处理的源,这是错误的。可以在正确的源上设置断点吗?

  3. 我们在AIX上使用CICS。使用CICS的xldb-Debugger和CDCN-命令,当我们进入程序时,我们可以开始进行调试。是否可以通过gdb-eclipse远程(以plink方式)获取该信息?

这篇关于在没有gdbserver的情况下如何使用Eclipse CDT进行远程调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆