Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Fortran Debugger help for a newbie using Windows

25 views
Skip to first unread message

skc...@gmail.com

unread,
Jun 25, 2008, 6:18:00 PM6/25/08
to
Hello, I'm currently running FORTRAN 77 code with Force 2.0.8 (an IDE
for the g77 compiler). This compiler allows me to link to the GDB
debugger (Insight). When I try to debug the code, I can see the
assembly line code which is not all that helpful. When I try to open
the source file with the program (I set the language from the command
line to fortran (set language fortran)), the debugger barfs.

The error is as follows:
C:/Documents and Settings/xedmcase/My Documents/penslabexp.f:1: Error
in sourced command file:
Undefined command:
"CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC".
Try "help".

while executing
"gdb_cmd "source $file_name""
(procedure "source_file" line 4)
invoked from within
"source_file"
(menu invoke)errorCode is NONE

This is the first line of the code and as you guys know C is just a
comment. Does anyone know how I can get gbm to recognize that this
file is fortran, and not be confused by the Cs?

Thanks

glen herrmannsfeldt

unread,
Jun 25, 2008, 8:03:27 PM6/25/08
to
skc...@gmail.com wrote:
> Hello, I'm currently running FORTRAN 77 code with Force 2.0.8 (an IDE
> for the g77 compiler). This compiler allows me to link to the GDB
> debugger (Insight). When I try to debug the code, I can see the
> assembly line code which is not all that helpful. When I try to open
> the source file with the program (I set the language from the command
> line to fortran (set language fortran)), the debugger barfs.

The 'source' command tells gdb to read gdb commands from a file.

It is unrelated to source code debugging. (This is named for
a feature of unix shells to read commands from a file.)

I don't know about source level debugging with gdb and g77.
It might be that it was added later.

-- glen

Tim Prince

unread,
Jun 25, 2008, 3:38:04 AM6/25/08
to

If you built everything with -g option set, the source view should come up
automatically when you step into one of your subroutines, and it should
automatically recognize the Fortran code. However, g77 has been off
support long enough that it will take a lot of luck on recent Windows.
versions. Current Fortran compilers support all f77 plus nearly all
extensions which could be used sanely in g77.

0 new messages