This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 5/9] Rename some "aux" functions.
- From: Doug Evans <xdje42 at gmail dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 27 Oct 2014 18:36:54 -0700
- Subject: Re: [PATCH 5/9] Rename some "aux" functions.
- Authentication-results: sourceware.org; auth=none
- References: <m3zjcijfi5 dot fsf at sspiff dot org> <87k33luhpw dot fsf at codesourcery dot com>
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.