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

Debugger cannot access variables in common block on Mac OS

Nicolao
Beginner
439 Views
I have a number of variables placed in COMMON blocks. With Mac OS X and ifort compiler, when I try to access them from inside the debugger (either gdb or idb), the value of the variables is either incorrect (seems random) or I get a message which says that the memory location cannot be accessed.

On Linux and ifort, I have no problem.

Anybody knows how can I solve this problem on Mac OS X? I tried many ifort options, but nothing worked. Obviously I am using no optimization and debug infos (-O0 -g flags).

- On Mac OS 10.4.9 I am using: ifort 9.1.039, idb 9.1-28 and GNU gdb 6.3.50-20050815 (Apple version gdb-563)

- On Linux Fedora Core 6: ifort 9.0, idb 9.0 and GNU gdb Red Hat Linux (6.5-15.fc6rh)

[BTW, This problem reminds me of the old one which was present on Linux and g77: for that compiler a -fdebug-kludge flag was included, and it seemed to solve the problem.]

0 Kudos
3 Replies
Steven_L_Intel1
Employee
440 Views
First, did you see the text in the Release Notes saying that you have to preserve the .o files? Please see if that helps. If not, please file a report with Intel Premier Support.
0 Kudos
Nicolao
Beginner
440 Views
Steve, thanks for the prompt reply.

Yes, the object file are preserved. This problem with the COMMON blocks and EQUIVALENCE statements is a longstading one (at least under g77). I am surprised that it is not yet solved for the Mac OS version. I will follow your suggestion and send a report to Intel Premier Support.
0 Kudos
Steven_L_Intel1
Employee
440 Views
Each of the three platforms we support does debugging info a different way. What we find is that the available support in the debugging interface is designed for C and has to be "coerced" to support Fortran features such as COMMON and EQUIVALENCE (and modules...) Please do report this so that we see what is wrong.
0 Kudos
Reply