This is the mail archive of the gdb@sourceware.cygnus.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]

Re: namespaces and gdb


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


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