diff options
author | Jose E. Marchesi <jose.marchesi@oracle.com> | 2015-02-17 15:54:44 +0100 |
---|---|---|
committer | Jose E. Marchesi <jose.marchesi@oracle.com> | 2015-02-17 15:54:44 +0100 |
commit | 8b367e1771078f3cfc8c0fa2d5c5d5e9656c8fb9 (patch) | |
tree | 608a09f943c243d6ec2a2dd0c2e3d9df352443cb /gdb/gdbarch.h | |
parent | 9aca2ff83e4299875343cb07add9c0ef7e5f3188 (diff) | |
download | gdb-8b367e1771078f3cfc8c0fa2d5c5d5e9656c8fb9.zip gdb-8b367e1771078f3cfc8c0fa2d5c5d5e9656c8fb9.tar.gz gdb-8b367e1771078f3cfc8c0fa2d5c5d5e9656c8fb9.tar.bz2 |
New gdbarch functions: dtrace_parse_probe_argument, dtrace_probe_is_enabled, dtrace_enable_probe, dtrace_disable_probe.
This patch adds several gdbarch functions (along with the corresponding
predicates): `dtrace_parse_probe_argument', `dtrace_probe_is_enabled',
`dtrace_enable_probe' and `dtrace_disable_probe'. These functions will
be implemented by target-specific code, and called from the DTrace
probes implementation in order to calculate the value of probe
arguments, and manipulate is-enabled probes.
gdb/ChangeLog:
2015-02-17 Jose E. Marchesi <jose.marchesi@oracle.com>
* gdbarch.sh (dtrace_parse_probe_argument): New.
(dtrace_probe_is_enabled): Likewise.
(dtrace_enable_probe): Likewise.
(dtrace_disable_probe): Likewise.
* gdbarch.c: Regenerate.
* gdbarch.h: Regenerate.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index b67d9f6..0b4dc06 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -59,6 +59,7 @@ struct syscall; struct agent_expr; struct axs_value; struct stap_parse_info; +struct parser_state; struct ravenscar_arch_ops; struct elf_internal_linux_prpsinfo; struct mem_range; @@ -1247,6 +1248,41 @@ typedef int (gdbarch_stap_parse_special_token_ftype) (struct gdbarch *gdbarch, s extern int gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p); extern void set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, gdbarch_stap_parse_special_token_ftype *stap_parse_special_token); +/* DTrace related functions. + The expression to compute the NARTGth+1 argument to a DTrace USDT probe. + NARG must be >= 0. */ + +extern int gdbarch_dtrace_parse_probe_argument_p (struct gdbarch *gdbarch); + +typedef void (gdbarch_dtrace_parse_probe_argument_ftype) (struct gdbarch *gdbarch, struct parser_state *pstate, int narg); +extern void gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch, struct parser_state *pstate, int narg); +extern void set_gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch, gdbarch_dtrace_parse_probe_argument_ftype *dtrace_parse_probe_argument); + +/* True if the given ADDR does not contain the instruction sequence + corresponding to a disabled DTrace is-enabled probe. */ + +extern int gdbarch_dtrace_probe_is_enabled_p (struct gdbarch *gdbarch); + +typedef int (gdbarch_dtrace_probe_is_enabled_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr); +extern int gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch, CORE_ADDR addr); +extern void set_gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch, gdbarch_dtrace_probe_is_enabled_ftype *dtrace_probe_is_enabled); + +/* Enable a DTrace is-enabled probe at ADDR. */ + +extern int gdbarch_dtrace_enable_probe_p (struct gdbarch *gdbarch); + +typedef void (gdbarch_dtrace_enable_probe_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr); +extern void gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch, CORE_ADDR addr); +extern void set_gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch, gdbarch_dtrace_enable_probe_ftype *dtrace_enable_probe); + +/* Disable a DTrace is-enabled probe at ADDR. */ + +extern int gdbarch_dtrace_disable_probe_p (struct gdbarch *gdbarch); + +typedef void (gdbarch_dtrace_disable_probe_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr); +extern void gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch, CORE_ADDR addr); +extern void set_gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch, gdbarch_dtrace_disable_probe_ftype *dtrace_disable_probe); + /* True if the list of shared libraries is one and only for all processes, as opposed to a list of shared libraries per inferior. This usually means that all processes, although may or may not share |