From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14404 invoked by alias); 9 May 2014 21:08:29 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 14384 invoked by uid 89); 9 May 2014 21:08:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 May 2014 21:08:25 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s49L8LMj012867 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 9 May 2014 17:08:22 -0400 Received: from barimba (ovpn-113-185.phx2.redhat.com [10.3.113.185]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s49L8KwJ030196 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Fri, 9 May 2014 17:08:21 -0400 From: Tom Tromey To: "Agovic\, Sanimir" Cc: "gdb-patches\@sourceware.org" Subject: Re: [PATCH 2/2] handle VLA in a struct or union References: <1399574816-12845-1-git-send-email-tromey@redhat.com> <1399574816-12845-3-git-send-email-tromey@redhat.com> <0377C58828D86C4588AEEC42FC3B85A71D86BED8@IRSMSX105.ger.corp.intel.com> Date: Fri, 09 May 2014 21:08:00 -0000 In-Reply-To: <0377C58828D86C4588AEEC42FC3B85A71D86BED8@IRSMSX105.ger.corp.intel.com> (Sanimir Agovic's message of "Fri, 9 May 2014 08:05:29 +0000") Message-ID: <87y4yaslrv.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2014-05/txt/msg00120.txt.bz2 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