From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8293 invoked by alias); 10 Nov 2009 10:22:14 -0000 Received: (qmail 8284 invoked by uid 22791); 10 Nov 2009 10:22:13 -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, 10 Nov 2009 10:22:09 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nAAAM6dl020805 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 10 Nov 2009 05:22:07 -0500 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nAAAM546027490; Tue, 10 Nov 2009 05:22:06 -0500 Message-ID: <4AF93ECD.60807@redhat.com> Date: Tue, 10 Nov 2009 15:12:00 -0000 From: Phil Muldoon User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Lightning/1.0pre Thunderbird/3.0b4 MIME-Version: 1.0 To: Marcelo Taube CC: gdb@sourceware.org Subject: Re: Some feedback about the python scripting feature References: <4AF898F3.50908@gmail.com> <4AF8993D.2050507@gmail.com> In-Reply-To: <4AF8993D.2050507@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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-11/txt/msg00113.txt.bz2 On 11/09/2009 10:35 PM, Marcelo Taube wrote: > Dear gdb team, > > I have been using the python scripting feature of gdb7 > > The feature is great it let me debug my code much better and in a much > flexible way. > > There are some features missing which would improve it even more, though. > > I want to mention them in case noone did it before. Thanks. I'll comment on the two things I know about: > > * *calling functions*: From regular gdb command line the user can > allways simply do " p foo()" to call function and print the > result, it would be usefull to be able to call C functions (or the > debugged lenguage) from python and get the result as a Value > object in the same way a variable is accessed. There is a patch in the works: http://sourceware.org/ml/archer/2009-q3/msg00206.html But for right now you can use: foo = gdb.parse_and_eval("foo(bar)") > * *equality of types: *i think there are problems with the equality > of types in gdb. Look at the case that two type objects were > obtained and represent the same type, the expression > 'gdb.lookup_type("int") == gdb.lookup_type("int")' now returns > false but it should return true. There was an enhancement filed for this: http://sourceware.org/bugzilla/show_bug.cgi?id=10676 Regards Phil