使用Eclipse CDT进行远程调试 [英] Remote debugging with Eclipse CDT
问题描述
我们正在Windows上使用Eclipse CDT 5 C ++ IDE在远程AIX主机上开发C ++应用程序。
Eclipse CDT可以使用gdbserver执行远程调试。不幸的是,在AIX上不支持gdbserver。有没有人熟悉使用没有gdbserver的Eclipse CDT进行远程调试的方法?也许使用SSH连接到gdb?
在任务栏上的Bug符号上,我使用了Debug Configurations - GDB硬件调试。
在主C / C ++应用程序中我设置了可执行文件的Samba共享的完整路径( X:\abin\vlmi9506
)。我还在项目中的 X:\abin
上设置了一个链接的文件夹。然后我在GDB安装程序中修改了我的批处理脚本。它不是在plink-session中直接调用gdb,而是打开gdb的unix-shell脚本。这样我可以在进行调试之前为程序设置一些unix环境变量。我的批次中的电话:
plink.exe prevoax1 -l suttera -pw XXXXX -i / proj / user / dev / suttera /vl/9506/test/vlmi9506ddd.run 20155 dev om
在unix脚本中,我启动了gdb从日食的命令行params,我发现在我以前的tryals。 shell命令中的调用如下所示:
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 。我们的管理员安装了它。
我现在可以逐步浏览程序并观察变量。我甚至可以直接在控制台视图中编写gdb-commands。 yabadabadooooooo
希望对他人有帮助。不能说,真正的赢家动作。
但是每个答案都提供了更多的新问题。现在我有3个。
- 当我启动调试配置时,我必须在工具栏中单击重新启动才能真正进入主程序。是否可以直接进入主,而不重新启动?
- 在AIX上,我们的程序首先对嵌入式sql进行预处理。预处理的c-source放在另一个目录下。当我叮叮叮叮叮叮叮叮叮叮to to to,,,,,,,,,。。。。。。。。。。。。。。。。。。。。。。。。。。。。是否可以在正确的源上设置断点?
- 我们在AIX上使用CICS。使用xldb-Debugger和CICS的CDCN命令,我们管理调试开始,当我们进入我们的程序。是否可以通过gdb-eclipse远程访问(在plink中)?
We're using the Eclipse CDT 5 C++ IDE on Windows to develop a C++ application on a remote AIX host.
Eclipse CDT has the ability to perform remote debugging using gdbserver. Unfortunately, gdbserver is not supported on AIX.
Is anyone familiar with a way to debug remotely using Eclipse CDT without gdbserver? Perhaps using an SSH shell connection to gdb?
finally I got gdb run remotly anyhow now. At the Bug-symbol on the taskbar I took Debug Configurations - GDB Hardware Debugging.
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
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
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.
I can now step through the program and watch variables. I even can write gdb-commands directly in the console-view. yabadabadooooooo
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.
- When I start the debug config I have to click restart in the toolbar to come really in the main procedure. Is it possible to come directly in main without restarting?
- On AIX our programs are first preprocessed for embedded sql. The preprocessed c-source is put in another directory. When I duble-click the line to set a breakpoint, I get the warning "unresolved breakpoint" and in the gdb-console I see, that the break is set to the preprocessed source which is wrong. Is it possible to set the breakpoints on the right source?
- We are using CICS on AIX. With the xldb-Debugger and the CDCN-command of CICS we manage that debugging is started, when we come in our programs. Is it possible to get that remotely (in plink) with gdb-eclipse as well?
这篇关于使用Eclipse CDT进行远程调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!