This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Support 64-bit constants/enums on 32-bit host [Re: [PATCH] Allow 64-bit enum values]
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, gdb-patches at sourceware dot org
- Date: Tue, 17 Apr 2012 16:32:19 +0200
- Subject: Re: [patch] Support 64-bit constants/enums on 32-bit host [Re: [PATCH] Allow 64-bit enum values]
- References: <20120220132724.GB4753@spoyarek.pnq.redhat.com> <87d397syts.fsf@fleche.redhat.com> <20120229135148.GA32128@spoyarek.pnq.redhat.com> <20120301224428.GA30631@host2.jankratochvil.net> <20120305063542.GA30196@spoyarek.pnq.redhat.com> <20120305080512.GA12311@host2.jankratochvil.net> <20120321100630.GA14496@spoyarek.pnq.redhat.com> <20120417130833.GB15356@host2.jankratochvil.net>
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