From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21582 invoked by alias); 6 May 2011 10:33:45 -0000 Received: (qmail 21573 invoked by uid 22791); 6 May 2011 10:33:45 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 May 2011 10:33:29 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LKR00M00RUAPW00@a-mtaout20.012.net.il> for gdb-patches@sourceware.org; Fri, 06 May 2011 13:32:27 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.234.175]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LKR00LQKRY208H0@a-mtaout20.012.net.il>; Fri, 06 May 2011 13:32:27 +0300 (IDT) Date: Fri, 06 May 2011 10:33:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH] Support for enabling/disabling tracepoints while a trace experiment is running In-reply-to: <4DC32F21.9090400@codesourcery.com> To: Kwok Cheung Yeung Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <8339ksm85f.fsf@gnu.org> References: <4DC2DDEF.10600@codesourcery.com> <83hb99m14x.fsf@gnu.org> <4DC32F21.9090400@codesourcery.com> 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: 2011-05/txt/msg00181.txt.bz2 > Date: Fri, 06 May 2011 00:13:37 +0100 > From: Kwok Cheung Yeung > CC: gdb-patches@sourceware.org > > On 05/05/2011 19:51, Eli Zaretskii wrote: > >> Date: Thu, 05 May 2011 18:27:11 +0100 > >> From: Kwok Cheung Yeung > >> > >> + If a trace experiment is started with no enabled > >> + tracepoints, then a warning will be printed but the experiment will > >> + proceed anyway. > > > > You mean, if the experiment started with no enabled tracepoints, and > > the user says "disable", right? Otherwise, why the warning? > > > > Originally, it was an error to try to start an experiment with no enabled > tracepoints because the resulting experiment would never do anything. However, > with the patch, tracepoints can be re-enabled after the experiment starts, so I > downgraded the error to a warning. I suppose we could do away with it > altogether, but then a user who inadvertently disabled all tracepoints might sit > and wonder why nothing seems to be happening. In that case, the emphasis in this entry should be shifted slightly. How about this variant: It is now possible to start a trace experiment with no enabled tracepoints; GDB will display a warning, but will allow the experiment to begin, assuming that tracepoints will be enabled as needed while the trace is running. Btw, what if the target does not support this new feature? Do we still disallow to start a trace experiment with no enabled tracepoints? I think we should. > Disable tracepoint @var{num}, or all tracepoints if no argument > @var{num} is given. A disabled tracepoint will have no effect during > -the next trace experiment, but it is not forgotten. You can re-enable > +a trace experiment, but it is not forgotten. You can re-enable > a disabled tracepoint using the @code{enable tracepoint} command. > +If the command is issued during a trace experiment and the debug target > +has support for disabling tracepoints during a trace experiment, then the > +change will be effective immediately. Otherwise, it will be applied to the > +next trace experiment. > > -Enable tracepoint @var{num}, or all tracepoints. The enabled > -tracepoints will become effective the next time a trace experiment is > -run. > +Enable tracepoint @var{num}, or all tracepoints. If this command is > +issued during a trace experiment and the debug target supports enabling > +tracepoints during a trace experiment, then the enabled tracepoints will > +become effective immediately. Otherwise, they will become effective the > +next time a trace experiment is run. Yes, this is fine. Thanks.