[RFA] c++/13615

Keith Seitz keiths@redhat.com
Fri Oct 5 19:45:00 GMT 2012


On 09/26/2012 01:51 PM, Tom Tromey wrote:
>>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
>
> Keith> $SUBJECT deals with various symbol lookup failures with inherited
> Keith> typedefs.  Tom reported these failures in both the expression parser
> Keith> and gdb.lookup_type (part of the python support).
>
> Sorry, no review yet -- however I was wondering if you could check how
> this patch relates to this thread:
>
>      http://sourceware.org/ml/gdb-patches/2010-11/threads.html#00014

Yeah, the two are rather similar, but not exactly. Nonetheless, with 
much hair-pulling [I haven't much left!], I've been able to modify my 
original patch to fix the problem reported in the above thread. [I did 
not use anything from the suggested patch other than the test case, 
which I've updated a bit.]

I'm attaching the latest revision of this patch.

BTW, this patch relies on the cp_test_ptype_class-typedef.patch,
http://sourceware.org/ml/gdb-patches/2012-10/msg00051.html .

Keith

ChangeLog
2012-10-05  Keith Seitz  <keiths@redhat.com>

	c++/13615
	* cp-namespace.c (cp_lookup_symbol_nonlocal): If no symbol
	is found, search through any base classes to find it.
	(find_symbol_in_baseclass): New function.
	(cp_lookup_nested_symbol): Search through base classes, too.

testsuite/ChangeLog
2012-10-05  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 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.
	(main): Add instances of Z and ZZ.
	* gdb.cp/derivation.exp: Update typedef changes in tests.
	Add tests for class typedefs both before and after starting
	the inferior.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 13615+.patch
Type: text/x-patch
Size: 14838 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20121005/4eb0f0d0/attachment.bin>


More information about the Gdb-patches mailing list