User forums > Help

Debugging fortran

<< < (4/6) > >>

MortenMacFly:

--- Quote from: mandrav on May 10, 2006, 10:04:20 am ---
--- Quote ---should we add another file type "ftFortran"?
--- End quote ---
This sounds better.

--- End quote ---
Ok... I guess it's really better to seperate that from C/C++ sources. Anyway: May I point to the following filey types known to be used in Fortran:
1.) *.f -> these are typically Fortran source files, most common
2.) *.f77 -> these are Fortran 77 source files that compile using any Fortran 77 compiler. This is often used if you mix Fortran77 and Fortran95 code together.
3.) *.f95 -> these are Fortran 95 source files that compile using any Fortran 95 compiler (also part of the GNU compiler suite, so it makes sense to support it). This is usually used if you use Fortran95 only (instead of *.f), but also if you mix Fortran77 and Fortran95 code together.
4.) *.cmn -> these usually hold the information about so-called "common blocks" which allows to group variables with a common sense - you could compare that with structs in C.
5.) *.inc -> these usually hold declarations for constants, variables and/or functions (external interfaces).

So if you want to make it "perfect" all these file types should be taken into consideration. Maybe not now (for a "quick fix") but in the future. Maybe the new compiler framework already takes this into consideration...

With regards, Morten.

MortenMacFly:

--- Quote from: mandrav on May 10, 2006, 10:12:44 am ---Can you try this patch and see if it solves the problem?

--- End quote ---
...working on it... By the way: I also modified associations.cpp and const_bindings.cpp accordingly. I'll send a new patch if that works...

MortenMacFly:
Ok, here it comes: Version 2 of the patch. The good news first: The breakpoint works now -> C::B focusses nicely in the editor. But there is also another issue which isn't so easy to solve: Look at the image I've attached what the debugger adds to the watches. Since the output is different from C/C++ there has some more work to be done...
With regards, Morten.
Edit: What I forgot to add: I've adjusted the patch to include the f95 extension, too. In addition I found a little unicode issue with the D file extension in associations.cpp... ;-)

[attachment deleted by admin]

mandrav:
Regarding the watches tree, what's the output in the debugger's debug log?

MortenMacFly:

--- Quote from: mandrav on May 10, 2006, 11:40:49 am ---Regarding the watches tree, what's the output in the debugger's debug log?

--- End quote ---
Here it is:

--- Code: ---> break main.f:4
Breakpoint 1 at 0x40131b: file main.f, line 4.
(gdb)
> run
Breakpoint 1, MAIN__ () at main.f:4
C:/DOKUME~1/morten/Desktop/fortran/main.f:4:81:beg:0x40131b
Current language:  auto; currently fortran
(gdb)
> info locals
Invalid F77 type code 3 in symbol table.
__g77_cilist_1 = (gdb)
> info args
No arguments.
(gdb)

--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version