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: FYI: use SYMBOL_SYMTAB accessor


>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:

Joel> I am wondering if should consider making these structures opaque
Joel> Aside from the amount of work to do in order to achieve that,
Joel> do you see a negative is aiming for this goal for this particular
Joel> struct? (and all the symtab-related structs)?

Joel> [I've always wanted to make all complex and semi-complex structures
Joel> opaque :-)]

I'm somewhat on the fence about this, but on balance I think it is a
good idea to make types that are used in more than one file opaque.

However, in practice this hasn't always helped much.  The symbol
accessors are the worst, as we've discussed before, because many of them
are polymorphic without any purpose -- so they are both verbose and hard
to change.  In other cases in recent memory, I've wanted to change
direct accessors to separate assignments from uses; and this requires
global changes anyway, meaning that the macros didn't really help all
that much.

Tom


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