This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Support for enabling/disabling tracepoints while a trace experiment is running


> Date: Fri, 06 May 2011 00:13:37 +0100
> From: Kwok Cheung Yeung <kcy@codesourcery.com>
> 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 <kcy@codesourcery.com>
> >>
> >> +                     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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]