Re: Fortran Debugger help for a newbie using Windows



skcllus@xxxxxxxxx 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 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

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.
.



Relevant Pages

  • Re: Fortran, debugger and Alpha/VMS 7.3-2
    ... until my colleague needed to use the debugger with her ... recent patch kit for DEBUG and you should be fine. ... The bug is not in the debugger, but in the Bliss compiler used ... Fortran module with both compilers, on the same machine, and ANALyzing ...
    (comp.os.vms)
  • Re: How to do a SGI loc on linux
    ... > On SGI computers, I can use the loc instruction to obtain the address of ... > a variable in Fortran. ... are rebuilt using a new compiler or version of a compiler. ... using different command-line options or a different version of `g77'. ...
    (comp.lang.fortran)
  • Re: How to set my own program startup in f77 programs other than MAIN__
    ... I am writing simple F77 program compiler g77 on Linux. ... statement of my FORTRAN program. ... I should get the control of the program execution before first ...
    (comp.lang.fortran)
  • Re: g77 and gdb doesnt find uninitialized variables
    ... Brian Elmegaard wrote: ... > can do it with the Salford compiler and g77 has an option for warning ... The short answer is that g77 is not required by the Fortran ...
    (comp.lang.fortran)
  • Re: Open Watcom Fortran compiler help needed
    ... > (and not really interested in any real development in the compiler?) ... > * Can the OpenWatcom project inherit any code from GNU Fortran of g95? ... I have heard the OW debugger is ... converts into optimized / unoptimized machine language. ...
    (comp.lang.fortran)