This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] handle VLA in a struct or union
- From: Tom Tromey <tromey at redhat dot com>
- To: "Agovic\, Sanimir" <sanimir dot agovic at intel dot com>
- Cc: "gdb-patches\ at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 09 May 2014 15:08:20 -0600
- Subject: Re: [PATCH 2/2] handle VLA in a struct or union
- Authentication-results: sourceware.org; auth=none
- References: <1399574816-12845-1-git-send-email-tromey at redhat dot com> <1399574816-12845-3-git-send-email-tromey at redhat dot com> <0377C58828D86C4588AEEC42FC3B85A71D86BED8 at IRSMSX105 dot ger dot corp dot intel dot com>
Sanimir> As Joel has moved the heavy work out of the cases into separate
Sanimir> function how about doing the same for arrays and unions
Sanimir> (resolve_dynamic_compound)?
Done on my branch.
Sanimir> How about adding a gdb_assert to ensure NFIELDS is > 0. I know
Sanimir> this cannot happen in this particular case but in others it
Sanimir> might and one may assume that a struct has at least a member
Sanimir> which is not the case.
Also done.
Thanks for your review.
Sanimir> As you have pointed out the limitation of vla within arrays,
Sanimir> this might as well serve as a test case that we deal with it.
I didn't understand this one, sorry...
FWIW I filed a GCC bug about the issues with VLAs in the middle of a
struct. I would not, however, expect a quick resolution to this issue,
considering the obscurity of the extension.
Tom