From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10567 invoked by alias); 10 Jun 2010 21:06:30 -0000 Received: (qmail 10557 invoked by uid 22791); 10 Jun 2010 21:06:29 -0000 X-SWARE-Spam-Status: No, hits=-5.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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, 10 Jun 2010 21:06:24 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5AL6K4a017668 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 10 Jun 2010 17:06:20 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5AL6JsG019522; Thu, 10 Jun 2010 17:06:20 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o5AL6JK1007029; Thu, 10 Jun 2010 17:06:19 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 9B2993782DC; Thu, 10 Jun 2010 15:06:18 -0600 (MDT) From: Tom Tromey To: Doug Evans Cc: gdb-patches@sourceware.org Subject: Re: RFA: add to_string argument to gdb.execute References: Reply-To: Tom Tromey Date: Thu, 10 Jun 2010 21:06:00 -0000 In-Reply-To: (Doug Evans's message of "Thu, 10 Jun 2010 13:54:49 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.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: 2010-06/txt/msg00254.txt.bz2 >>>>> "Doug" == Doug Evans writes: Doug> This feels like a with-output-to-string kind-of-problem. Doug> i.e. the wrapping of collecting the output to a string belongs at a Doug> higher level. It seems reasonable to me to have both. I've never wanted more than a single command's worth of output fwiw. Doug> That way one can wrap anything and have all the gdb output collected Doug> without having to modify all the individual gdb.execute calls inside. Doug> Dunno if it's as easy to implement though. It is not extremely hard with the Python 'with' statement. I think it will be a lot more code though, on the order of a new class. I don't plan to work on that. If you are against this patch, please say so, and I will drop it. Tom