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

/pdbfile

abhimodak
New Contributor I
404 Views
Hi

I think the compiler option /pdbfile is not working with version 11.0.066 (I have not test previous versions). May be I am mis-interpreting who generates (should generate) the *.pdb file. I happned to run into this problem with compiling and linking separately.

(1) ifort -c /debug:full Sample.f: This generates Sample.obj; when I subsequently use ifort Sample.obj to generate Sample.exe, since there is no Sample.pdb file generated I cannot debug in the VS (using devenv /debugexe Sample.exe).

(2) ifort -c /pdbfile /debug:full Sample.f: This also does not generate Sample.pdb and thus cannot be debugged using VS.

The compiler documentation does say that in case of (1) above the symbolic information will be stored in the object file. Whereas for (2), it says that the default pdbfile name would be borrowd from the file being compiled.

{Of course, ifort /debug:full Sample.f does generate Sample.pdb and can be used with VS debugger.}


Abhi
0 Kudos
2 Replies
Alexander_C_Intel
404 Views

PDB file associated with your application is created by Microsoft link linker. I will check /pdbfile option later and now suggest the following workaround. You may pass an option to linker that says it to make a PDB file. You can do this in at least two ways

  1. ifort -c /debug:full Sample.f;ifort Sample.obj /link /debug /pdb:
  2. ifort -c /debug:full Sample.f; ifort /Qoption,link,/debug,/pdb: Sample.obj

Another opportunity is to enable generation of debug information with /Zi option like

ifort /Zi -c Sample.f; ifort /Zi Sample.obj

0 Kudos
abhimodak
New Contributor I
404 Views
Hi Alexander

Thanks for your response and the suggested work-around.
At this point, the documentation is incorrect. It lists /debug as an "alternate option" to /Zi.

Abhi
0 Kudos
Reply