Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [photran] debugging fortran

Dear Yehuda,
thanks for responding go promptly!

I tried as you wrote, but without success.
I cannot import files into the project browsing the file system: the files are shaded and cannot be selected.

I did create a Fortran project from scratch and selected "debug" and "release" (is set as default). I also verified that the binary parser "Elf" is selected in the C/C++ Build section of the properties. (It is also selected for Fortran Build.)

The debugging with eclipse always opens C-routines (like main.c and lib-stat.c) instead of showing the F-code. And cryptic C is no use to me, unfortunately.

I am sure that I am doing something totally stupid. Any other hint to typical "beginner's mistakes" would be greatly appreciated.

Best,
Peter

INFO:

I built this very short program
--------
program testit
    implicit none
    integer :: i
    i = 1
    print *, i
end program testit
---------

with this build output
----------------------------------
make all
Building file: ../testit.f90
Invoking: GNU Fortran Compiler
gfortran -funderscoring -O0 -g -Wall -c -fmessage-length=0 -o "testit.o" "../testit.f90"
Finished building: ../testit.f90
 
Building target: testit
Invoking: GNU Fortran Linker
gfortran -pg -p -o "testit" ./testit.o  
Finished building target: testit
--------------------------------


Am 27.11.20 um 08:23 schrieb Dr. Yehuda Singer:

Dear Peter,

The solution is simple:

1. Open a new Fortran project.

2. Import the Fortran files to the project.

 

You have to define the switches  for Debug and Relaese mode. Note that the debugging level  has to be defined before the “build” process.

 

Best regards,

Yehuda

 

 

From: photran-bounces@xxxxxxxxxxx <photran-bounces@xxxxxxxxxxx> On Behalf Of Peter-Jost Spies
Sent: Thursday, November 26, 2020 19:10
To: photran@xxxxxxxxxxx
Subject: [photran] debugging fortran

 

Hello,
I am new to eclipse, and I had my FORTRAN debugging experience on MS CodeView about 30 years ago. How simple that tool was...

I am trying to debug short FORTRAN95 programs in eclipse. Stepping through the FORTRAN code with the debugger only works on one of my projects once I had  converted it to a FORTRAN project. But now I fail to repeat this treatment on my other projects, where the run pointer jumps to the end of the code, as if debugging information was missing.

Can you give me a hint as how to manage the projects correctly?

Thank you so much.
BR
Peter

-- 
Peter-Jost Spies
Bern, Switzerland

-- 
Peter-Jost Spies
Bern, Switzerland

Back to the top