From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11233 invoked by alias); 21 Oct 2013 14:40:36 -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 11124 invoked by uid 89); 21 Oct 2013 14:40:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mga02.intel.com Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 21 Oct 2013 14:40:34 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 21 Oct 2013 07:40:32 -0700 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 21 Oct 2013 07:40:31 -0700 Received: from ulliclel001.iul.intel.com (ulliclel001.iul.intel.com [172.28.50.199]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id r9LEeTW0030703 for ; Mon, 21 Oct 2013 15:40:29 +0100 Received: from ulliclel001.iul.intel.com (localhost [127.0.0.1]) by ulliclel001.iul.intel.com (8.14.4/8.12.8/MailSET/client) with ESMTP id r9LEeSGQ021104 for ; Mon, 21 Oct 2013 16:40:29 +0200 Received: (from sagovic@localhost) by ulliclel001.iul.intel.com (8.14.4/8.12.8/MailSET/Submit) id r9LEeSWs021103 for gdb-patches@sourceware.org; Mon, 21 Oct 2013 16:40:28 +0200 From: Sanimir Agovic To: gdb-patches@sourceware.org Subject: C99 variable length array support Date: Mon, 21 Oct 2013 14:40:00 -0000 Message-Id: <1382366424-21010-1-git-send-email-sanimir.agovic@intel.com> X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00632.txt.bz2 Hello, this patch series add C99 variable length support to gdb. It allows the user to evaluate a vla like an ordinary static array e.g. print its elements instead of printing the pointer to the array. In addition the size of a vla can be retrieved with gdbs builtin sizeof operator. 1| void foo (size_t n) { 2| int ary[n]; 3| memset(ary, 0, sizeof(ary)); 4| } (gdb) print ary $1 = {0 } (gdb) print sizeof ary $2 = 42 -Sanimir & Keven