From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6086 invoked by alias); 12 Jan 2012 18:19:39 -0000 Received: (qmail 6077 invoked by uid 22791); 12 Jan 2012 18:19:38 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from router-304.cs.umd.edu (HELO bacon.cs.umd.edu) (128.8.127.145) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 12 Jan 2012 18:19:26 +0000 Received: from wireless-206-196-163-53.umd.edu (wireless-206-196-163-53.umd.edu [206.196.163.53]) (Authenticated sender: khooyp) by bacon.cs.umd.edu (Postfix) with ESMTPSA id AF0F3B40395; Thu, 12 Jan 2012 13:19:14 -0500 (EST) Subject: Re: Make the "python" command resemble the standard Python interpreter Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Khoo Yit Phang In-Reply-To: Date: Thu, 12 Jan 2012 18:21:00 -0000 Cc: Khoo Yit Phang , Paul_Koning@dell.com, gdb-patches@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: <751D4ADF-BB24-4E23-BCFB-DB1F2BB11CFF@cs.umd.edu> References: <09787EF419216C41A903FD14EE5506DD030F1EB39B@AUSX7MCPC103.AMER.DELL.COM> <09787EF419216C41A903FD14EE5506DD030F1EB45D@AUSX7MCPC103.AMER.DELL.COM> <09787EF419216C41A903FD14EE5506DD030F1EB49D@AUSX7MCPC103.AMER.DELL.COM> To: Doug Evans X-CSD-MailScanner-ID: AF0F3B40395.AA01E X-CSD-MailScanner: Found to be clean X-CSD-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-50, required 5, autolearn=not spam, ALL_TRUSTED -50.00) X-CSD-MailScanner-From: khooyp@cs.umd.edu X-CSD-MailScanner-Watermark: 1326997154.7779@tleIc602TRAqtqEZa0vgiw 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: 2012-01/txt/msg00421.txt.bz2 Hi, On Jan 12, 2012, at 1:13 PM, Doug Evans wrote: > On Jan 12, 2012 9:51 AM, "Doug Evans" wrote: > > > > On Thu, Jan 12, 2012 at 9:47 AM, wrote: > > >>... > > >>> - I may want a script that invokes python interactively. > > >>> - How do I write a gdb macro that invokes the python repl? > > >>> > > >>> Solve those problems, and provide a migration path away from the old > > >>> behaviour, and then you've got something. > > >> > > >>As a strawman, a new command, python-foo, could be provided [python-c= ode? python-script?] that had the "old" behaviour. > > > > > > Nice solution. > > > > btw, would we ever want to pass options to the python repl? > > If that might ever occur, then we don't want python with arguments to > > be the old behaviour. >=20 > Or preferably have a new command should the need arise (I like python-rep= l, but I realize repl may be too obscure :-) ). > OK, I think I'm OK with where this is going. Instead of making a new command, we can add an option to, say "python /i", = that forces the interpreter to start, so that you can define a GDB macro th= at starts a Python interpreter (when from_tty is false). That would retain = compatibility with the current behavior. Yit January 12, 2012