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

idb cannot debug on OSX - type "unknown"

Boris_B_
Beginner
552 Views
idb (9.1.035) does not work on my dual core-2 iMac. Am I doing something wrong? Here is what I get:

$ more test.f

i=2
write(6,*) i
end

$ ifort -g test.f
$ idb a.out

Intel Debugger for IA-32 -based Applications, Version 25, Build 20060928
------------------
object file name: a.out
Reading symbolic information from /Users/Me/a.out...You cannot debug "/private/tmp/ifort84uCxj.o" because its type is "unknown".
You cannot debug "/private/tmp/ifort84uCxj.o" because its type is "unknown".
IDB could not read debugging info from /private/tmp/ifort84uCxj.o
No debugging symbols found
0 Kudos
3 Replies
Steven_L_Intel1
Employee
552 Views

This is discussed in the release notes as follows:

Xcode* 2.3 Usage Issues

.o files must be saved for debugging

Starting with Xcode 2.3, the Dwarf debugging information is stored in the object (.o) files. These object files are accessed by debuggers 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 after the executable is created.

To make such an application debuggable, do the compilation and link separately, as follows:

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

A future update to the compiler may eliminate the need for the separate compile and link steps.

Xcode 2.2 users do not need to compile and link separately.

Another option, not mentioned in the release notes, is to add the switch -save_temps to the ifort compile line. Use whichever method you prefer.

0 Kudos
Boris_B_
Beginner
552 Views
I guess you mean -save-temps, not -save_temps. In any case, there seems to be a problem using this switch together with -g when there is a "common" statement:

$ more a.f

common a
write(6,*) 'Hello'
end

$ ifort -g -save-temps a.f
0_47028

fortcom: Severe: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.

compilation aborted for a.f (code 3)
0 Kudos
Steven_L_Intel1
Employee
552 Views
Yes, -save-temps. I think the error you found is one that is fixed in an upcoming update, so use the other method for now.
0 Kudos
Reply