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

Step into (F11) subroutine in file compiled with full debug

jwasson
Beginner
279 Views

Debugging a *.for file compiled with full debug (but no interface checking)

/nologo /debug:full /Od /Ob2 /I"Debug/" /I"..\\..\\include" /I"..\\..\\ComModules\\Debug" /reentrancy:threaded /d_lines /debug-parameters:all /Qsave /align:commons /Qzero /fpe:1 /iface:cvf /module:"Debug/" /object:"Debug/" /Fd"Debug\\vc100.pdb" /traceback /libs:dll /threads /c

Intel Visual Fortran Composer XE 2011 Integration for Microsoft Visual Studio* 2010, 12.0.3470.2010

VS 10



does not step into a subroutine in the same file

SUBROUTINE HELLO

...

call SUB(

& s1(isub)%ns2,

& s1(isub)%s2(1),

& s1(tb)%ns2,

& s1(tb)%s2(1),

& n_whatsthis,

& nope(isub),

& nope(tb),

& s1(isub)%ackstatus,

& s1(tb)%ackstatus

& )



Setting breaks at the first and last executable lines of SUBROUTINE SUB (which has only one RETURN) at the end

subroutine SUB(n1,list1,n2,list2,new,ack1,ack2,s1,s2)

implicit none

integer n1,n2,new,ack1,ack2

integer list1(*), list2(*)

logical s1, s2

...

is accepted by VS10 but although a break at "call SUB" is reached execution does not stop at the breaks in SUB. Stepping into (F11) at call SUB steps over the lines setting up the addresses of the arguments but does not step into SUB. Breaks and debugging work in the calling routine.

The file has a history of compilation (and debugging) in earlier versions of IVF and both subroutines are working. The file is too big (and proprietary) to attach but is there more information that could be helpful to explain why subroutine SUB cannot be debugged? (Even though SUB is working debugging is helpful for illustration and instruction.)
0 Kudos
1 Reply
Steven_L_Intel1
Employee
279 Views
While you may not understand what you are seeing, I often find it is helpful to switch to the Disassembly tab and step through the instructions that way. You'll see a call to _SUB or some sort and may get an idea why breakpoints aren't being set. Usually, the kind of behavior you are seeing is due to the image you're debugging not being the same as was compiled with the source you're using. This can be especially true when using libraries.
0 Kudos
Reply