From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17685 invoked by alias); 4 Jul 2013 16:55:59 -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 17675 invoked by uid 89); 4 Jul 2013 16:55:59 -0000 X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.1 Received: from mail.allinea.com (HELO mail.allinea.com) (94.125.131.200) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 04 Jul 2013 16:55:54 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.allinea.com (Postfix) with ESMTP id 300FB4083E; Thu, 4 Jul 2013 17:55:52 +0100 (BST) Received: from mail.allinea.com ([127.0.0.1]) by localhost (mail.allinea.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uJtiy+SxRpZh; Thu, 4 Jul 2013 17:55:51 +0100 (BST) Received: from [192.168.0.7] (cpc16-sotn11-2-0-cust109.15-1.cable.virginmedia.com [82.10.182.110]) (Authenticated sender: cjanuary) by mail.allinea.com (Postfix) with ESMTPSA id 6DE0B4073B; Thu, 4 Jul 2013 17:55:51 +0100 (BST) Message-ID: <1372956951.2796.48.camel@gumtree> Subject: RE: Variable Length Arrays (VLA) proposal From: Chris January To: "Agovic, Sanimir" Cc: "gdb@sourceware.org" , "Boell, Keven" , "Weinmann, Christoph T" Date: Thu, 04 Jul 2013 16:55:00 -0000 In-Reply-To: <0377C58828D86C4588AEEC42FC3B85A71762A9D7@IRSMSX105.ger.corp.intel.com> References: <0377C58828D86C4588AEEC42FC3B85A7176288F9@IRSMSX105.ger.corp.intel.com> <1372434039.2950.12.camel@gumtree> <0377C58828D86C4588AEEC42FC3B85A71762A7F2@IRSMSX105.ger.corp.intel.com> <1372929205.2796.18.camel@gumtree> <0377C58828D86C4588AEEC42FC3B85A71762A9D7@IRSMSX105.ger.corp.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 X-SW-Source: 2013-07/txt/msg00023.txt.bz2 On Thu, 2013-07-04 at 11:49 +0000, Agovic, Sanimir wrote: > Afaik gdb does a combination of: > > const char * exp = [...] > struct expression *expr = parse_expression (exp); > struct value *val = evaluate_type (expr); > [...] > > for whatis/ptype therefore we should be fine as we have a value in place. 1. The value is not passed through to f_print_type. 2. evaluate_type evaluates expr with no side effects and no memory reads - but for VLA the type depends on the actual value so you do not to evaluate with side effects. Chris