I am having problems viewing arguments in fortran calls. I hope this is a simple issue, but I am currently at a loss. The following is an example stack trace I see when entering a fortran function:
Cannot access memory at address 0x6e2e6d62
#2 0x00006c6d in ?? ()
#1 0xbfffd4f8 in ?? ()
) at mytestfunc.f:12
#0 mytestfunc (myint=Cannot access memory at address 0x0
(This is using ddd with gdb. I see similar results when using idb.)
This occurs in calls from C and fortran to fortran routines. The strange thing is that sometimes I can read from the arguments passed in into other local variables, the data appears magically, even though the argument is displayed in the debugger as NULL, and sometimes the arguments and most of the local variables are unreadable.
I have been able to successfully build and run several of our programs using ifc 7.0 and 7.1 and gcc using glibc 2.2.4.x. The results of running the programs at this point is a mixed bag: they all seem to work, but various fortran calls are not returning the data that should be returned.
I know there are still some problems in our code, but it is becoming more and more difficult to isolate real problems when I am seeing stuff like this in the debugger.
Any help would be greatly appreciated.
We are currently in the process of migrating from IRIX 6.5.x on SGI hardware to RH 7.2 on.IBM compat.hardware. The code base is pretty large, and contains a few generations of fortran 77 reuse and C code.
Here are some software versions:
% ifc -V
Intel Fortran Compiler for 32-bit applications, Version 7.1 Build 20030412Z
Copyright (C) 1985-2003 Intel Corporation. All rights reserved.
GNU ld version 184.108.40.206.8 (with BFD 220.127.116.11.8)
% rpm -q glibc
% rpm -q gcc
% ddd --version
GNU DDD 3.3.1 (i686-pc-linux-gnu)
Copyright (C) 1995-1999 Technische Universitt Braunschweig, Germany.
Copyright (C) 1999-2001 Universitt Passau, Germany.
% rpm -q gdb
Flags used for ifc link/compile:
-C90 -no_cpprt -Vaxlib -w90 -w95 -cm -i4 -r8 -g -O1
(I have also tried the -save and -zero flags.)
Flags used for gcc:
(I have used both ifc and gcc in the link step, and the programs appear to behave similarly.)
Thanks again for any ideas.