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

Why "no source code?"

WSinc
新分销商 I
6,867 次查看

I am trying to debug a subroutine I just compiled.

It gives no error messages.

But when I run the the program, I get a breakpoint,

and it says "No source code available."

 

So there is a bad subscript, or something else, 

but there is nothing pointing to where it occurred.

 

Apparently when the breakpoint occurs in an imbedded routine, the debugger cant handle it,

like when I use "contains" for example.

 

We never had this problem before, 

so WHY do they keep putting in new ones?

0 项奖励
26 回复数
Steven_L_Intel1
5,697 次查看

It could be that it stopped in a library routine where there is no source code. Use the Stack Frame pulldown to select the frame with your code.

0 项奖励
WSinc
新分销商 I
5,697 次查看

Here is a test program.

There is no arrow pointing to the offending line,

and the stack frame does not give ANY useful information.

Well, some of the time it works, maybe 10-20 percent.

0 项奖励
Steven_L_Intel1
5,697 次查看

I don't get "No source code". I created a new console project with all the defaults, built a Debug configuration and started running under the debugger. When it stopped because of the array bounds error, it showed the source.

0 项奖励
WSinc
新分销商 I
5,697 次查看

What was your debug configuration, and defaults?

0 项奖励
Steven_L_Intel1
5,697 次查看

I just opened VS2012 and created a new project using all the normal defaults. I didn't change a single setting.

0 项奖励
WSinc
新分销商 I
5,697 次查看

Well, I moved it to another computer, and it worked the first time.

But then when I run it again, the same problem occurs.

0 项奖励
WSinc
新分销商 I
5,697 次查看

How do I upload a screen shot?

0 项奖励
WSinc
新分销商 I
5,697 次查看

I noticed that when it does NOT work, it points instead to a disassembly, not any source code.

But then there is no way to see where that occurs, since I cannot display code or line numbers.

When it DOES work I do not get a disassembly, I can see the source code and the pointer to the

breakpoint location.

0 项奖励
Steven_L_Intel1
5,697 次查看

Use the "Select media" button to upload a screenshot .jpg or .png. Are you exiting the application between runs?

0 项奖励
WSinc
新分销商 I
5,697 次查看

NO, I normally make a source code mod, then recompile the affected routines.

Actually, I very often have to insert PRINT statements, to track down the actual source of the problem.

And then I say "restart". Sometimes I just compile the routine to check it first, then restart.

Doesn't the VS automatically recompile any modified routines when i restart the

program?

 

I noticed that this problem seems to come up MORE often with a larger program.

It is random in nature.

 

When I do a screenshot, where would it normally put the file? I have trouble finding it.

0 项奖励
Steven_L_Intel1
5,697 次查看

Just attach the screenshot as a file - it will show up as an attachment automatically.

At the moment, you're blocked from editing sources during a debug session (that will change in update 1). You might get prompted to rebuild if you manage to make source changes before running, but maybe not. Doing a restart doesn't recompile.

0 项奖励
WSinc
新分销商 I
5,697 次查看

I experimented with it -

When I insert a blank line, it automatically recompiles the routine without my asking first.

0 项奖励
WSinc
新分销商 I
5,697 次查看

OK< here are two screen shots:

You can see where it does not point to the line where the break point actually occurred.

Also, the stack frame is entirely clueless

0 项奖励
WSinc
新分销商 I
5,697 次查看

Here is another screen shot -

It does point to where it occurred in the dissassembly, but even when I

want to display the source code lines, it wont point to those.

0 项奖励
andrew_4619
名誉分销商 III
5,697 次查看

why not set some breakpoint in your code, eg at line 371 which is that last line of your code executed before it drops into system code and throws and exception at then you get an automatic breakpoint. Your code has broken a few step before this.

0 项奖励
WSinc
新分销商 I
5,697 次查看

Line 371 does not exist anywhere in my source.

That line number is the one for the machine code, we cant set breakpoints there.

It does not give line numbers for the source code where the breakpoint occurs.

0 项奖励
Steven_L_Intel1
5,697 次查看

Please attach a zip of the buildlog.htm from the Debug folder of the project after you do a rebuild.

0 项奖励
WSinc
新分销商 I
5,697 次查看

OK, here is one I just did - buildlog_4.zip

apparently the debugger cannot link up my source code with the machine code.

Because even when I ask for a display of the source code lines, I get nothing, just the machine code.

 

That explains why we dont get the arrow pointing to the offending source code line.

0 项奖励
WSinc
新分销商 I
5,697 次查看

I uploaded it again. But this time it DID work.

I didn't change anything.

 

The disassembly DOES show the source code lines also.

Is there anything different about the buildlog?

Apparently this is a randomly occurring phenomenon.

0 项奖励
Steven_L_Intel1
5,585 次查看

Ok - I don't see anything unusual in the build log. I don't know what is causing the behavior you see. It's not something I've seen reported by others.

0 项奖励
回复