From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20467 invoked by alias); 9 Oct 2002 12:52:53 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 20460 invoked from network); 9 Oct 2002 12:52:52 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 9 Oct 2002 12:52:52 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17zHGP-00043c-00 for ; Wed, 09 Oct 2002 08:52:37 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17zGLH-0001Uw-00 for ; Wed, 09 Oct 2002 08:53:35 -0400 Date: Wed, 09 Oct 2002 05:52:00 -0000 From: Daniel Jacobowitz To: gdb Subject: Re: How to view value of variable in namespaces? Message-ID: <20021009125334.GA5724@nevyn.them.org> Mail-Followup-To: gdb References: <000b01c26f79$1d456bd0$39698aca@homecomp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000b01c26f79$1d456bd0$39698aca@homecomp> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-10/txt/msg00084.txt.bz2 On Wed, Oct 09, 2002 at 03:18:54PM +0530, Prashant Deva wrote: > I have code like this- > > namespace testSP > { > int spert; > } > > but if i try to do - > 'print testSP::spert' > > in gdb, it tells me 'no symbol testSPin current context'. > I also tried putting 'using namespace testSP' in my code but the same error > continued to come. > > So how am i supposed to view the value of variables inside namespaces? > > P.S.- I am using gdb v 5.1.1. That's old, might want to try a newer one. But as Andrew said this is a work in progress. Also, try: (gdb) print 'testSP::spert' -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer