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 libiberty, gdb] Add hashtab support to filename_ncmp.c and use it in gdb.


[- gdb, + gdb-patches]

On Mon, Jul 9, 2012 at 11:51 AM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> On Mon, Jul 9, 2012 at 8:10 PM, Doug Evans <dje@google.com> wrote:
>> Hi.
>>
>> filename_seen in gdb does a linear search, this patch changes it
>> to use a hash table.
>>
>> Ok to check in?
>
> Why not just use htab_hash_string? The file name canonicalization can
> be put in gdb itself.
>
> Ciao!
> Steven

[blech, my first reply got turned into rich html]

Hi.
Given that filename_cmp.c lives in libiberty, putting related
functions together makes it easier to maintain them.
If you're suggesting writing a function that takes a file name and
returns a canonicalized name that will then work with
htab_hash_string, that's more expensive and I don't see the benefit.


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