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] Rename new_symfile_objfile to finish_new_objfile.


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.


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