Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

IDB within Eclipse Photran

dan0112
Beginner
476 Views
Hi,

I managed to set up IDB (11.0) as the standard debugger called from within Eclipse (basically one has to specify iidb in the field GDB Debugger and set the environment variables accordingly).

However, I am still experiencing two quite annoying problems (both reproducible on OpenSuse 10.1 with Eclipse 3.4.1 as well as on Ubuntu 9.11 with Eclipse 3.5.2):

(i) debugging is very slow, e.g. when stepping forward or looking at values of a variable

(ii) one can't look at arrays/vectors of a matrix/multidimensional array: eg testmatrix(1,:) in the expressions view gives the following error message:
[bash]Assertion failed: "1 <= dimension && dimension <= _rank" src/st/type/pil_typearray.C:966
This is an unexpected condition and may indicate the presence of a defect.
If you wish to report this, please include the stack trace that follows. 
[/bash]
which is followed by several lines of unintelligble iidb output.

Any idea on how to fix this?

And while at it, why does Intel provide their own GUI instead of integrating IDB better with Eclipse, which features the Photran plugin that is being actively developed and has a widespread user base? IDB with Eclipse/Photran already seems to work not too bad (apart from the mentioned problems) and would make for a true IDE combining code-writing and debugging.

Thanks a lot!

Daniel
0 Kudos
2 Replies
Rob_Mueller-Albrecht
476 Views
Hi Daniel,

the main reason (apart from us also using our own GUI for other flavors of our debuggers) is that having our own Eclipse RCP based GUI allows us to add more features especially things like thread-aware runtime control, thread-grouping and thread-freeze that we otherwise wouldn't have. It just allows us to have a more feature-rich debug environment beyond the people who use CDT based projects.

Thestepspeed and associated symbol info update speed should have improved considerably in our newer debugger >= 11.1.064, thus I may recommendchecking whether an update may help with those.

For the assertion that you get from our symbol info resolution backend on trying to display your multidimensional array I would appreciate a little testcase. That does indeed point to a probable defect in our debugger symbol info backend.

Thanks, Rob
0 Kudos
dan0112
Beginner
476 Views
Hi Rob,

thank you very much for your quick and helpful reply. As requested I am reporting a testcase, since this is the first time for me please let me know if you need any further information. As mentioned previously, I am using IDB and IFORT version 11.0, and the most recent Eclipse/Photran.

main.f90
[fortran]program testcase

integer                              :: n1, n2
real,dimension(:,:),allocatable      :: testarray

n1=10
n2=2
allocate(testarray(n1,n2))

testarray=reshape((/(i,i=1,n1*n2)/),(/n1,n2/))      ! matrix filled with numbers 1 to n1*n2

print*,'I want to view this array in the Expressions View of the Debug Perspective:',testarray(1,:)
! use the previous line to set breakpoint end program testcase[/fortran]

Compiler and linker flags
ifort -g -O0 -c -o
ifort -o

When debugging the program with GDB, I can use the Expressions View of the Debug Perspective to look at single elements like testarray(10,1) as well as at arbitrary subarrays like testarray(:,1). However, when debugging with iidb, I can still look at single elements, but when I try testarray(:,1), I get the following error message in the console output:

Error Message:
Assertion failed: "1 <= dimension && dimension <= _rank" src/st/type/pil_typearray.C:966
This is an unexpected condition and may indicate the presence of a defect.
If you wish to report this, please include the stack trace that follows.
iidb(_ZN15IDBAssertFailed3runEPKcS1_j+0x11) [0x81e4f33]
iidb(_ZN14DTLU_namespace12assertFailedEPKcS1_j+0x1b) [0x87a2199]
iidb(_ZNK16ArrayDescription19iterationLowerBoundEj+0x79) [0x876346f]
iidb(_ZN13VarObjectNode14updateChildrenEbb+0x166) [0x8382de4]
iidb(_ZN20SymbolDebugVarObjectC9ERKSsS1_P5Scope9FrameSpecRK13RelocatedAddr+0x341) [0x8382273]
iidb(_ZN21SymbolTableVarObjects8createVOERKSsS1_9FrameSpecRK13RelocatedAddr+0x3e0) [0x8386f8c]
iidb(_ZN15CmdVarObjCreate5do_itER19CmdExecutionContextRN10BaseForCmd9CmdResultE+0xa7) [0x83a8d1f]
iidb(_ZN10BaseForCmd7executeEb+0xe71) [0x83fd383]
iidb(vfprintf+0x37fb) [0x81e1e3b]
iidb(_Z15ProcessCommandsv+0x3a) [0x81e237e]
iidb(vfprintf+0x1f7e) [0x81e05be]
iidb(_Z7idbMainiPPKcS1_+0x1a5) [0x81e0427]
iidb(main+0xce) [0x81df95a]
/lib/libc.so.6(__libc_start_main+0xe5) [0xb7d9e5f5]
iidb(dlopen+0x41) [0x81df801]

Thanks

Daniel
0 Kudos
Reply