Re: [PATCH 1/4] [gdb/symtab] Fix htab_find_slot call in read_call_site_scope

Simon Marchi via Gdb-patches
2021-10-04T16:35:32Z

> All find variants (with the explicit exception of
> find_empty_slot_for_expand) call eq_f on both an element argument and a
> hash table element. Consequently, if we break first-field-type
> compatibility between the two, the element argument must be of the same
> type as the hash table element, and the eq function must use hash table
> element type.
>
> This is not a future problem, this is an actual problem I ran into when
> I tried it out moving the pc to the second field position, and the
> problem is described in the commit log.

That makes sense. I read the hashtab code wrong.

Simon