From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31125 invoked by alias); 4 Jan 2009 23:31:44 -0000 Received: (qmail 31108 invoked by uid 48); 4 Jan 2009 23:31:44 -0000 Date: Sun, 04 Jan 2009 23:31:00 -0000 From: "wkf at alum dot mit dot edu" To: gdb-prs@sourceware.org Message-ID: <20090104233143.9708.wkf@alum.mit.edu> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug c++/9708] New: Unable to print static variable inside class member function X-Bugzilla-Reason: CC Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00012.txt.bz2 Inside a class definition in a cpp file, I have a member function in which I created a 'static bool spin = true;' variable. In the debugger, when inside that function, I was unable to 'print spin' or 'set spin = 0' as it says "No symbol "spin" in current context." Work around is to move the static variable declaration outside the class to top level of the file. This was on: Linux b64-centos4x32 2.6.9-78.0.8.EL #1 Wed Nov 19 19:43:32 EST 2008 i686 athlon i386 GNU/Linux With compiler g++: g++ (GCC) 3.4.6 20060404 (Red Hat 3.4.6-10) Copyright (C) 2006 Free Software Foundation, Inc. -- Summary: Unable to print static variable inside class member function Product: gdb Version: 6.8 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned at sourceware dot org ReportedBy: wkf at alum dot mit dot edu CC: gdb-prs at sourceware dot org http://sourceware.org/bugzilla/show_bug.cgi?id=9708 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.