This is the mail archive of the gdb-patches@sources.redhat.com 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: [rfc] split up symtab.h


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


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