Article View: gnu.emacs.bug
Article #99486(none)
From: Lewis Stiller
Date: Wed, 29 Aug 1990 19:21
Date: Wed, 29 Aug 1990 19:21
47 lines
1879 bytes
1879 bytes
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:
<9008291921.AA16560@cmx.npac.syr.edu>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!CMX.NPAC.SYR.EDU!stillerShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,5b50f266ac342c49,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1990-08-29 15:59:13 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!CMX.NPAC.SYR.EDU!stiller From: stiller@CMX.NPAC.SYR.EDU (Lewis Stiller) Newsgroups: gnu.emacs.bug Subject: (none) Message-ID: <9008291921.AA16560@cmx.npac.syr.edu> Date: 29 Aug 90 19:21:46 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 47 Posted: Wed Aug 29 20:21:46 1990