This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Rename new_symfile_objfile to finish_new_objfile.
- From: Doug Evans <dje at google dot com>
- To: gdb-patches <gdb-patches at sourceware dot org>
- Date: Tue, 10 Feb 2015 17:04:03 -0800
- Subject: Re: [PATCH] Rename new_symfile_objfile to finish_new_objfile.
- Authentication-results: sourceware.org; auth=none
- References: <yjt2wq3uioic dot fsf at ruffy dot mtv dot corp dot google dot com>
On Fri, Feb 6, 2015 at 3:55 PM, Doug Evans <dje@google.com> wrote:
> Hi.
>
> I'm tempted to just commit this patch, but in case anyone wants to
> comment ...
>
> clear_symtab_users is in need of a bit of cleanup.
> I can see how doing things a little differently would make this part of gdb
> that much more obvious and clean. I started to go down this road
> but ran out of time (for the moment at least).
>
> I still want to get this part in.
> The name "new_symfile_objfile" is confusing.
> "symfile_objfile" has a very specific meaning: it is the piece of global
> state that records the "main" objfile. Thus one would naturally expect
> that new_symfile_objfile would only be called when there's a new main objfile.
> However, this is not the case. :-(
>
> To remove this bit of confusion this patch renames the function.
>
> And since it has only one caller in the same file I made it static.
> That helps limit the scope of things one needs to think about when
> cleaning up clear_symtab_users.
>
> 2015-02-06 Doug Evans <dje@google.com>
>
> * symfile.h (new_symfile_objfile): Delete.
> * symfile.c (finish_new_objfile): Renamed from new_symfile_objfile.
> All callers updated.
Committed.