From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22169 invoked by alias); 1 Jul 2013 01:55:04 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 22135 invoked by uid 89); 1 Jul 2013 01:54:57 -0000 X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO autolearn=ham version=3.3.1 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 01 Jul 2013 01:54:57 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C20441CA5C3; Sun, 30 Jun 2013 21:54:55 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5XNTUd6nFgf3; Sun, 30 Jun 2013 21:54:55 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 880461CA5B0; Sun, 30 Jun 2013 21:54:55 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id AC245C3844; Sun, 30 Jun 2013 18:54:53 -0700 (PDT) Date: Mon, 01 Jul 2013 01:55:00 -0000 From: Joel Brobecker To: Chris January Cc: gdb@sourceware.org Subject: Re: Variable Length Arrays (VLA) proposal Message-ID: <20130701015453.GB10319@adacore.com> References: <0377C58828D86C4588AEEC42FC3B85A7176288F9@IRSMSX105.ger.corp.intel.com> <1372434039.2950.12.camel@gumtree> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1372434039.2950.12.camel@gumtree> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-07/txt/msg00000.txt.bz2 > Just to add another possibility, we implemented VLA for Fortran by > wrapping read_var_value and then adding a call to f_fixup_value which > 'fixed up' the type of the variable (filled in the array bounds, etc.) > by modifying the original type. (It also auto-dereferences pointers). One of the questions that need to be asked is whether it's OK to modify the type in place like that. For Ada, we create new types with the bounds fixed-up. I think you might run into problems with cached values, such as the values accessible from the history (Eg: "print $2"). -- Joel