From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18334 invoked by alias); 1 Dec 2009 19:26:57 -0000 Received: (qmail 18325 invoked by uid 22791); 1 Dec 2009 19:26:56 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Dec 2009 19:26:48 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nB1JQiIt019105 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 1 Dec 2009 14:26:44 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nB1JQhs1031868; Tue, 1 Dec 2009 14:26:44 -0500 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id nB1JQgGY025629; Tue, 1 Dec 2009 14:26:43 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 7C979378190; Tue, 1 Dec 2009 12:26:42 -0700 (MST) From: Tom Tromey To: "Anmol P. Paralkar" Cc: ranjith kumar , gdb@sourceware.org Subject: Re: size of non local variables References: <31cff80d0911301216j36328837k673a2e1936f00eb1@mail.gmail.com> <31cff80d0911301246p6471c1a5ua95608d22b81a22a@mail.gmail.com> Reply-To: tromey@redhat.com Date: Tue, 01 Dec 2009 19:26:00 -0000 In-Reply-To: (Anmol P. Paralkar's message of "Mon, 30 Nov 2009 18:16:49 -0600 (CST)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 X-SW-Source: 2009-12/txt/msg00008.txt.bz2 >>>>> "Anmol" == Anmol P Paralkar writes: Anmol> On the other hand, GDB Guru's, is there a way one could get a Anmol> list of a program's symbols into a list and map over that list, Anmol> a function that takes a symbol as an argument and returns an Anmol> integer representing it's size? etc... Anmol> I tried looking at the Python support documentation to see if Anmol> this could be done easily, but could not really tell (I've never Anmol> used GDB's Python support nor Python). I don't believe the Python symbol table code has been merged yet. And even on the branch in archer I'm not sure whether this can be done. Anmol> Is there a mini-tutorial somewhere that has an example of Anmol> getting started with using GDB's Python support? I tried trying Anmol> out the Greet snippet here: Anmol> http://sourceware.org/gdb/current/onlinedocs/gdb/Functions-In-Python.html#Functions-In-Python Anmol> but I'm not sure what I'm doing wrong. If that didn't work, could you be more specific? How did it fail, etc? I wrote a series of blog entries about the python work a while back. This may be the closest thing to a tutorial; however, some details of the API have changed since then, so you would have to read it in conjunction with the gdb manual: http://tromey.com/blog/?p=494 Tom