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

Debug build cannot find PDB files...

Anthony_Richards
New Contributor I
1,966 Views

I have just created a modified version of a program and selected win32 debug and done a clean build. I have added a break-point and selected start debugging.
The program starts, opens a console window, then stops at a READ statement and offers me to BREAK or CONTINUE.

EDIT ADDED LATER:

The problem was an end-of-file during reading of a file (the file was empty!). However, I was expecting to see the usual debug stuff to turn up, when I got the following behaviour. Is it normal?

When I select BREAK, it tells me that symbols are loaded but then that it could not find various PDB files.

'OFFAXISDISKDIFFRACTION.exe' (Win32): Loaded '\\space.rl.ac.uk\projects\Optics\Engineers\Tony Richards\Visual Studio 2005\Projects\multidiskdiffraction\OFFAXISDISKDIFFRACTION\OFFAXISDISKDIFFRACTION\Debug\OFFAXISDISKDIFFRACTION.exe'. Symbols loaded.
'OFFAXISDISKDIFFRACTION.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'OFFAXISDISKDIFFRACTION.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'OFFAXISDISKDIFFRACTION.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'OFFAXISDISKDIFFRACTION.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\Composer XE 2015\redist\ia32\compiler\libifcoremdd.dll'. Module was built without symbols.
'OFFAXISDISKDIFFRACTION.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\Composer XE 2015\redist\ia32\compiler\libmmd.dll'. Symbols loaded.
'OFFAXISDISKDIFFRACTION.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imagehlp.dll'. Cannot find or open the PDB file.
'OFFAXISDISKDIFFRACTION.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'OFFAXISDISKDIFFRACTION.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'OFFAXISDISKDIFFRACTION.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'OFFAXISDISKDIFFRACTION.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'OFFAXISDISKDIFFRACTION.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'OFFAXISDISKDIFFRACTION.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
'OFFAXISDISKDIFFRACTION.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcr110d.dll'. Symbols loaded.
'OFFAXISDISKDIFFRACTION.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dbghelp.dll'. Cannot find or open the PDB file.
OFFAXISDISKDIFFRACTION.exe has triggered a breakpoint.

I have gone back to a debug version of a different solution and have been able to get that to properly start debugging.

 I have recently downloaded an update to the composer.

Since I am not allowed to attach the BUILD.HTM file for some reason, I am trying to attach it as a .TXT file. I cannot edit out the table cells below for some reason which appeared when I pasted in the build log earlier...

   
0 Kudos
9 Replies
TimP
Honored Contributor III
1,966 Views

Those warnings about missing .pdb are normal and will not interfere with normal profiling of time spent in user code.  Several of them might be resolved by installing debugging kits from https://msdn.microsoft.com/en-US/windows/hardware/gg454513

0 Kudos
Steven_L_Intel1
Employee
1,966 Views

As Tim says, those informational messages can be ignored. There's no point in getting debug symbols for those DLLs unless you plan on debugging the system DLLs.

We have seen an issue where if you link to the Fortran DLL libraries, which is default, and get a run-time error such as an I/O error, the debugger doesn't stop in your code but in the MSVC library way down the stack, and sometimes it's not possible to use the Stack Frame dropdown to reposition to user code. If you link to the static libraries (Multithreaded, instead of Multithread DLL), this problem goes away.

A couple of other observations. The error you got is often due to not placing an input file where the program expects it. When you run from within Visual Studio, VS sets the "current directory" to be the project directory (the one with the .vfproj file) and NOT the directory with the executable. Most programs just open a file without using STATUS= and start reading - if the file doesn't exist, the default STATUS='UNKNOWN' will create an empty file and then you'll get an EOF on read. The error message will be in the console window which is often "behind" the VS window.

0 Kudos
Anthony_Richards
New Contributor I
1,966 Views

Thanks, Tim and Steve.

Here is a quick one - how do I turn on line number display (the debugger quotes the line number of the calling statement, but I have
no line numbers displayed in my code). I'm sure it is simple but Help is no help. TIA.

0 Kudos
Steven_L_Intel1
Employee
1,967 Views

Tools > Options > Text Editor > All Languages. Make sure the "Line Numbers" box has a checkmark in it. If it is just filled in blue, click on it once to clear and then again to check. You can also press CTRL+G to enter a line number to "go to".

0 Kudos
Anthony_Richards
New Contributor I
1,967 Views

Thanks again, Steve.
 

0 Kudos
IanH
Honored Contributor II
1,967 Views

Steve Lionel (Intel) wrote:

We have seen an issue where if you link to the Fortran DLL libraries, which is default, and get a run-time error such as an I/O error, the debugger doesn't stop in your code but in the MSVC library way down the stack, and sometimes it's not possible to use the Stack Frame dropdown to reposition to user code. If you link to the static libraries (Multithreaded, instead of Multithread DLL), this problem goes away.

Having symbols loaded for modules in the call chain (or at least modules in the chain from the point of interest in the source to the point of the error being raised) may reduce the frequency of encountering that issue of lack of stack frame navigability.  As a result, it can be handy to at least have the working capability of accessing those symbols (from the MS symbol servers or whatever), even if they are only loaded on demand.

Consequently, I suspect symbol information for the Intel Fortran runtime DLL's would also help.

 

0 Kudos
Taher_C_
Beginner
1,967 Views

Go to Tools>Options>Debugging>Symbols and mark Microsoft Symbol Servers check box. Then hit F5 and wait for VS to download required symbols. Download process will be done only once.

0 Kudos
Steven_L_Intel1
Employee
1,967 Views

As discussed in this thread, the PDB messages are informational and can be ignored. The only problem you have is that the program is exiting with an error. If you "Start without debugging" you will probably be able to see an error message in the console window.

0 Kudos
Steven_L_Intel1
Employee
1,967 Views

Generally the CVF properties carry over into Intel Fortran (with some exceptions). The "extend precision" option was in CVF in the same place.

That you have to set these options indicates that your program is incorrectly assuming greater precision than is declared. CVF would sometimes use extended precision registers for single precision operations, leading to inconsistent results that sometimes had higher precision and sometimes did not.

I suggest you look at https://software.intel.com/en-us/articles/migrating-from-compaq-visual-fortran

0 Kudos
Reply