Article View: gnu.gdb.bug
Article #618[fed!mqws1!m1tag00@uunet.uu.net: Re: GDB and Fortran ]
From: Richard Stallman
Date: Mon, 14 Nov 1988 20:01
Date: Mon, 14 Nov 1988 20:01
67 lines
2338 bytes
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
Technical Details
Message-ID:
<8811142001.AA00660@sugar-bombs.ai.mit.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!WHEATIES.AI.MIT.EDU!rmsShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!WHEATIES.AI.MIT.EDU!rms From: rms@WHEATIES.AI.MIT.EDU (Richard Stallman) Newsgroups: gnu.gdb.bug Subject: [fed!mqws1!m1tag00@uunet.uu.net: Re: GDB and Fortran ] Message-ID: <8811142001.AA00660@sugar-bombs.ai.mit.edu> Date: 14 Nov 88 20:01:27 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 67