namespaces and gdb
Daniel Berlin
dan@cgsoftware.com
Fri Jun 30 07:28:00 GMT 2000
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
More information about the Gdb
mailing list