Re: suggestion for dictionary representation

Jim Blandy
2002-09-24T06:50:33Z

> Also, for what it's worth, I'm still not ready to completely give up
> on representing members of classes via a dictionary; that would
> provide another place where a linear dictionary environment could be
> useful.

I agree, but it's worth noting that `struct symbol' is 52 bytes long
on a Pentium, whereas `struct field' and `struct fn_field' are 16
bytes long.

Not that that necessarily matters. We know GDB does have memory
consumption problems, but I have never seen those problems really
analyzed. All the memory could be in physnames, for all we know. But
I'd want to have some sense of the impact before I made the change.
(Perhaps a heavy C++ user could stick a `char foo[52 - 16]' at the end
of `struct field' and `struct fn_field', and tell us how that goes.)

An intermediate step would be to simply add a `struct dictionary *' to
`struct cplus_struct_type'. We could use that right off the bat for
nested classes, typedefs, and enums. We could then migrate other
stuff over there incrementally.