Page 1 of 1
Debugger for gfortan
Posted: Fri Sep 20, 2013 1:08 pm
by biglimp
Hello,
I followed the instructions on how to use MinGV for fortran and I think I was succesful since I was able to get out the 'hello world!' example. Great!
Now I got stuck on how to use the debugger in conjunction with fortran. Any suggestions for a beginner?
Thanks.
Posted: Fri Sep 20, 2013 3:16 pm
by jussij
Now I got stuck on how to use the debugger in conjunction with FORTRAN. Any suggestions for a beginner?
The debugger support in Zeus is pretty much limited to GDB, Python and Lua.
I've never tried to debug FORTRAN so I'm pretty sure at present it will not work
But if MinGW FORTRAN is also supported by the GDB debugger I'd be happy to try to also get that working inside Zeus. If that is the case then it should be do-able.
Do you know of any web pages that describe how to debug MinGW FORTRAN code using GDB?
Cheers Jussi
Posted: Sat Sep 21, 2013 1:07 pm
by jussij
I was wrong. I just tested the GDB debugger with a simple FORTRAN program an that test seemed to work just fine
To run the debugger this is what I did:
1) Add the -g debug option to the
FORTRAN Document Type Compiler command line string:
Code: Select all
gfortran.exe -g -ffree-form -std=f95 "$fn" -o "$fdd$fb.exe"
2) With no workspace open, edit the default workspace options using the
Workspace, Options menu.
3) In the
Debugging section set the following values:
Code: Select all
Executable: $fdd$fb.exe
Debugger Module: GDB Debugger Interface
4) Compile a test fortran program.
5) You should now be able to debug that executable produced using the Debugging menu.
Cheers Jussi