From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5893 invoked by alias); 9 Nov 2009 22:36:00 -0000 Received: (qmail 5870 invoked by uid 22791); 9 Nov 2009 22:35:59 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-bw0-f219.google.com (HELO mail-bw0-f219.google.com) (209.85.218.219) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 09 Nov 2009 22:35:47 +0000 Received: by bwz19 with SMTP id 19so4346007bwz.8 for ; Mon, 09 Nov 2009 14:35:45 -0800 (PST) Received: by 10.204.32.146 with SMTP id c18mr5553285bkd.88.1257806145107; Mon, 09 Nov 2009 14:35:45 -0800 (PST) Received: from ?192.168.0.103? ([77.127.197.150]) by mx.google.com with ESMTPS id 16sm55404fxm.0.2009.11.09.14.35.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 09 Nov 2009 14:35:44 -0800 (PST) Message-ID: <4AF8993D.2050507@gmail.com> Date: Tue, 10 Nov 2009 08:06:00 -0000 From: Marcelo Taube User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: gdb@sourceware.org Subject: Some feedback about the python scripting feature References: <4AF898F3.50908@gmail.com> In-Reply-To: <4AF898F3.50908@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/msg00107.txt.bz2 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. * *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. * *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. * *interactive python: *the current python command reads lines using gdb normal input instead of the regular python prompt line, making some nice features of python unavailable like completions-proposals (pressing the tab-key to get the name of a function completed) or auto indentation. Maybe running the regular python prompt line can be an option. * *regular members instead of dictionaries: *it would be more natural to have members of structs be accessed in their natural way like in c. For example if we have some struct "struct Type { int a; int b;}" and we have a value object in python called 'value', Now to access 'value.a' we have to do 'value["a"]' but that feels preety unnatural, why not just support the syntax 'value.a' ? Thank you so much for your excelent work and for the time you spent reading this lines Marcelo