This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] remove duplicates in search_symbols
- From: Doug Evans <dje at google dot com>
- To: gdb-patches <gdb-patches at sourceware dot org>
- Date: Fri, 19 Jul 2013 14:51:49 -0700
- Subject: Re: [RFA] remove duplicates in search_symbols
- References: <yjt2ppvmu3ae dot fsf at ruffy dot mtv dot corp dot google dot com>
On Sat, Jun 15, 2013 at 8:45 PM, Doug Evans <dje@google.com> wrote:
> Hi.
> Depending on the app a large number of duplicates can be found
> by search_symbols. This patch removes the dups.
>
> It also will change the output of "info fun|var|types" to be sorted
> by file name.
>
> Regression tested on amd64-linux, with/without fission.
>
> Ok to check in?
>
> 2013-06-15 Doug Evans <dje@google.com>
>
> * symtab.c (do_free_search_symbols_cleanup): Change arg to,
> effectively, struct symbol_search **.
> (make_cleanup_free_search_symbols): Change arg to struct symbol_search **.
> All callers updated.
> (compare_search_syms): Compare symtab file name and block as well.
> (search_symbols_equal): New function.
> (sort_search_symbols_remove_dups): Renamed from sort_search_symbols.
> New args new_head, new_tail. Result is now void. Remove dups after
> sorting the symbols.
> (search_symbols): Sort all found symbols once, after all have been found,
> and remove duplicates. Simplify cleanup tracking of result.
> * symtab.h (make_cleanup_free_search_symbols): Update prototype.
Ping.