Debugger for gfortan

Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
Post Reply
biglimp
Posts: 1
Joined: Fri Sep 20, 2013 12:51 pm

Debugger for gfortan

Post 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.
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post 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
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post 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
Post Reply