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>
- Date: Mon, 17 Nov 2014 09:47:19 +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>
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 (éå)