From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3437 invoked by alias); 23 Aug 2012 17:55:43 -0000 Received: (qmail 3404 invoked by uid 22791); 23 Aug 2012 17:55:41 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 23 Aug 2012 17:55:24 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7NHtM3P027581 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 23 Aug 2012 13:55:22 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7NHtLkq008034; Thu, 23 Aug 2012 13:55:22 -0400 Message-ID: <50366E88.8080202@redhat.com> Date: Thu, 23 Aug 2012 17:55:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: Khoo Yit Phang CC: gdb-patches@sourceware.org Subject: Re: Document how to exit "python-interactive" References: <50366654.704@redhat.com> <68AC2D73-E272-43CA-AFA4-910B58CE0B4B@cs.umd.edu> In-Reply-To: <68AC2D73-E272-43CA-AFA4-910B58CE0B4B@cs.umd.edu> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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-08/txt/msg00685.txt.bz2 On 08/23/2012 06:38 PM, Khoo Yit Phang wrote: > Hi, > > On Aug 23, 2012, at 1:20 PM, Pedro Alves wrote: > >> On 08/23/2012 05:29 PM, Khoo Yit Phang wrote: >>> Hi, >>> >>> I'd like to update the documentation to explain how to return from "python-interactive" to GDB. >> >> Is it possible to add a convenience python function to the gdb module to exits python-interactive? > > Yes, I can redefine "exit" and "quit" interpreter built-ins to return to GDB, rather than exiting GDB (the latter is still possible via "sys.exit"). How does that sound? Sounds great to me. -- Pedro Alves