[patch 0/2] Unify lookup_symbol_in_objfile_symtabs

Doug Evans dje@google.com
Wed Dec 3 17:18:00 GMT 2014


On Wed, Dec 3, 2014 at 9:06 AM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> Hi,
>
> I have seen
>         [patchv3 2/2] Accelerate lookup_symbol_aux_objfile 85x
> could be even applied in one other part of code which is duplicated now.
>
> I am just not sure if we should go the route of
>         struct objfile * -> const struct objfile *
> or the other way of:
>         const struct objfile * -> struct objfile *
>
> Normally const adding is better but here I do not see much useful to have any
> struct objfile * const and then it just causes pointer compatibility problems.
>
> Please choose +const or -const variant for check-in.

Yeah, it's a toss up.

struct objfile is one case where I've decided to just leave the const
out and not worry about it.
But I'm ok with going either route.
If no one has a preference, pick something, and if you want me to then
I'd say go with no-const.
[FAOD, this is just for struct objfile *]



More information about the Gdb-patches mailing list