This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/5] struct symtab split part 1: buildsym api cleanup
- From: Yao Qi <yao at codesourcery dot com>
- To: Doug Evans <xdje42 at gmail dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 17 Nov 2014 10:58:34 +0800
- Subject: Re: [PATCH 4/5] struct symtab split part 1: buildsym api cleanup
- Authentication-results: sourceware.org; auth=none
- References: <m3y4rhyreg dot fsf at sspiff dot org> <87h9xyha3c dot fsf at codesourcery dot com> <CAP9bCMSDDgeYn8L1tF-WzVLtxEmrppOXckROggXC4GMJJ8-toA at mail dot gmail dot com>
Doug Evans <xdje42@gmail.com> writes:
> Whether something is "needed" can be debatable, but the intent here is
> to lay the groundwork for part 2.
> The static globals get moved into a struct that contains some of the
> buildsym state in part 2.
Oh, right, they are moved into a struct in patch 09/21. That is good.
>
>> I can't estimate the date that buildsym is rewritten as an object in
>> c++, so in foreseeable future, the structure of buildsym still remains
>> nearly unchanged, I assume. Adding static variables runes in the opposite
>> direction, IMO. Secondly, shouldn't be buildsym a stateless processor,
>> which gets objfile as input and ouputs symbols? In this way, isn't it
>> nicer to have argument objfile for the api? I don't know much on
>> buildsym, so I may miss something.
>
> I understand where you're coming from.
> The way I look at it, buildsym is what it is.
> It's not where I want it to be, but OTOH cleaning it up is a lower
> priority than other things.
>
> This patch actually heads in the right direction because the API of
> buildsym becomes more what I want it to be (not entirely so, just more
> so).
> I don't mind a few internal (local to buildsym.c) steps "backwards" in
> the process.
> Plus as mentioned above these static globals disappear in part 2.
OK, that is fine by me.
--
Yao (éå)