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: [PATCH 5/9] Rename some "aux" functions.


On Mon, Oct 27, 2014 at 6:05 PM, Yao Qi <yao@codesourcery.com> wrote:
> Doug Evans <xdje42@gmail.com> writes:
>
>>  static struct symbol *
>> -lookup_symbol_aux_objfile (struct objfile *objfile, int block_index,
>> -                        const char *name, const domain_enum domain)
>> +lookup_symbol_in_symtabs (struct objfile *objfile, int block_index,
>> +                       const char *name, const domain_enum domain)
>
> Hi Doug,
> It looks good to remove "aux" from function name, but this function
> still has a parameter objfile, so I feel we'd better keep "object" in
> function name, such as lookup_symbol_in_objfile, what do you think?

Yeah, I thought of this.
The problem is that "lookup symbol in objfile" says nothing about
symtabs vs psymtabs/gdb_index.
If one knows how symbol lookup is done (first look in symtabs, then
look in psymtabs/gdb_index)
then "lookup symbol in objfile" conveys to the reader the wrong thing
because this function only looks in symtabs.

That's the reasoning why I went with _symtabs.

If you want to name it lookup_symbol_in_objfile_symtabs then I'd be ok
with that.


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