From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15947 invoked by alias); 26 Jul 2008 18:45:08 -0000 Received: (qmail 15795 invoked by uid 22791); 26 Jul 2008 18:45:06 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 26 Jul 2008 18:44:41 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m6QIiZFT023352; Sat, 26 Jul 2008 14:44:35 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m6QIiZgI005200; Sat, 26 Jul 2008 14:44:35 -0400 Received: from opsy.redhat.com (vpn-10-41.bos.redhat.com [10.16.10.41]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m6QIiYn5020183; Sat, 26 Jul 2008 14:44:35 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 1297137824B; Sat, 26 Jul 2008 12:44:34 -0600 (MDT) To: Eli Zaretskii Cc: bauerman@br.ibm.com, gdb-patches@sourceware.org Subject: Re: [RFA][patch 1/9] Yet another respin of the patch with initial Python support References: <20080615181833.uxmo25mg0kko40kw@imap.linux.ibm.com> <1216107418.14956.27.camel@localhost.localdomain> <1216245620.12209.18.camel@localhost.localdomain> <20080718195010.GA14356@caradoc.them.org> <1216653969.31797.6.camel@localhost.localdomain> <20080726134252.GA6077@caradoc.them.org> <20080726144138.GA9711@caradoc.them.org> From: Tom Tromey Reply-To: Tom Tromey X-Attribution: Tom Date: Sat, 26 Jul 2008 18:45:00 -0000 In-Reply-To: (Eli Zaretskii's message of "Sat\, 26 Jul 2008 21\:29\:00 +0300") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 X-SW-Source: 2008-07/txt/msg00494.txt.bz2 >>>>> "Eli" == Eli Zaretskii writes: >> The "define" command creates new user-defined commands, which are >> sequences of gdb commands. >> >> The python command accesses the python interpreter. It is not really >> useful unless you already know python and want to use gdb's python >> api. So, it has a much narrower audience. Eli> But the goal is the same: create user-defined commands, isn't it? Or Eli> is there something else? There's a distinction to be aware of here ... what we have and what is planned are not identical. So, for instance, with the current patch under consideration, you really cannot do much at all with python. Future (existing ones in this series) patches add a lot of different features. Adding new commands is one of them. However, there is a lot more. For instance, you will be able to write new "gdb-side" functions in Python; this is related to exprsseion evaluation, not new commands. And, you will be able to script gdb in any number of ways. Some of the immediate things will not be visible as user commands. For example, pretty-printing will not be exposed that way. It will be part of the "print" command (or just automatic in the MI case). However, library authors and the like will be able to write new pretty-printers; for this they will need to read gdb's python api documentation. Long term I want to make it possible to fully script gdb. In particular I want to be able to start a python script with "#!/usr/bin/gdb" and have it completely control execution. Tom