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: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Thu, 1 Aug 2013 16:49:53 -0700
- Subject: Re: [RFA] remove duplicates in search_symbols
- References: <yjt2ppvmu3ae dot fsf at ruffy dot mtv dot corp dot google dot com> <CADPb22Q9PdFgG7M0zrge3cNyjiafTWaAECN99MOQDxqPB_2yOQ at mail dot gmail dot com> <8738r68uze dot fsf at fleche dot redhat dot com>
Tom Tromey writes:
> >>>>> "Doug" == Doug Evans <dje@google.com> writes:
>
> >> 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.
>
> Doug> Ping.
>
> Looks good to me.
>
> It seems make_cleanup_free_search_symbols isn't used outside of
> symtab.c.
Thanks.
Yeah, all of these are not used outside of symtab.c.
struct symbol_search { ... };
extern void search_symbols (char *, enum search_domain, int, char **,
struct symbol_search **);
extern void free_search_symbols (struct symbol_search *);
extern struct cleanup *make_cleanup_free_search_symbols (struct symbol_search
**);
I'm semi-ambivalent about keeping them as an exported part of the API
so I left making them static for another pass.