This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [2/3] RFC - reimplement common block support
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 11 Sep 2012 14:39:52 -0600
- Subject: Re: [2/3] RFC - reimplement common block support
- References: <87a9xofbor.fsf@fleche.redhat.com> <20120826081043.GA29056@host2.jankratochvil.net>
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> A nitpick but why not to just use common_block->n_entries instead of count.
[...]
Jan> And then to just do
Jan> common_block-> contents[common_block->n_entries]++ = sym;
[...]
Jan> With the pending "bitpos expansion patches" patches I would just
Jan> find easier in these cases in general to put here 'size_t' and no
Jan> longer think how much possible is it to overflow 2GB (it will get
Jan> signed somewhere) or not. It would sure expect other variables
Jan> iterating it to also use size_t.
Jan> OTOH I agree it is very unreal to overflow this one so OK with it.
[...]
Jan> Otherwise here should be a comment it may be NULL. With proposed "count"
Jan> change here could even be a comment it must not be NULL.
[...]
Jan> Here is missing:
Jan> # It requires fortran.
Jan> if {[skip_fortran_tests]} {
Jan> return 0
Jan> }
I made all these changes. I'll send new patches sometime soon.
Tom