From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2685 invoked by alias); 11 Jul 2008 13:46:11 -0000 Received: (qmail 2674 invoked by uid 22791); 11 Jul 2008 13:46:10 -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:45:51 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id A196F98415; Fri, 11 Jul 2008 13:45:49 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 6883098376; Fri, 11 Jul 2008 13:45:49 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KHIwW-00019L-J9; Fri, 11 Jul 2008 09:45:48 -0400 Date: Fri, 11 Jul 2008 13:46:00 -0000 From: Daniel Jacobowitz To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [MI non-stop 07/11, RFA] Allow all CLI command even if target is executing. Message-ID: <20080711134548.GD2651@caradoc.them.org> Mail-Followup-To: Vladimir Prus , gdb-patches@sources.redhat.com References: <200806282055.45829.vladimir@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200806282055.45829.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/msg00198.txt.bz2 On Sat, Jun 28, 2008 at 08:55:45PM +0400, Vladimir Prus wrote: > There are several strategies to accepting commands when inferior_ptid is > running. One approach is to plain disallow all commands when inferior_ptid > is running. This seems too strict. Clearly, setting ignore count of > a breakpoint does not require any access to the target at all. Another > approach is to document which commands may be allowed when the target is > running. The problem is that each individual command may work or not work > depending on the properties of the target. > > So, it's better to allow all commands up-front, and emit an error if we > try an operation that the current target does not allow. This way, we'll > never mistakenly prevent an operation that the target actually can perform. > In case of error, the frontend may show the error to the user, and user > change either change his mind, or explicitly stop a thread, or ask the > frontend to implicitly interrupt the target, or ask gdb to do same. > > OK? > > - Volodya > > * gdb/top.c (execute_command_1): Don't check if the inferiour > is running. What does this do to the quality of error messages? Particularly for targets other than Linux, or targets with async but not non-stop. It's true that we'll have to get rid of this eventually, but can we do it without having to think about each command individually? "ignore" is an interesting example. If a breakpoint has been ignored twice and you lower the ignore count to one while the target is running do we need to stop? -- Daniel Jacobowitz CodeSourcery