From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21495 invoked by alias); 28 Oct 2014 01:36:58 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 21483 invoked by uid 89); 28 Oct 2014 01:36:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yk0-f180.google.com Received: from mail-yk0-f180.google.com (HELO mail-yk0-f180.google.com) (209.85.160.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 28 Oct 2014 01:36:56 +0000 Received: by mail-yk0-f180.google.com with SMTP id 9so876918ykp.25 for ; Mon, 27 Oct 2014 18:36:54 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.236.17.197 with SMTP id j45mr25459yhj.49.1414460214120; Mon, 27 Oct 2014 18:36:54 -0700 (PDT) Received: by 10.170.140.214 with HTTP; Mon, 27 Oct 2014 18:36:54 -0700 (PDT) In-Reply-To: <87k33luhpw.fsf@codesourcery.com> References: <87k33luhpw.fsf@codesourcery.com> Date: Tue, 28 Oct 2014 01:36:00 -0000 Message-ID: Subject: Re: [PATCH 5/9] Rename some "aux" functions. From: Doug Evans To: Yao Qi Cc: "gdb-patches@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00749.txt.bz2 On Mon, Oct 27, 2014 at 6:05 PM, Yao Qi wrote: > Doug Evans 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.