This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to view value of variable in namespaces?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]