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

debugging session howing assembly

barakobama
Beginner
1,266 Views


My debugging version always goes into the "Disassembly" when it reaches the
include file which I put in the middle of code.
It always shows the assembly language part of the include with

"--- No source file ------"
mov ..
test..
je..
call...
"

It even disabled the "Go to source code" option of the popup window.
I did not happen VS6 version. I am using VS2005 standard.
Could you tell me what to do?

I want to see the code I wrote not the assembly.

FYI: my code sample

call sub1
include "aaa.h"
call sub2

If I commented the include line, my debugging goes as usual showing the
exact code I wrote.

Below are my "aaa.h" and the project settting.

"aaa.h" :
if(n.eq.0) then
if(cfnc1().ne.cfc2()) then
write(*,100)
call exit(1)
endif
else
call check()
endif
100 format('......')

Fortran cmd lin:
/nologo /Zi /Od /include:".include"

/define:WIN /define:WOGL /f77rtl /intconstant /module:"$(INTDIR)/"
/object:"$(INTDIR)/" /traceback /libs:static /threads /dbglibs /winapp /c


-BO

0 Kudos
11 Replies
barakobama
Beginner
1,266 Views

I haven't got the response from you about debugging.

Below is the simple example .I set break points at the line 1 and 3. I can not go from line 1 to line 3 without going through 2.

Is it a bug? I think I did something wrong to my project setting.

line 1: call sub1
line 2: include "aaa.h"
line 3: call sub2

It behaves the same even with much simpler "aaa.h" which has only one line like:

nnn=1.

Any advice will be very much appreciated.

-BO

0 Kudos
barakobama
Beginner
1,266 Views

Itseemsthat it related to the way how the inline(or macro) is handled.

In my previous example, it behaved the same even the line 1 and 3 are just assignments not calls.

n1=1

include 'aaa.h'

n2=2

-BO

0 Kudos
Steven_L_Intel1
Employee
1,266 Views
I tried some examples and could not see a problem. Can you attach a ZIP of a project that shows the issue?
0 Kudos
barakobama
Beginner
1,266 Views

Attached is the zip file of my project.

fmain() in ./main of Fortran lib is called from main() in ./wogl/main().

I set break points in fmain() before and after "include inc_test.h" which is in

./include and has just two lines of assignment.

-BO

0 Kudos
Steven_L_Intel1
Employee
1,266 Views
Right click on your C project and select "Set as startup project". Once I did that, it worked fine. You had the library set as the "startup project" which will interfere with debugging.
0 Kudos
barakobama
Beginner
1,266 Views

I don't know what to say. I still has the same problem showing assembly code.

What do you meanby "it worked fine"?

I guess you also see the assembly code as soon as you step in the .h portion.

I think .h file has been preprocessed and hiding ASCII as it supposed to do.

But as I said, I did see the code I wrote with CVF/VC6.

If you do not see what I see, it's really weird.

-BO

0 Kudos
Steven_L_Intel1
Employee
1,266 Views
No, I see the Fortran source. I don't need to "step into" - just a "step over" the INCLUDE line will take me to the first line of the incliude file. But "step into" does the same thing. You are not using preprocessing for the Fortran code.

I am using compiler version 10.1.021. What are you using?
0 Kudos
barakobama
Beginner
1,266 Views

I am using 9.1. I think that's the only difference between you and me.

-BO

0 Kudos
Steven_L_Intel1
Employee
1,266 Views
Well! That could explain a lot.
0 Kudos
barakobama
Beginner
1,266 Views

You said "a lot".

Does that imply the symptom could be a bug in the version 9.1?

Could you take my zipped example and run it on 9.1 and check if it has the same problem, if possible.

If not, I will try to use trial varsion 10.

How difficult is it to convert from 9.1 to 10?

Before I take the effort for the transition,

I would like for you to confirm that you took my zipped sample, ran the debugger and

did not see any assembly code with version 10.

-BO

0 Kudos
Steven_L_Intel1
Employee
1,266 Views
I have a vague memory that we fixed a problem somewhat like this, though I thought it had to do wth #include files which you are not using. I took your ZIP file, rebuilt the project using 10.1.021 and was able to debug it with stepping through the include file and no assembly was shown. I can see the problem when I use 9.1, so I guess we did fix it.

It is not at all difficult to convert. You uninstall 9.1, install 10.1 and it should be fine. Make sure that your support license is current otherwise you won't be able to run a newer compiler.
0 Kudos
Reply