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 4/5] struct symtab split part 1: buildsym api cleanup


Doug Evans <xdje42@gmail.com> writes:

> I realize there are a lot of globals in buildsym.c, and I'm not trying
> to get rid of them in this patch set, but if one thinks of
> buildsym as an object and start_symtab as a constructor,
> then there's no need to pass the compilation directory to
> start_subfile, and there's no need to pass objfile to end_symtab*.
> This patch applies these changes.

Hi Doug,
I am worried about adding new static variables in buildsym.c.  Why do
you have to the change like this? because part 2 needs such updated api?

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.

-- 
Yao (éå)


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