* How to view value of variable in namespaces?
@ 2002-10-09 2:50 Prashant Deva
2002-10-09 2:57 ` Andrew Walrond
2002-10-09 5:52 ` Daniel Jacobowitz
0 siblings, 2 replies; 3+ messages in thread
From: Prashant Deva @ 2002-10-09 2:50 UTC (permalink / raw)
To: gdb
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.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: How to view value of variable in namespaces?
2002-10-09 2:50 How to view value of variable in namespaces? Prashant Deva
@ 2002-10-09 2:57 ` Andrew Walrond
2002-10-09 5:52 ` Daniel Jacobowitz
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Walrond @ 2002-10-09 2:57 UTC (permalink / raw)
To: Prashant Deva; +Cc: gdb
I think 'with great difficulty' about sums it up. If you follow the
conversations here, you'll see there is some serious work going on at
the moment to bring namespace understanding to gdb. I for one am
following developments with great anticipation....
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.
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: How to view value of variable in namespaces?
2002-10-09 2:50 How to view value of variable in namespaces? Prashant Deva
2002-10-09 2:57 ` Andrew Walrond
@ 2002-10-09 5:52 ` Daniel Jacobowitz
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2002-10-09 5:52 UTC (permalink / raw)
To: gdb
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-10-09 12:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-09 2:50 How to view value of variable in namespaces? Prashant Deva
2002-10-09 2:57 ` Andrew Walrond
2002-10-09 5:52 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox