LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-04-2003, 12:47 PM   #1
star geezer
LQ Newbie
 
Registered: Feb 2003
Location: LA
Posts: 17

Rep: Reputation: 0
G77 Debugger?


Is there a debugger for G77 code? Or do I have to f2c & use gdb or xgdb?

- Vaughn
 
Old 03-04-2003, 02:39 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I don't have any fortran handy to compile,
but man g77 says that you can use gdb
to debug fortran? Why the f2c part? :)

Cheers,
Tink
 
Old 03-04-2003, 05:29 PM   #3
star geezer
LQ Newbie
 
Registered: Feb 2003
Location: LA
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks for your reply. I've actually been trying to use gdb on some fortran programs, but I can't get them to compile (g77) with the -g flag. So I can't even get to the stage of using gdb. I must be doing something wrong. I'll keep working on it.


- Vaughn
 
Old 03-04-2003, 05:54 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Hi ...

Just downloaded this
Code:
C==============================
C  Simple Program to Illustrate
C  Fortran Programming Tools
C==============================
      PROGRAM F77DEMO
      DIMENSION X(100), Y(100)
      PI=2.*ACOS(0.)
      N=100
      DO 10 I=1,N
      X(I)=I*(2*PI/N)
 10   CONTINUE
      CALL TRIG(N,X,Y)
      DO 20 J=1,5
      PRINT 15, X(J), Y(J)
 15   FORMAT(2X,2F8.3)
 20   CONTINUE
      STOP
      END
C
      SUBROUTINE TRIG(N,X,Y)
      DIMENSION X(1), Y(1)
      DO 10 I=1,N
      Y(I) = SIN(X(I))*EXP(-X(I))
 10   CONTINUE
      RETURN
      END
and did
Quote:
g77 -g demo.f -o test
Works fine, and I can even use ddd with it ;)

What is your g77's version?

Cheers,
Tink
 
Old 03-04-2003, 06:24 PM   #5
star geezer
LQ Newbie
 
Registered: Feb 2003
Location: LA
Posts: 17

Original Poster
Rep: Reputation: 0
I finally got my code to compile. Now I guess it's just a case of setting breakpoints & watching what happens.

My version of g77 is:
g77 version 2.96 20000731 (Red Hat Linux 7.3 2.96-113) (from FSF-g77 version 0.5.26 20000731 (Red Hat Linux 7.3 2.96-113))

I forgot to answer your earlier question...f2c is (or was) a translator that turns fortran code into c code. Before g77, there was f2c.

- Vaughn
 
Old 03-04-2003, 06:35 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Good on yah! :)

I've got the 2.95.3 compiler suite installed,
and I recall other threads pointing out that
RH for some reason decided to bundle a
buggy version :}

Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
install of g77 or g77 rpm munichtexan Linux - Newbie 1 11-18-2005 03:56 PM
Compiling with g77 thank you very much...but I solved compile with g77 gambato79 Fedora 9 07-19-2005 12:35 PM
g77: 8 btyes on the PC? shengchieh Programming 0 01-14-2005 04:52 PM
g77 is not... Jozsef Linux - Software 4 10-08-2004 03:28 PM
how should I install g77 pkuer Linux - Software 1 07-15-2004 10:41 AM


All times are GMT -5. The time now is 09:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration