From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31981 invoked by alias); 15 Aug 2008 17:02:38 -0000 Received: (qmail 31967 invoked by uid 22791); 15 Aug 2008 17:02:34 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 15 Aug 2008 17:02:00 +0000 Received: (qmail 20751 invoked from network); 15 Aug 2008 17:01:58 -0000 Received: from unknown (HELO localhost) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 15 Aug 2008 17:01:58 -0000 From: Vladimir Prus To: Eli Zaretskii Subject: Re: [RFA] Make sure target supports non-stop. Date: Fri, 15 Aug 2008 17:02:00 -0000 User-Agent: KMail/1.9.9 Cc: gdb-patches@sources.redhat.com References: <200808151850.47110.vladimir@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808152101.51407.vladimir@codesourcery.com> 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-08/txt/msg00422.txt.bz2 On Friday 15 August 2008 20:13:20 Eli Zaretskii wrote: > > From: Vladimir Prus > > Date: Fri, 15 Aug 2008 18:50:47 +0400 > > > > + if (non_stop && !target_supports_non_stop ()) > > + error (_("Cannot attach to this target in non-stop mode")); > > Won't it be more elegant to define a method enter_non_stop_mode for > each target, and have the target complain if it cannot? I'm not sure it will be better. Non-stop mode is not purely a property of target, encapsulated inside it. Rather, it's global property, which must be supported by target, so enabling it in core, after making sure that target is fine with that, seems reasonable. In other words, 'enter_non_stop_mode' target method cannot do much except for emitting an error if non stop is not supported, therefore a method which just reports support for non-stop seems exactly right choice. - Volodya