Article View: gnu.gdb.bug
Article #9975[stiller@cmx.npac.syr.edu: ]
From: Richard Stallman
Date: Wed, 29 Aug 1990 20:07
Date: Wed, 29 Aug 1990 20:07
52 lines
2031 bytes
2031 bytes
Return-Path: <stiller@cmx.npac.syr.edu>
Date: Wed, 29 Aug 90 15:21:46 EDT
From: stiller@cmx.npac.syr.edu (Lewis Stiller)
To: bug-gnu-emacs@prep.ai.mit.edu
To: bug-gnu-emacs@prep.ai.mit.edu
Hi there.
I can't get manuals easily to check that this is
a bug, but gdb seems not to know the value of a static local
variable, emacs 18.55.1 on crabcake.cs.jhu.edu (Ultrix??).
If the behaviour is a bug and if you want I will narrow it down
and give more details. Basically, M-x gdb command on
"print unused" wrong where unused static local. Source:
main(){
me();
}
int me()
{
static int unused = -10;
int x;
for(x=0;x<10;x++)
printf("%d\n",unused);
}
---------------
gdb output:
Current directory is /*PATH DELETED*/
GDB 3.5, Copyright (C) 1989 Free Software Foundation, Inc.
There is ABSOLUTELY NO WARRANTY for GDB; type "info warranty" for details.
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "info copying" to see the conditions.
Reading symbol data from /users/bright/st/junk/a.out...done.
Type "help" for a list of commands.
(gdb) break me
Reading in symbols for gdb.c...done.
Breakpoint 1 at 0x5f: file gdb.c, line 9.
(gdb) run
Starting program: /*PATH DELETED*/a.out
Bpt 1, me () (gdb.c line 9)
(gdb)
-10
(gdb) print unused
$1 = 0
(gdb) quit
The program is running. Quit anyway? (y or n) y
Inferior Gdb finished
(The path deleted comments are mine).
Technical Details
Message-ID:
<9008292007.AA29583@pogo>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!AI.MIT.EDU!rmsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5053,c3a777bdaabd9949,start X-Google-Attributes: gidf5053,public X-Google-ArrivalTime: 1990-08-29 16:21:52 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!AI.MIT.EDU!rms From: rms@AI.MIT.EDU (Richard Stallman) Newsgroups: gnu.gdb.bug Subject: [stiller@cmx.npac.syr.edu: ] Message-ID: <9008292007.AA29583@pogo> Date: 29 Aug 90 20:07:20 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 52 Posted: Wed Aug 29 21:07:20 1990