From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6359 invoked by alias); 5 May 2011 18:52:00 -0000 Received: (qmail 6351 invoked by uid 22791); 5 May 2011 18:52:00 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 May 2011 18:51:45 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LKQ00C00KAXR500@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Thu, 05 May 2011 21:51:43 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.234.175]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LKQ00C1VKE4R210@a-mtaout22.012.net.il>; Thu, 05 May 2011 21:51:43 +0300 (IDT) Date: Thu, 05 May 2011 18:52:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH] Support for enabling/disabling tracepoints while a trace experiment is running In-reply-to: <4DC2DDEF.10600@codesourcery.com> To: Kwok Cheung Yeung Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83hb99m14x.fsf@gnu.org> References: <4DC2DDEF.10600@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/msg00155.txt.bz2 > 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? > +* New remote packets > + > +QTEnable > + > + Dynamically enable a tracepoint in a started trace experiment. > + > +QTDisable > + > + Dynamically disable a tracepoint in a started trace experiment. Can't the existing packets do the job? > 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 disabled tracepoint using the @code{enable tracepoint} command. > +@var{num} is given. The change is effective immediately. Err... that's inaccurate, isn't it? The code patch clearly shows that sometimes it won't work: > + sprintf_vma (addr_buf, location->address); > + sprintf (rs->buf, "QTEnable:%x:%s", location->owner->number, addr_buf); > + putpkt (rs->buf); > + remote_get_noisy_reply (&rs->buf, &rs->buf_size); > + if (*rs->buf == '\0') > + error (_("Target does not support enabling tracepoints while a trace run is ongoing.")); > + if (strcmp (rs->buf, "OK") != 0) > + error (_("Error on target while enabling tracepoint.")); > Enable tracepoint @var{num}, or all tracepoints. The enabled > -tracepoints will become effective the next time a trace experiment is > -run. > +tracepoints will become effective immediately. Same here. OK with these issues taken care of. Thanks.