From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17974 invoked by alias); 13 Feb 2009 02:22:56 -0000 Received: (qmail 17963 invoked by uid 22791); 13 Feb 2009 02:22:55 -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; Fri, 13 Feb 2009 02:22:51 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 92AAF2A96D3; Thu, 12 Feb 2009 21:22:50 -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 QlUe4wvR+q97; Thu, 12 Feb 2009 21:22:50 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id C8F8B2A96D2; Thu, 12 Feb 2009 21:22:49 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 0EA21E7ACD; Thu, 12 Feb 2009 18:22:46 -0800 (PST) Date: Fri, 13 Feb 2009 08:42: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: <20090213022246.GA5401@adacore.com> References: <20090211060911.GB4225@adacore.com> <20090211203921.GC13021@adacore.com> <20090211220118.GE13021@adacore.com> <20090212062654.GG13021@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/msg00300.txt.bz2 > > Anyway, how about a compromise, then, and require the -p switch to > > source python scripts? The incompatibility is that > > > > (gdb) source -p foo > > > > would no longer work for file "-p foo". I think that's an acceptable > > "incompatibilty". Would you agree? > > This is a misunderstanding: I didn't mind the -p switch, I mind the > fact that it throws an error if Python is not compiled in. Eliminate > the error, and you have me on board. Cool! So, just to make sure I understand what you're saying, you would agree to the following change: Add a -p switch to the "source" command that signifies that we're sourcing a python script instead of a GDB script. We drop the part where we're using the filename extension to guess the file language, thus preserving the current behavior. Finally, what should we do if trying to source a python script with a debugger that does not have python linked in? Treat the -p switch as part of the script filename? (I would find this really odd) -- Joel