Eclipse 与英特尔 Fortran 调试器 [英] eclipse with Intel Fortran debugger

查看:42
本文介绍了Eclipse 与英特尔 Fortran 调试器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题如下:

我想将 idb intel 调试器与 eclipse 一起使用,以便能够逐步完成我的代码,就像 idb -gui 一样.我已经尝试实现一个解决方案,我发现我用脚本替换了对 idb -gdb 的直接调用:

#!/bin/bashexec/usr/local/soft/intel/fc/10.0.025/bin/ifort/idb -gdb "$@"

这实际上是有效的,因为它会启动我的程序,直到它进入命令提示符.现在我收到以下错误:

目标请求失败:{R,T}xThread 终止.

那是我浪费了一整天试图解决这个问题并决定发布的时候.任何人都可以通过一些明智的建议进一步帮助我吗?你是如何将 idb 集成到 eclipse 中的?

干杯,大卫

解决方案

不是专家,但如果这有帮助,这个线程提到(即使它是针对 FORTRAN 11):

<块引用>

我在考虑您的问题,但我认为我并没有按照您的意思理解您的问题陈述.
您是说在调试器中看不到的代码位于 MODULE 定义文件中吗?如果是这样,我会说问题是由于使用 gdb 作为 Fortran 调试器的一般限制.如果您使用英特尔调试器,您将能够单步执行英特尔 Fortran 生成的代码,该代码包含在 MODULE 中.

我看到您使用的是 Intel Fortran 11.0 版.有几个选择供您选择.

  • 英特尔 Fortran 11.0 带有一个新的独立 GUI 版本的 IDB.如果您不介意在 Eclipse 中构建,但可以在另一个工具中调试,您可以使用它.您使用idb"命令调用新的 gui 版本,假设您已初始化环境以使用英特尔调试器.
  • 英特尔 Fortran 11.0 还提供了调试器的命令行版本,您可以再次使用idbc"命令调用它,前提是您已经初始化了使用英特尔调试器的环境.
  • 您可以尝试的第三种选择是在 Photran 中修改调试启动配置,使其调用 idbc 而不是 gdb.这不是英特尔官方支持的东西,但是当我用一个类似于我认为你的情况的例子来尝试它时,它可以正常工作.同样,英特尔不支持此功能,因此如果您在此配置中遇到其他问题,将无济于事.如果它对您来说足够好,它可以让您在 Eclipse/Photran 中完成所有工作.
    如果您想尝试一下,请在启动 Eclipse 之前初始化您的环境以使用英特尔调试器,启动 Eclipse,打开您的调试配置并选择调试器选项卡.然后在调试器选项"区域的Main"选项卡中,将GDB debugger"从gdb"更改为idbc".

<小时>

那个帖子也提到了(如果它对你的问题):

<块引用>

idb GUI 似乎运行了一个名为 iidb 的后端,它模拟了 gdb,足以让 Eclipse IDE 运行.p>

iidb 需要加载某些共享库.
我通过将 /opt/intel/Compiler/11.1/038/idb/lib/intel64 添加到环境中来实现这一点Eclipse 启动之前的变量 LD_LIBRARY_PATH.
您的路径应与您的特定 ifort 安装相匹配.

在您的调试配置中,选项卡Debugger"、GDB 调试器"字段,将 gdb 替换为 iidb.如果您希望它在启动时停止,请尝试将 main 替换为 MAIN__.

My problem is the following:

I want to use the idb intel debugger with eclipse to be able to go step by step through my code, much like idb -gui does. I already tried to implement a solution i found where i replace the direct call to idb -gdb with a script:

#!/bin/bash 
exec/usr/local/soft/intel/fc/10.0.025/bin/ifort/idb -gdb "$@" 

This actually works as it starts my program just until it comes to a command prompt. Now i get the following error:

Target request failed: {R,T}xThread terminated.

That is when i wasted about a whole day trying to solve this and decided to post on so. Anyone able to help me further with some intelligent advice? how did you integrate idb into eclipse?

cheers, David

解决方案

Not a specialist, but in case this helps, this thread mentions (even though it is for FORTRAN 11):

I was thinking about your problem some more and I think I was not taking your problem statement as literally as you meant it maybe.
Are you saying the code you cannot see in the debugger resides in a MODULE definition file? If so, I would say the problem is due to general limitations of using gdb as a Fortran debugger. If you use the Intel debugger, you will be able to step into Intel Fortran generated code which is contained in a MODULE.

I see you are using version 11.0 of Intel Fortran. There are a couple of choices for you.

  • Intel Fortran 11.0 comes with a new standalone GUI version of IDB. You could use it if you don’t mind building in Eclipse, but debugging in another tool. You invoke the new gui version with the "idb" command assuming you initialized your environment for using the Intel debugger.
  • Intel Fortran 11.0 also provides the command line version of the debugger which you can invoke with the "idbc" command, again, assuming you have initialized your environment for using the Intel debugger.
  • A third alternative you could try is to modify your debug launch configuration in Photran so that it invokes idbc instead of gdb. This is not something that is officially supported by Intel, but when I try it with an example similar to what I think your situation is, it works o.k. Again, this is not supported by Intel so if you run into other problems in this configuration, there would be no help. If it works well enough for you though, it let’s you do everything within Eclipse/Photran.
    If you want to try it, initialize your environment to use the Intel debugger before you start Eclipse, start Eclipse, open your debug configuration and choose the debugger tab. Then in the "Debugger Options" area, "Main" tab, change "GDB debugger" from "gdb" to "idbc".


That thread also mentions (in case it has any influence on your issue):

The idb GUI appears to run a backend called iidb, which emulates gdb well enough for the Eclipse IDE to get by.

iidb needs to load certain shared libraries.
I made this happen by adding /opt/intel/Compiler/11.1/038/idb/lib/intel64 to environment variable LD_LIBRARY_PATH prior to Eclipse startup.
Your path should match your specific ifort installation.

In your debug configuration, tab "Debugger," field "GDB debugger", replace gdb with iidb. If you want it to stop on startup, try replacing main with MAIN__.

这篇关于Eclipse 与英特尔 Fortran 调试器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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