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: [RFA] Use FILENAME_CMP to compare filenames in compare_search_syms.


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


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