From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20644 invoked by alias); 29 May 2002 15:09:00 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 20603 invoked from network); 29 May 2002 15:08:52 -0000 Received: from unknown (HELO branoic) (12.234.96.134) by sources.redhat.com with SMTP; 29 May 2002 15:08:52 -0000 Received: from drow by branoic with local (Exim 3.35 #1 (Debian)) id 17D542-0005kg-00; Wed, 29 May 2002 11:08:38 -0400 Date: Wed, 29 May 2002 08:19:00 -0000 From: Daniel Jacobowitz To: Benjamin Kosnik Cc: Michael Elizabeth Chastain , gdb-patches@sources.redhat.com Subject: Re: gdb.c++ testsuite 1.3: member_data_static.exp (resend) Message-ID: <20020529150837.GA21893@branoic.them.org> Mail-Followup-To: Benjamin Kosnik , Michael Elizabeth Chastain , gdb-patches@sources.redhat.com References: <200205282112.g4SLCap24212@duracef.shout.net> <20020529030004.4d9ce9e5.bkoz@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020529030004.4d9ce9e5.bkoz@redhat.com> User-Agent: Mutt/1.3.28i X-SW-Source: 2002-05/txt/msg01001.txt.bz2 On Wed, May 29, 2002 at 03:00:04AM -0700, Benjamin Kosnik wrote: > > > As far as I can tell, gdb is reporting what's actually in the > > executable file. 'test3' has one static member and no non-static > > members. So perhaps gcc is broken, but I don't understand your view > > that gdb is broken. Can you explain more? What do you *want* gdb to > > print here? > > Perhaps it is a gcc error, I don't know. > > I'd like > > mec> (gdb) print test3 > mec> $2 = {static data = } > > to be > > (gdb) print test3 > $2 = > { = {static test = true, static key1 = 5, static key2 = 77, > static value = oriental}, _vptr.gnu_obj_2 = 0x8092efc, > static value_derived = etruscian } > > I have > > > Alternatively, I'd like to be able to use explicit qualifications, to > look at static data members, like so: > > (gdb) print gnu_obj_2::antiquities; > $3 = etruscian > > Seem reasonable? Unfortunately, no. Compile the testcase (just -c will do). Then run `nm' over the symbols. Look for the `data' member; it isn't there. is correct. My C++ lawyering is a little rusty, but I believe this is correct; it's a templated member, and not explicitly instantiated, and not even implicitly instantiated. I don't see a reason for it to be emitted, and if it isn't emitted GDB can't help you figure out what its value is. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer