This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: suggestion for dictionary representation
- From: Jim Blandy <jimb at redhat dot com>
- To: david carlton <carlton at math dot stanford dot edu>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 24 Sep 2002 01:35:30 -0500
- Subject: Re: suggestion for dictionary representation
> 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.