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: 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?

> +* 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.


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