🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Richard Stallman Mon, 14 Nov 1988 20:01
[fed!mqws1!m1tag00@uunet.uu.net: Re: GDB and Fortran ]
#618
Author: Richard Stallman
Date: Mon, 14 Nov 1988 20:01
67 lines
2338 bytes
Return-Path: <fed!mqws1!m1tag00@uunet.uu.net>
To: uunet!wheaties.ai.mit.edu!rms@uunet.uu.net (Richard Stallman)
Subject: Re: GDB and Fortran 
In-Reply-To: Your message of Sun, 13 Nov 88 21:18:47 -0500.
             <8811140218.AA01305@sugar-bombs.ai.mit.edu> 
Date: Mon, 14 Nov 88 10:44:26 -0500
From: Timothy A. Grunwald <fed!mqws1!m1tag00@uunet.uu.net>

>>     When I try to debug a large Fortran program
>>     with GDB it seems to work fine until I try to print out variable values.
>>     All variables print out the same value, -1.  Is GDB supposed to be able
>>     to debug Fortran programs?
>> 
>> As far as I know, it should.  If you report a specific test case that
>> fails, we can debug it.  Send the bug report to bug-gdb.
>> 
	Should I post or mail to bug-gdb?  Anyway the large Fortran program
is to large to send.  I cooked up a simple example that displays a different
behavior.  
The following was run on a Sun 3/60, Sun OS 3.5, GNU Emacs 18.52, GDB 

      program testit
      real*4 a,b,c(10)
      i=5
      j=6
      a=5.5
      b=a*a
      c(1) = 10.
      c(2) = 20.
      c(3) = 30.
      c(4) = 40.
      stop
      end

Reading symbol data from /mq/m1tag00/testit...done.
(gdb) break 5
Breakpoint 4 at 0x20d0: file testit.f, line 5.
(gdb) run
Starting program: /mq/m1tag00/testit 

Bpt 4, MAIN () (testit.f line 5)
(gdb) s
(gdb) s
(gdb) s
(gdb) s
(gdb) s
(gdb) s
(gdb) print b
$1 = 30.25
(gdb) print c[1]
Argument to arithmetic operation not a number.
(gdb) print c[2]
Argument to arithmetic operation not a number.
(gdb) print c[3]
Argument to arithmetic operation not a number.
(gdb) where c
Value not integer or pointer.
(gdb) whatis c
type = struct unknown
(gdb) 

I didn't get the -1 behavior, but as you can see arrays seem to have problems.

	Tim Grunwald
	Federal Reserve Board
	21st & C st N.W. DC  20551
	uunet!fed!m1tag00
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads