From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11307 invoked by alias); 26 Mar 2008 18:41:19 -0000 Received: (qmail 11298 invoked by uid 22791); 26 Mar 2008 18:41:19 -0000 X-Spam-Check-By: sourceware.org Received: from aussmtpmrkpc120.us.dell.com (HELO aussmtpmrkpc120.us.dell.com) (143.166.82.159) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 26 Mar 2008 18:40:58 +0000 X-IronPort-AV: E=Sophos;i="4.25,559,1199685600"; d="scan'208";a="337886097" Received: from unknown (HELO M31.equallogic.com) ([12.110.134.31]) by aussmtpmrkpc120.us.dell.com with SMTP; 26 Mar 2008 13:40:55 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18410.39001.610982.862010@gargle.gargle.HOWL> Date: Wed, 26 Mar 2008 20:04:00 -0000 From: Paul Koning To: tromey@redhat.com Cc: jimb@red-bean.com, bauerman@br.ibm.com, gdb@sourceware.org Subject: Re: repo to work on python scripting support References: <1205538908.6643.138.camel@localhost.localdomain> <1206369478.29533.15.camel@localhost.localdomain> <20080325114520.GA21688@caradoc.them.org> <8f2776cb0803251118o316d261erb340d67bb0580967@mail.gmail.com> <18409.18988.613477.542099@pkoning-laptop.equallogic.com> <18409.21257.48822.645806@pkoning-laptop.equallogic.com> <8f2776cb0803251441m169bfcddkb12bc8873bd4cf8f@mail.gmail.com> <18410.23162.503583.519896@gargle.gargle.HOWL> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid X-IsSubscribed: yes 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: 2008-03/txt/msg00248.txt.bz2 >>>>> "Tom" == Tom Tromey writes: Paul> The goal of supporting Python scripting should be to provide an Paul> environment that is familiar to Python programmers. That means Paul> passing arguments in the way Python normally does. Tom> I think we're misunderstanding each other somehow. This Tom> particular sub-discussion is just about how to parse arguments Tom> passed from the gdb CLI into Python. I interpreted it that way. My point is that I'd say "a call is a call" -- this case is no different from any other Python call. And that fits the Python model, where interactions with the interpreter (at the >>> prompt) look just like program code. In particular, there is no difference in the way call arguments are handled. Tom> The Python code people write and plug into gdb will just be Tom> plain old Python. Fetching data from gdb will look Pythonic. Tom> Longer term, I'd like to be able to fully control gdb from Tom> Python. Sounds good. On the earlier note: Daniel> print $(py "this is a python \"program\"") Tom> I was thinking some functions could ask for an uninterpreted Tom> string. Tom> print $(py do something in python) I like that. Quoting in strings would be a major hassle, especially if the Python code contains raw strings or block (triple quote) strings. Parentheses should work fine given that those have to match. The only difficulty is that you have to know at least some of Python's syntax to find the matching close paren. (Basically, the scanner would have to know about comments and about the various flavors of Python strings.) paul