From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18841 invoked by alias); 9 Nov 2009 20:19:50 -0000 Received: (qmail 18833 invoked by uid 22791); 9 Nov 2009 20:19:49 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_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; Mon, 09 Nov 2009 20:19:43 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nA9KJerN023020 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 9 Nov 2009 15:19:41 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nA9KJecZ021097; Mon, 9 Nov 2009 15:19:40 -0500 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 nA9KJdfl024044; Mon, 9 Nov 2009 15:19:39 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 27F1C37815E; Mon, 9 Nov 2009 13:19:39 -0700 (MST) From: Tom Tromey To: Arjun Roy Cc: gdb@sourceware.org Subject: Re: Python Scripting Question References: <4AF63479.7010602@gmail.com> <4AF87557.8020701@stanford.edu> Reply-To: Tom Tromey Date: Mon, 09 Nov 2009 21:12:00 -0000 In-Reply-To: <4AF87557.8020701@stanford.edu> (Arjun Roy's message of "Mon, 09 Nov 2009 12:02:31 -0800") 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-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-11/txt/msg00102.txt.bz2 >>>>> "Arjun" == Arjun Roy writes: Arjun> It looks as though the two main things this would need would be to: Arjun> 1. Be able to access the output one gets from executing a GDB command. Arjun> Ideally one would get an object with various fields filled in based on Arjun> the type of command, but for my purposes even a string would do - as Arjun> long as the results can be accessed somehow. Yeah, this has been on our wish-list for a while. Basically we need to let python create two kinds of new ui-out objects: one that writes the output to a python string, and another that is mi-like and creates new python objects in response to output. I have a tiny bit of code working toward this direction, but I never finished it. Arjun> 2. Some python objects for representing the current execution Arjun> state of the program, where one could call methods for Arjun> determining what's going on. The SoC project addressed part of this. See the archer list archives for information. Arjun> How easy to hack in would this be? I don't think anything here is too difficult; it just requires someone to actually do it. Tom