[RFA] c++/11734 revisited

Keith Seitz keiths@redhat.com
Thu Dec 9 00:50:00 GMT 2010


Hi,

Refresher: This is the bug that relates to psymtabs not having overload 
information and how gdb can't find the right psymtab to expand.

I originally proposed fixing this by switching to pre-expansion. Tom 
reports that this really mucks up indexing. As a result, I have 
rewritten this patch.

I *think* I have addressed almost all of the original issues that were 
reported. One that I have not addressed is Doug's complaint about 
removing the single-quote in decode_compound. Quite frankly, the 
single/double quote handling is a mess. It's such a nightmare, it would 
actually a primary reason to rewrite linespec.c entirely. One of these 
days, I'll find the time to do it. [Although with the countless hours 
I've spent on linespec.c in the past year, I'm sure I could have 
rewritten it three times already.]

This patch also fixes Jan's expand-psymtabs-cxx test which he posted on 
11/21.

Yes, I realize this is actually two patches, one for psymtab.c and one 
for linespec.c, but the linespec.c patch is really small this time and 
the tests for both are in the same file (because that's how I discovered 
the linespec bug).

Tested on x86_64-linux. No regressions.

Comments?

Keith

ChangeLog
2010-12-08  Keith Seitz  <keiths@redhat.com>

	* linespec.c (decode_compound): Rename SAVED_ARG to
	THE_REAL_SAVED_ARG.
	Make a copy of THE_REAL_SAVED_ARG in SAVED_ARG and strip
	single-quotes.

	* psymtab.c (lookup_symbol_aux_psymtabs): Don't assume that
	the psymtab we found was the right one. Search for the desired
	symbol in the symtab to be certain.
	(psymtab_search_name): New function.
	(lookup_partial_symbol): Use psymtab_search_name.

testsuite/ChangeLog
2010-12-08  Keith Seitz  <keiths@redhat.com>

	* gdb.cp/pr11734.exp: New test.
	* gdb.cp/pr11734.h: New file.
	* gdb.cp/pr11734-1.cc: New file.
	* gdb.cp/pr11734-2.cc: New file.
	* gdb.cp/pr11734-3.cc: New file.
	* gdb.cp/pr11734-4.cc: New file.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr11734-4.patch
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20101209/5bcd02c3/attachment.ksh>


More information about the Gdb-patches mailing list