aboutsummaryrefslogtreecommitdiff
path: root/gdb/probe.h
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/probe.h
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/probe.h')
-rw-r--r--gdb/probe.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/probe.h b/gdb/probe.h
index 5df1976..e8d5dfe 100644
--- a/gdb/probe.h
+++ b/gdb/probe.h
@@ -138,6 +138,18 @@ struct probe_ops
void (*gen_info_probes_table_values) (struct probe *probe,
VEC (const_char_ptr) **values);
+
+ /* Enable a probe. The semantics of "enabling" a probe depend on
+ the specific backend and the field can be NULL in case enabling
+ probes is not supported. */
+
+ void (*enable_probe) (struct probe *probe);
+
+ /* Disable a probe. The semantics of "disabling" a probe depend
+ on the specific backend and the field can be NULL in case
+ disabling probes is not supported. */
+
+ void (*disable_probe) (struct probe *probe);
};
/* Definition of a vector of probe_ops. */