Article View: gnu.gdb.bug
Article #2283static variables: "no symbol X in current context"
From: Michael Hamilton
Date: Tue, 09 Apr 2002 20:02
Date: Tue, 09 Apr 2002 20:02
21 lines
1763 bytes
1763 bytes
System: Linux 2.2.16-22 (Redhat 7.?) GDB 5.0 (run inside of xemacs) I don't know if this is a bug or just my problem, but, I haven't been able to figure out how to fix it despite looking at FAQs and docs and websearches. I have a local variable declared static in a subroutine my code. In gdb, when inside the subroutine, I use > p x No symbol "x" in current context. This only seems to happen when running GDB on Linux. When I run it on a solaris/sun machine, it gives me the value. Non-static vars seem to work fine. What am I missing? Thanks, Mike
Technical Details
Message-ID:
<fb04c8e9.0204091202.fe8d509@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!bad-news.newsread.com!news-xfer.newsread.com!netaxs.com!newsread.com!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5053,437ba9ac83d5b05,start X-Google-Attributes: gidf5053,public X-Google-ArrivalTime: 2002-04-09 13:02:42 PST x-uunet-gateway: mr1.ash.ops.us.uu.net from bug-gdb to gnu.gdb.bug; Tue, 9 Apr 2002 20:02:41 GMT Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!bad-news.newsread.com!news-xfer.newsread.com!netaxs.com!newsread.com!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!not-for-mail From: michaeljohnhamilton@cox.net (Michael Hamilton) Subject: static variables: "no symbol X in current context" Date: 9 Apr 2002 13:02:36 -0700 Organization: http://groups.google.com/ Message-ID: <fb04c8e9.0204091202.fe8d509@posting.google.com> NNTP-Posting-Host: 12.105.236.171 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1018382557 25463 127.0.0.1 (9 Apr 2002 20:02:37 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 9 Apr 2002 20:02:37 GMT Approved: bug-gdb-request@mail.gnu.org Newsgroups: gnu.gdb.bug Sender: bug-gdb-request@mail.gnu.org Lines: 21