This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: fix latent bug in syms_from_objfile_1
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 21 Mar 2013 16:36:17 +0100
- Subject: Re: RFC: fix latent bug in syms_from_objfile_1
- References: <87ip4m7wxy dot fsf at fleche dot redhat dot com> <20130320184034 dot GA708 at host2 dot jankratochvil dot net> <87ip4l7swd dot fsf at fleche dot redhat dot com> <20130321141954 dot GA10644 at host2 dot jankratochvil dot net> <871ub84vo7 dot fsf at fleche dot redhat dot com>
On Thu, 21 Mar 2013 16:30:48 +0100, Tom Tromey wrote:
> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> Jan> I always thought such sizeof calculation works even with # of
> Jan> elements == 0. Why not?
>
> It seemed weird to me since it would allocate an object smaller than a
> struct section_addr_info.
>
> I don't mind dropping that line though.
I find it allocates excessive element otherwise.
There should be "struct other_sections other[0];", that [1] is there only as
a workaround for non-GCC compilers.
Anyway not worth of more talk.
Thanks,
Jan