This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfc] split up symtab.h
- From: David Carlton <carlton at math dot stanford dot edu>
- To: Michael Snyder <msnyder at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com, Jim Blandy <jimb at red-bean dot com>, Elena Zannoni <ezannoni at redhat dot com>
- Date: 08 Oct 2002 15:22:22 -0700
- Subject: Re: [rfc] split up symtab.h
- References: <ro1bs64lmcp.fsf@jackfruit.Stanford.EDU><3DA357B6.B37C5BC7@redhat.com>
On Tue, 08 Oct 2002 15:09:58 -0700, Michael Snyder <msnyder@redhat.com> said:
> David Carlton wrote:
>> struct general_symbol_info (1)
> Careful. Struct general_symbol_info is mentioned in LOTS of
> places... indirectly, thru uses of the macros SYMBOL_NAME,
> SYMBOL_TYPE, etc.
Right, that particular count is totally misleading. Aside from the
macros that you mentioned, the definitions of struct
{minimal_,partial_,}symbol all need to have the definition of struct
general_symbol_info available as well. So there would be nontrivial
dependencies among the header files that I was proposing. (I _think_
the only nontrivial dependencies arise from 'struct
general_symbol_info' and from enums, but I could be wrong.)
Personally, I'd be quite tempted to have the header files for
minimal_symbol, symbol, and partial_symbol all include the header file
for general_symbol_info; I realize that GDB prefers to avoid that, but
here is a situation where the usual substitute, namely opaque
declarations of structures, doesn't work.
Also, the correct location of namespace_enum isn't clear to me; too
bad C doesn't support opaque declarations of enums. And the exact
placements of partial_ stuff isn't clear to me: it seems plausible to
me that 'struct partial_symbol' should either be in the same include
file as 'struct symbol' or in the same file as 'struct
partial_symtab', but which?
David Carlton
carlton@math.stanford.edu