From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3207 invoked by alias); 22 May 2010 19:00:51 -0000 Received: (qmail 19379 invoked by uid 22791); 22 May 2010 18:40:58 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,TW_RG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 22 May 2010 18:40:53 +0000 Received: from hpaq12.eem.corp.google.com (hpaq12.eem.corp.google.com [172.25.149.12]) by smtp-out.google.com with ESMTP id o4MIeoaE024732 for ; Sat, 22 May 2010 11:40:51 -0700 Received: from pvc7 (pvc7.prod.google.com [10.241.209.135]) by hpaq12.eem.corp.google.com with ESMTP id o4MIemPh022145 for ; Sat, 22 May 2010 11:40:49 -0700 Received: by pvc7 with SMTP id 7so1020112pvc.11 for ; Sat, 22 May 2010 11:40:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.248.4 with SMTP id v4mr2463022rvh.213.1274553647880; Sat, 22 May 2010 11:40:47 -0700 (PDT) Received: by 10.140.255.14 with HTTP; Sat, 22 May 2010 11:40:47 -0700 (PDT) In-Reply-To: References: <20100522165438.5D5A48439A@ruffy.mtv.corp.google.com> Date: Sat, 22 May 2010 21:19:00 -0000 Message-ID: Subject: Re: [RFA] new python features: gdb.GdbError, gdb.string_to_argv From: Doug Evans To: tromey@redhat.com Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true X-IsSubscribed: yes 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-05/txt/msg00530.txt.bz2 On Sat, May 22, 2010 at 10:57 AM, Tom Tromey wrote: > Doug> and I wanted a utility to translate the argument string into an argv. > > I think you can use the built-in shlex.split for this. Depends I guess. I remembered you saying we want to be able to write compatible replacements for gdb commands in python, and some gdb commands use libiberty's buildargv. Ergo I wanted a 100% identical version of buildargv that I know I can "just use" (e.g. without any needed extra, manual, error-prone setup), and not worry about any differences between the behavior. So, setting aside the implementation (i.e. maybe gdb.string_to_argv could be implemented with shlex, or anything else), I still think having it is reasonable. But whatever, it's not that important.