6

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

tarrasch
  • 2,630
  • 8
  • 37
  • 61

3 Answers3

4

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

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • unfortunately i still cant get it to work :( how did you load the shared libraries for iidb? my error :Error creating session unrecognized option: nw (DBX mode) unrecognized option: nw (DBX mode) unrecognized option: nw (DBX mode) – tarrasch Dec 08 '10 at 10:04
  • @tarrasch: I don't have much more on this issue, except this thread http://dev.eclipse.org/mhonarc/lists/photran/msg00162.html which mentions the same kind of error message you have. – VonC Dec 08 '10 at 11:30
  • unfortunately i could not get it to work. the guys in the thread use the gui interface of idb and that is very unstable for me. the thing is i cannot get even emacs to work with idb and i dont really want to sink much more time into this. its just sad for me that i cant get it to work, since it would really speed up my development process. – tarrasch Dec 09 '10 at 13:59
  • @tarrasch: I understand, I was just checking if you had any elements I could have added to my answer. – VonC Dec 09 '10 at 14:24
2

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
Hongyi Zhao
  • 77
  • 1
  • 6
0

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.