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: [patch] Support 64-bit constants/enums on 32-bit host [Re: [PATCH] Allow 64-bit enum values]


On Tue, 17 Apr 2012 15:08:33 +0200, Jan Kratochvil wrote:
> It increases memory footprint but only on 32-bit hosts compiled without
> --enable-64-bit-bfd.
> sizeof (struct symbol):         44 -> 48
> sizeof (struct minimal_symbol): 40 -> 44
> 
> BTW why we have minimal_symbol and expand it later when it has "the same"
> size?  Just expanding the types would have the same effect.

I mixed up it here a bit as found by Tom, corrected:

It increases memory footprint but only on 32-bit hosts compiled without
--enable-64-bit-bfd.
sizeof (struct symbol):              44 -> 48
sizeof (struct partial_symbol):      24 -> 28
sizeof (struct minimal_symbol):      40 -> 44
all three share:
sizeof (struct general_symbol_info): 20 -> 24

The expansion is for partial_symbol -> symbol which may have some sense as it
saves almost 50% of space, both represent one DWARF symbol.
Sure minimal_symbol is never expanded it is ELF symbol.

(ignoring non-ELF/non-DWARF symbol files here)


Thanks,
Jan


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