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,250 檢視

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,169 檢視

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.

WSinc
新貢獻者 I
5,169 檢視

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.

Steven_L_Intel1
5,169 檢視

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.

WSinc
新貢獻者 I
5,169 檢視

What was your debug configuration, and defaults?

Steven_L_Intel1
5,169 檢視

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

WSinc
新貢獻者 I
5,169 檢視

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

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

WSinc
新貢獻者 I
5,169 檢視

How do I upload a screen shot?

WSinc
新貢獻者 I
5,169 檢視

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.

Steven_L_Intel1
5,169 檢視

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

WSinc
新貢獻者 I
5,169 檢視

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.

Steven_L_Intel1
5,169 檢視

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.

WSinc
新貢獻者 I
5,169 檢視

I experimented with it -

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

WSinc
新貢獻者 I
5,169 檢視

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

WSinc
新貢獻者 I
5,169 檢視

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.

andrew_4619
榮譽貢獻者 III
5,169 檢視

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.

WSinc
新貢獻者 I
5,169 檢視

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.

Steven_L_Intel1
5,169 檢視

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

WSinc
新貢獻者 I
5,169 檢視

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.

WSinc
新貢獻者 I
5,169 檢視

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.

Steven_L_Intel1
5,057 檢視

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.

回覆