带有 Intel Fortran 调试器的 eclipse

发布于 2024-10-05 08:47:17 字数 462 浏览 2 评论 0原文

我的问题如下:

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

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

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

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

那就是当我浪费了一整天的时间试图解决这个问题并决定发布此内容时。有人能提供一些明智的建议来进一步帮助我吗?你是如何将idb集成到eclipse中的?

干杯, 大卫

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

意中人 2024-10-12 08:47:17

不是专家,但如果这有帮助,该线程提到(即使它适用于 Intel Fortran 11.0):

我更多地考虑了你的问题,我想我并没有像你的意思那样从字面上理解你的问题陈述。
您是说在调试器中看不到的代码驻留在 MODULE 定义文件中吗?如果是这样,我会说问题是由于使用 gdb 作为 Fortran 调试器的一般限制造成的。如果您使用英特尔调试器,您将能够单步执行英特尔 Fortran 生成的代码,该代码包含在 MODULE 中。

我发现您正在使用 11.0 版的 Intel Fortran。有多种选择供您选择。

  • 英特尔 Fortran 11.0 附带新的独立 GUI 版本的 IDB。如果您不介意在 Eclipse 中构建,但不介意在其他工具中进行调试,则可以使用它。假设您已初始化环境以使用英特尔调试器,则可以使用“idb”命令调用新的 GUI 版本。
  • 英特尔 Fortran 11.0 还提供了调试器的命令行版本,您可以使用“idbc”命令调用该调试器(假设您已经初始化了使用英特尔调试器的环境)。
  • 您可以尝试的第三种选择是修改 Photran 中的调试启动配置,以便它调用 idbc 而不是 gdb。这不是英特尔官方支持的东西,但是当我尝试使用与我认为您的情况类似的示例时,它工作正常再次,这不受英特尔支持,因此如果您在此配置中遇到其他问题,那就没有帮助了。如果它对您来说足够好,它可以让您在 Eclipse/Photran 中完成所有操作。
    如果您想尝试一下,请在启动 Eclipse 之前初始化您的环境以使用 Intel 调试器,启动 Eclipse,打开调试配置并选择调试器选项卡。然后在“调试器选项”区域的“Main”选项卡中,将“GDB debugger”从“gdb”更改为“idbc””。

该帖子还提到了(如果它对您的问题有任何影响) ):

idb GUI 似乎运行一个名为 iidb 的后端,它可以很好地模拟 gdb,以便 Eclipse IDE 运行。

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

在调试配置中,选项卡“Debugger”,字段“GDB debugger”,将 gdb 替换为 iidb >。如果您希望它在启动时停止,请尝试将 main 替换为 MAIN__

Not a specialist, but in case this helps, this thread mentions (even though it is for Intel Fortran 11.0):

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__.

征﹌骨岁月お 2024-10-12 08:47:17

自上次回答这个问题以来已经过去了九年。目前,英特尔已经发布了oneAPI工具包作为下一代软件开发工具,继并取代了英特尔Parallel Studio XE工具包。

在这种情况下,调试器应该是gdb-oneapi,如下所示:

$ module load debugger
$ module list

Currently Loaded Modules:
  1) lmod   2) debugger/2021.5.0

$ which gdb-oneapi 
/opt/intel/oneapi/debugger/2021.5.0/gdb/intel64/bin/gdb-oneapi

Nine years have passed since the most recent answer to this question. Currently, Intel has released oneAPI Toolkits as the next-generation software development tools, following and replacing the Intel Parallel Studio XE toolkits.

In this case, the Debugger should be gdb-oneapi as shown below:

$ module load debugger
$ module list

Currently Loaded Modules:
  1) lmod   2) debugger/2021.5.0

$ which gdb-oneapi 
/opt/intel/oneapi/debugger/2021.5.0/gdb/intel64/bin/gdb-oneapi
花海 2024-10-12 08:47:17

自提出问题以来已经过去了 3 年,但此解决方法适用于任何遇到 eclipse 和 idb 问题的人,尤其是在 OS X 上。

处将 gdb 替换为 idbc Eclipse 中的 >Debugger 选项卡在 Linux 上运行良好。

如果您使用的是 OS X 10.7+,Eclipse 中不支持 Intel Fortran 编译器,请创建一个 makefile 项目,使用自定义 makefile 创建目标,使用带有标志 ifort -g -fpic -Wl,-no_pie(OS X 10.7+ 需要这些标志),用 idb 替换 gdb ,它最终会起作用。

3 years have passed since the question was asked but this workaround will work for anyone having trouble with eclipse and idb, especially on OS X.

Replacing gdb with idbc at the Debugger tab in eclipse works fine on Linux.

If you are on OS X 10.7+, where there is no support for the Intel Fortran compiler in eclipse, create a makefile project, create a target with a custom makefile, use ifort with the flags -g -fpic -Wl,-no_pie (these flags are needed for OS X 10.7+), replace gdb with idb and it will eventually work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文