Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <xdje42@gmail.com>
To: Yao Qi <yao@codesourcery.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH 5/9] Rename some "aux" functions.
Date: Tue, 28 Oct 2014 01:36:00 -0000	[thread overview]
Message-ID: <CAP9bCMRk_CRHhQJ2H2ij6zweq7pGWgtztzG=W+4wUnyii7JMSw@mail.gmail.com> (raw)
In-Reply-To: <87k33luhpw.fsf@codesourcery.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.


  reply	other threads:[~2014-10-28  1:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-27  4:37 Doug Evans
2014-10-28  1:09 ` Yao Qi
2014-10-28  1:36   ` Doug Evans [this message]
2014-10-28  3:18     ` Yao Qi
2014-11-07  8:59       ` Doug Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAP9bCMRk_CRHhQJ2H2ij6zweq7pGWgtztzG=W+4wUnyii7JMSw@mail.gmail.com' \
    --to=xdje42@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=yao@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox