aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorJose E. Marchesi <jose.marchesi@oracle.com>2015-02-17 15:51:07 +0100
committerJose E. Marchesi <jose.marchesi@oracle.com>2015-02-17 15:51:07 +0100
commit9aca2ff83e4299875343cb07add9c0ef7e5f3188 (patch)
treeac9e1fb6d0978f00013ebac53df17580229439f2 /gdb/doc
parent03e98035a2a5d928ceb36ddd7b43369fbf72a008 (diff)
downloadgdb-9aca2ff83e4299875343cb07add9c0ef7e5f3188.zip
gdb-9aca2ff83e4299875343cb07add9c0ef7e5f3188.tar.gz
gdb-9aca2ff83e4299875343cb07add9c0ef7e5f3188.tar.bz2
New commands `enable probe' and `disable probe'.
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: 2015-02-17 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: 2015-02-17 Jose E. Marchesi <jose.marchesi@oracle.com> * gdb.texinfo (Static Probe Points): Cover the `enable probe' and `disable probe' commands.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdb.texinfo29
2 files changed, 34 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 62726ff..090442d 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-17 Jose E. Marchesi <jose.marchesi@oracle.com>
+
+ * gdb.texinfo (Static Probe Points): Cover the `enable probe' and
+ `disable probe' commands.
+
2015-02-12 David Taylor <dtaylor@emc.com>
* gdb.texinfo (Tracepoint Packets): Document the builtin and name
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index c4f03b2..b11c1bb 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -5011,6 +5011,35 @@ given, all object files are considered.
List the available static probes, from all types.
@end table
+@cindex enabling and disabling probes
+Some probe points can be enabled and/or disabled. The effect of
+enabling or disabling a probe depends on the type of probe being
+handled. @code{SystemTap} probes cannot be disabled.
+
+You can enable (or disable) one or more probes using the following
+commands, with optional arguments:
+
+@table @code
+@kindex enable probes
+@item enable probes @r{[}@var{provider} @r{[}@var{name} @r{[}@var{objfile}@r{]}@r{]}@r{]}
+If given, @var{provider} is a regular expression used to match against
+provider names when selecting which probes to enable. If omitted,
+all probes from all providers are enabled.
+
+If given, @var{name} is a regular expression to match against probe
+names when selecting which probes to enable. If omitted, probe names
+are not considered when deciding whether to enable them.
+
+If given, @var{objfile} is a regular expression used to select which
+object files (executable or shared libraries) to examine. If not
+given, all object files are considered.
+
+@kindex disable probes
+@item disable probes @r{[}@var{provider} @r{[}@var{name} @r{[}@var{objfile}@r{]}@r{]}@r{]}
+See the @code{enable probes} command above for a description of the
+optional arguments accepted by this command.
+@end table
+
@vindex $_probe_arg@r{, convenience variable}
A probe may specify up to twelve arguments. These are available at the
point at which the probe is defined---that is, when the current PC is