This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: gdb/295: global variables in C++ namespaces cannot be printed
- From: David Carlton <carlton at math dot stanford dot edu>
- To: carlton at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 15 Nov 2002 00:48:01 -0000
- Subject: Re: gdb/295: global variables in C++ namespaces cannot be printed
- Reply-to: David Carlton <carlton at math dot stanford dot edu>
The following reply was made to PR gdb/295; it has been noted by GNATS.
From: David Carlton <carlton@math.stanford.edu>
To: salman.khilji@cae.com, gdb-prs@sources.redhat.com,
gdb-gnats@sources.redhat.com
Cc:
Subject: Re: gdb/295: global variables in C++ namespaces cannot be printed
Date: 14 Nov 2002 16:40:30 -0800
I'm looking at C++ namespace-related bugs in GDB, and I came across
your bug report PR gdb/295. In it, you refer to attached source code,
but I don't see any attachment. At any rate, with the current CVS
versions of GDB (and probably older ones), you should be able to refer
to global variables in namespaces as long as you enclose the entire
name in single quotes, as in your example
(gdb) p 'FOO::fSomeVar'
If that's not working for you, could you e-mail me some source code
which will allow me to reproduce the bug in question?
(I should also admit that there are certainly namespace-related bugs
in GDB currently, so not everything is going to be perfect right now.)
Thanks,
David Carlton
carlton@math.stanford.edu
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=295