[RFA] c++/13615
Keith Seitz
keiths@redhat.com
Wed Nov 14 21:48:00 GMT 2012
On 11/08/2012 01:59 PM, Tom Tromey wrote:
> Keith> ptype N::Derived::value_type should print 'int' -- but from the
> Keith> comment and placement of this code I wonder if it would print 'double'.
>
> I neglected to mention it, but it would be nice either way to have an
> explicit test for this.
I've added a test for this and updated the patch to correct that bug.
Keith
ChangeLog
2012-11-14 Keith Seitz <keiths@redhat.com>
c++/13615
* cp-namespace.c (cp_lookup_symbol_in_namespace): Add SEARCH
parameter and pass it to lookup_symbol_file.
(cp_lookup_symbol_imports): Tell cp_lookup_symbol_in_namespace
to search base classes.
(cp_lookup_symbol_namespace): Likewise.
(lookup_namespace_scope): Likewise.
(lookup_symbol_file): Add SEARCH parameter.
If SEARCH is non-zero and no symbol is found, lookup the class
and call cp_lookup_nested_symbol.
(find_symbol_in_baseclass): New function.
(cp_lookup_nested_symbol): Do not let
cp_lookup_symbol_in_namespace search through base classes.
Do that later when there is no global symbol match.
testsuite/ChangeLog
2012-11-14 Keith Seitz <keiths@redhat.com>
c++/13615
* gdb.cp/baseenum.cc: New file.
* gdb.cp/baseenum.exp: New file.
* gdb.cp/derivation.cc (A): Add copyright.
Add a typedef.
(B): Use A::value_type instead of int. Change all references.
(D): Use value_type instead of int. Change all references.
(E): Likewise.
(F); Likewise.
(Z): New class.
(ZZ): New class.
(N, Base, Derived): New namespace and classes.
(main): Add instances of Z and ZZ.
Make sure all symbols from N are kept.
* gdb.cp/derivation.exp: Update typedef changes in tests.
Add tests for class typedefs both before and after starting
the inferior.
Add tests for searching for a typedef while stopped in a
method.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 13615++.patch
Type: text/x-patch
Size: 20712 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20121114/fcd02441/attachment.bin>
More information about the Gdb-patches
mailing list