IDB Debugger Message When Reading Object Files

The Intel Debuger on Mac OS X* is generating a message when attempting to read object files.  After invoking the debugger, the message may appear as follows:

Can't find file '/var/folders/j1/j1JDyhsiHCSfztCmi4e0RU+++TI/-Tmp-//ifortP2VmmU.o'.
Reading symbols from /Users/xxx/yyy/a.out...Can't find file '/var/folders/j1/j1JDyhsiHCSfztCmi4e0RU+++TI/-Tmp-//ifortP2VmmU.o'.
You cannot debug "/var/folders/j1/j1JDyhsiHCSfztCmi4e0RU+++TI/-Tmp-//ifortP2VmmU.o" because its type is "unknown".
You cannot debug "/var/folders/j1/j1JDyhsiHCSfztCmi4e0RU+++TI/-Tmp-//ifortP2VmmU.o" because its type is "unknown".
Could not read debugging information from '/var/folders/j1/j1JDyhsiHCSfztCmi4e0RU+++TI/-Tmp-//ifortP2VmmU.o'.
(no debugging symbols found)...done.

Environment : Mac OS X, Xcode 2.3

Root Cause : Starting with Xcode 2.3, the Dwarf debugging information is stored in the object (.o) files. These object files are accessed by the debugger to obtain information related to the application being debugged and thus must be available for symbolic debugging.

In cases where a program is compiled and linked in one command, such as:

ifort -g -o hello.exe hello.f90

the object files are generated by the compiler but deleted before the command completes. The binary file produced by this command will have no debugging information. To make such an application debuggable users have two options.

Resolution : You may build the application in two steps, explicitly producing a .o file:

ifort -c -g -o hello.o hello.f90
ifort -g -o hello.exe hello.o

Alternatively, you may use the compiler switch -save-temps to prevent the compiler from deleting the .o files it generates:

ifort -g -save-temps -o hello.exe hello.f90

For more complete information about compiler optimizations, see our Optimization Notice.