From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12254 invoked by alias); 11 Feb 2009 22:01:30 -0000 Received: (qmail 12032 invoked by uid 22791); 11 Feb 2009 22:01:29 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 Feb 2009 22:01:23 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id B81D42A96D1; Wed, 11 Feb 2009 17:01:22 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 2KG++RaXAVTB; Wed, 11 Feb 2009 17:01:22 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 587812A96D0; Wed, 11 Feb 2009 17:01:22 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 6AC73E7ACD; Wed, 11 Feb 2009 14:01:18 -0800 (PST) Date: Wed, 11 Feb 2009 22:01:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: tromey@redhat.com, bauerman@br.ibm.com, drow@false.org, pedro@codesourcery.com, gdb-patches@sourceware.org Subject: Re: RFC: add ability to "source" Python code Message-ID: <20090211220118.GE13021@adacore.com> References: <200902100235.59897.pedro@codesourcery.com> <20090210034834.GA20077@caradoc.them.org> <1234267091.13871.4.camel@localhost.localdomain> <20090211060911.GB4225@adacore.com> <20090211203921.GC13021@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i 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: 2009-02/txt/msg00267.txt.bz2 OK, this is going to be my final message on the subject. This is not sufficiently important for me to spend more energy on this. > > Perhaps, but I believe that it makes the feature much much less useful > > that it would be. > > I think that's a heck of exaggeration. We are talking about adding a > single line. I could return the "heck of exaggeration" back by saying that we're only talking about the highly improbably GDB scripts whose name uses a standard Python extension. Perhaps we should do a poll on gdb asking if anyone has a GDB script that has such an extension? > > I'd like to be able to grab a Python script, any python script, and > > evaluate it in GDB. > > Doesn't that work with "python FOO" right now? No, you have to do (IIRC): (gdb) python execfile ("/my/python/script.py") > Also, would an arbitrary Python script necessarily do anything useful > in GDB? Some of them probably will, but not just any one, I think. Maybe not anything, but yes, some of them. I'm starting to use Python more and more and my collection of scripts is slowly building up. Some of them setup environments, etc. -- Joel