From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11097 invoked by alias); 2 Apr 2003 21:59:57 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 11076 invoked from network); 2 Apr 2003 21:59:57 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 2 Apr 2003 21:59:57 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id C6A912B23; Wed, 2 Apr 2003 16:59:55 -0500 (EST) Message-ID: <3E8B5D5B.5000700@redhat.com> Date: Wed, 02 Apr 2003 21:59:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bob Rossi Cc: gdb-patches@sources.redhat.com Subject: Re: Adding -file-list-exec-source-file command to GDB/MI References: <20030402194626.GD13251@white> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-04/txt/msg00047.txt.bz2 > This change essentially adds the command -file-list-exec-source-file to > the mi commands. > > * mi-cmd-file.c: Added file to implement mi file commands. > * mi-getopt.c: Added mi_valid_noargs to verify if a set of > parameters passed to an MI function has no arguments > * mi-getopt.h: Prototyped mi_valid_noargs > * mi-cmds.c: Added -file-list-exec-source-file command. > * mi-cmds.h: Added -file-list-exec-source-file to proto list. > * doc/gdb.texinfo: Document -file-list-exec-source-file. > * mi-file.exp: Added testcase to test -file-list-exec-source-file. Yes, ok. Just tweak the below GNU coding probs before committing. > +int > +mi_valid_noargs(const char *prefix, int argc, char **argv) mi_valid_noargs ( > +{ > + int optind = 0; > + char *optarg; > + static struct mi_opt opts[] = > + { > + 0 > + }; > + > + if ( mi_getopt(prefix, argc, argv, opts, &optind, &optarg) == -1 ) if (mi_getopt (prefix, ...., &optarg) == -1) > + return 1; > + else > + return 0; > +} Andrew