This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: namespaces and gdb
- To: Alexander Zhuckov <zuav at int dot spb dot ru>
- Subject: Re: namespaces and gdb
- From: Daniel Berlin <dan at cgsoftware dot com>
- Date: Fri, 30 Jun 2000 07:28:12 -0700 (PDT)
- cc: gdb at sourceware dot cygnus dot com
On 30 Jun 2000, Alexander Zhuckov wrote:
>
> Thank you very much! I tried it (p 'Foo::version') in gdb 5.0 and it works.
> And now I have one more question: how I can examine a value of a variable
> in anonymous namespace?
>
You have to know how it's really being named. nm <your
executable>|c++filt|grep -i <the variable name>
See, the real problem is that namespaces don't generate any debug info,
and aren't symbols, so they don't really exist, so to speak.
The reason quoting it works is because it also matches it against the
demangled names.
--Dan
C++ Support Maintainer - GDB