This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [patch 0/3] Re: [RFA] c++/11734 revisited (and c++/12273)


On 02/10/2011 01:45 PM, Keith Seitz wrote:
So, I'm not quite sure where I stand with this 11734/12273 (and other
related bugs)... What do you want me to do?

In private IRC, Jan recommended that I post an update of my patches. I am including both here.


I believe I made all the changes Jan recommended, but I may have missed something. If so, please let me know, and I will fix immediately.

These patches are largely the same as the past two I posted for 11734 and 12273, but there is, of necessity, a handful of noteworthy additions/changes worth mentioning here (perhaps if nothing more than to facilitate review).

- The test case for 11734 (now called ovsrch.exp) was modified to expose more bugs.
- Fixes for the above bugs (passing valid blocks to lookup_symbol in several places, reconstructing search name based on SYM_CLASS in find_method -- see code for detailed explanation)
- Unilateral removal of the single quote in decode_compound


These patches cause no regressions in the test suite on x86_64 linux, but that doesn't mean that they won't eventually uncover some other hidden bug(s).

Questions/comments/concerns?

Keith

ChangeLog
2011-02-17  Keith Seitz  <keiths@redhat.com>

        PR c++/12273
        * linespec.c (locate_first_half): Keep overload information, too.
        (decode_compound): Use a string to represent break characters
        to escape the loop.
        If P points to a break character, do not increment it.
        For C++ and Java, keep overload information and relevant keywords.
        If we cannot find a symbol, search the minimal symbols.

PR c++/11734
* 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.
Pass a valid block to lookup_symbol.
(lookup_prefix_sym): Likewise.
(find_method): Construct search name based on SYM_CLASS instead
of SAVED_ARG.
* psymtab.c (lookup_partial_symbol): Add language parameter.
(lookup_symbol_aux_psymtabs): Likewise.
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.
Add language parameter.
(read_symtabs_for_function): Add language parameter and pass to
lookup_partial_symbol.
(find_symbol_file_from_partial): Likewise.
* symfile.h (struct quick_symbol_functions): Add language parameter
to lookup_symbol, expand_symtabs_for_function, and find_symbol_file.
* cp-support.c (make_symbol_overload_list): Update above API
changes.
* symtab.c (lookup_symbol_aux_quick): Pass the current language
to the quick symbol functions.
(basic_lookup_transparent_type_quick): Likewise.
(find_main_filename): Likewise.
* dwarf2_read.c (dw2_lookup_symbol): Add langauge parameter.
(dw2_expand_symtabs_for_function): Likewise.
(dw2_find_symbol_file): Likewise.


testsuite/ChangeLog
2011-02-17  Keith Seitz  <keiths@redhat.com>

	PR c++/12273
	* gdb.cp/cmpd-minsyms.exp: New test.
	* gdb.cp/cmpd-minsyms.cc: New file.

	PR c++/11734
	* gdb.cp/ovsrch.exp: New test.
	* gdb.cp/ovsrch.h: New file.
	* gdb.cp/ovsrch1.cc: New file.
	* gdb.cp/ovsrch2.cc: New file.
	* gdb.cp/ovsrch3.cc: New file.
	* gdb.cp/ovsrch4.cc: New file.

Attachment: 11734-12273.patch
Description: Text document


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