From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23884 invoked by alias); 24 Apr 2008 14:08:39 -0000 Received: (qmail 23873 invoked by uid 22791); 24 Apr 2008 14:08:38 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 24 Apr 2008 14:08:19 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 80884983E4; Thu, 24 Apr 2008 14:08:16 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 3FC349835A; Thu, 24 Apr 2008 14:08:16 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1Jp27T-0002Rd-K3; Thu, 24 Apr 2008 10:08:15 -0400 Date: Thu, 24 Apr 2008 16:34:00 -0000 From: Daniel Jacobowitz To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: Kill 'args' interface for MI commands Message-ID: <20080424140815.GA8110@caradoc.them.org> Mail-Followup-To: Vladimir Prus , gdb-patches@sources.redhat.com References: <200804241729.55201.vladimir@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-12-11) 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: 2008-04/txt/msg00558.txt.bz2 On Thu, Apr 24, 2008 at 05:47:10PM +0400, Vladimir Prus wrote: > Vladimir Prus wrote: > > > > > Presently, each MI command is implemented with a function, but there are > > two different interfaces -- old uses "char *" to pass all parameters lumped > > together, while new one uses "char ** + int", like argc/argv. > > > > This patch kills the old interface completely. Checked in. > > I've attached a wrong patch, this is what I've actually checked in. Is this compatible? Above the bit of mi-parse.c you changed is this: /* For new argv commands, attempt to return the parsed argument list. */ if (parse->cmd->argv_func != NULL) { mi_parse_argv (chp, parse); If that fails, then an error is output. So anything not properly quoted as an MI command is invalid. Which would be nice, except that's not how things worked before. For example, a command which previously used args_func and had argv_func == NULL is -exec-run. It wasn't documented to take arguments, but it did. They were passed unmodified to the shell and now they're stripped of MI quoting. Another was -target-select, which folks pass all sorts of hairy strings to, and -target-download, which sometimes takes a filename - previously not MI quoted. But it gets passed to load which removes its own quotes. So now -target-download "my file.exe" is going to fail because the CLI will get "load my file.exe". -- Daniel Jacobowitz CodeSourcery