From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27410 invoked by alias); 11 Jul 2008 13:34:56 -0000 Received: (qmail 27402 invoked by uid 22791); 11 Jul 2008 13:34:56 -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; Fri, 11 Jul 2008 13:34:36 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 3163E98415; Fri, 11 Jul 2008 13:34:35 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 0095198376; Fri, 11 Jul 2008 13:34:34 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KHIle-0000y1-AG; Fri, 11 Jul 2008 09:34:34 -0400 Date: Fri, 11 Jul 2008 13:34:00 -0000 From: Daniel Jacobowitz To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [MI non-stop 05/11, RFA] -exec-continue/-exec-interrupt --all Message-ID: <20080711133434.GA2651@caradoc.them.org> Mail-Followup-To: Vladimir Prus , gdb-patches@sources.redhat.com References: <200806282045.39438.vladimir@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200806282045.39438.vladimir@codesourcery.com> User-Agent: Mutt/1.5.17 (2008-05-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-07/txt/msg00193.txt.bz2 On Sat, Jun 28, 2008 at 08:45:39PM +0400, Vladimir Prus wrote: > + if (non_stop && all_threads) > + /* Don't error out current thread is running, because there may > + be other stopped threads. */ > + iterate_over_threads (proceed_thread_callback, NULL); "if the current thread"; also extra indentation here. > +void > +interrupt_target_1 (int all_threads) > +{ Tom pointed out the indentation problem here. > @@ -177,8 +177,12 @@ mi_cmd_exec_return (char *command, char **argv, int argc) > void > mi_cmd_exec_continue (char *command, char **argv, int argc) > { > - /* FIXME: Should call a libgdb function, not a cli wrapper. */ > - return mi_execute_async_cli_command ("continue", argv, argc); > + if (argc == 0) > + continue_1 (0); > + else if (argc == 1 && strcmp (argv[0], "--all") == 0) > + continue_1 (1); > + else > + error ("Usage: -exec-continue [--all]"); > } > > /* Interrupt the execution of the target. Note how we must play around I suggest you use mi_getopt instead, for consistency. -- Daniel Jacobowitz CodeSourcery