Gdb and g95

Mannucci, Anthony J (335G) anthony.j.mannucci at
Sun May 23 16:09:24 PDT 2010

I have installed gdb and fortran compiler g95 using macports. The debugger
does not function with the fortran compiler. It does function with gcc
compiling c programs.

Nor does the standard gdb that ships with Apple developer tools work. The
Apple gdb cannot set breakpoints in the fortran code. I have tried both the
gfortran and g95 (Macports) compilers, and neither works with gdb.

This is OS X leopard 10.5.x.

Compiling as follows:
g95 -g -c test4.f
g95 -g test4.o -o test4.e

Macintosh-10:382:tests $ which gdb

Invoking gdb on the file test4.e yields the following error message.

Macintosh-10:383:tests $ gdb test4.e
GNU gdb (GDB) 7.1
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-apple-darwin9.8.0".
For bug reporting instructions, please see:
Reading symbols from
/Users/mannucci/timegcm/tests/test4.e...machoread.c:169: internal-error:
macho_symtab_read: Assertion `oso_file != NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.

This is the error I received trying to build gdb on my own. Debugging
fortran code on Darwin has proved to be a challenge.


Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
 Mail-Stop 138-308,                     Tel > (818) 354-1699
 Jet Propulsion Laboratory,              Fax > (818) 393-5115
 California Institute of Technology,     Email > Tony.Mannucci at
 4800 Oak Grove Drive,         
 Pasadena, CA 91109

More information about the macports-users mailing list