This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Use FILENAME_CMP to compare filenames in compare_search_syms.
- From: Pedro Alves <palves at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 01 Oct 2013 16:14:49 +0100
- Subject: Re: [RFA] Use FILENAME_CMP to compare filenames in compare_search_syms.
- Authentication-results: sourceware.org; auth=none
- References: <1380618427-27814-1-git-send-email-brobecker at adacore dot com> <524A9BCF dot 90502 at redhat dot com> <20131001123031 dot GF2840 at adacore dot com>
On 10/01/2013 01:30 PM, Joel Brobecker wrote:
>> I'd say that use of FILENAME_CMP instead of strcmp is an obvious change.
>>
>> However, this is not complete. This function is called by:
> [...]
>> But really, so that this sort of out-of-sync bugs doesn't
>> happen, it'd be better if search_symbols_equal were reimplemented
>> in terms of compare_search_syms or even be eliminated.
>
> Indeed! I'm turning this fix into a 2-patch series:
>
> 1. Delete search_symbols_equal
>
> This patch does not fix anything, other than removing the duplication.
>
> I pondered a bit over that change, thinking maybe we'd want
> to keep it, just because the arguments have the right type
> instead of "void *". In the end, I felt it was sufficiently
> localized that deleting was OK. Putting it back is easy,
> though, so whichever we want it shall be.
This is fine with me.
> * symtab.c (compare_search_syms): Use FILENAME_CMP instead of
> strcmp to compare two symtab filenames.
This one looks obvious to me.
Thanks,
--
Pedro Alves