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.


Elizabeth S (Intel)'s picture

The main reason that the object files are removed is because they are temporary files as opposed to when you explicitly ask for an object file using the -c option. By default the compiler removes them because the compiler is generating an executable generally. Temporary files are removed to avoid polluting the scratch area used. As the article states, you can prevent the object files from being deleted by using the -save-temps option.

Li Dong's picture

Why does Mac ifort have such feature? Why not prevent ifort from deleting the object files?

Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.