This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH V2 3/9] New commands `enable probe' and `disable probe'.
- From: Doug Evans <dje at google dot com>
- To: "Jose E. Marchesi" <jose dot marchesi at oracle dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 10 Oct 2014 15:03:29 -0700
- Subject: Re: [PATCH V2 3/9] New commands `enable probe' and `disable probe'.
- Authentication-results: sourceware.org; auth=none
- References: <1412961772-16249-1-git-send-email-jose dot marchesi at oracle dot com> <1412961772-16249-4-git-send-email-jose dot marchesi at oracle dot com>
Jose E. Marchesi writes:
> This patch adds the above-mentioned commands to the generic probe
> abstraction implemented in probe.[ch]. The effects associated to
> enabling or disabling a probe depend on the type of probe being
> handled, and is triggered by invoking two back-end hooks in
> `probe_ops'.
>
> In case some particular probe type does not support the notion of
> enabling and/or disabling, the corresponding fields on `probe_ops' can
> be initialized to NULL. This is the case of SystemTap probes.
>
> gdb/ChangeLog:
>
> 2014-10-10 Jose E. Marchesi <jose.marchesi@oracle.com>
>
> * stap-probe.c (stap_probe_ops): Add NULLs in the static
> stap_probe_ops for `enable_probe' and `disable_probe'.
> * probe.c (enable_probes_command): New function.
> (disable_probes_command): Likewise.
> (_initialize_probe): Define the cli commands `enable probe' and
> `disable probe'.
> (parse_probe_linespec): New function.
> (info_probes_for_ops): Use parse_probe_linespec.
> * probe.h (probe_ops): New hooks `enable_probe' and
> `disable_probe'.
>
> gdb/doc/ChangeLog:
>
> 2014-10-10 Jose E. Marchesi <jose.marchesi@oracle.com>
>
> * gdb.texinfo (Static Probe Points): Cover the `enable probe' and
> `disable probe' commands.
Hi.
Would it be useful to have "info probes" show
the enable/disable state of each probe?
Or at least know which ones have been disabled.
I can imagine wanting to know this information if something
wasn't working the way I expected.