This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH V2 6/9] Support for DTrace USDT probes in x86_64 targets.
- From: Pedro Alves <palves at redhat dot com>
- To: "Jose E. Marchesi" <jose dot marchesi at oracle dot com>, gdb-patches at sourceware dot org
- Date: Thu, 16 Oct 2014 23:17:20 +0100
- Subject: Re: [PATCH V2 6/9] Support for DTrace USDT probes in x86_64 targets.
- Authentication-results: sourceware.org; auth=none
- References: <1412961772-16249-1-git-send-email-jose dot marchesi at oracle dot com> <1412961772-16249-7-git-send-email-jose dot marchesi at oracle dot com>
I forgot:
On 10/10/2014 06:22 PM, Jose E. Marchesi wrote:
> 2014-10-10 Jose E. Marchesi <jose.marchesi@oracle.com>
>
> * amd64-linux-tdep.h: Prototypes for
> `amd64_dtrace_parse_probe_argument', `amd64_dtrace_enable_probe',
> `amd64_dtrace_disable_probe' and
> `gdbarch_dtrace_probe_is_enabled'.
Typo: gdbarch_dtrace_probe_is_enabled: gdbarch => amd64_dtrace.
Write it like this:
* amd64-linux-tdep.h (amd64_dtrace_parse_probe_argument)
(amd64_dtrace_enable_probe, amd64_dtrace_disable_probe)
(amd64_dtrace_probe_is_enabled): New declarations.
But, I don't see why these functions are extern, they're defined
and used in the same file. So make them static and don't touch
amd64-linux-tdep.h.
OTOH, does DTrace on Solaris use this exact same sequences?
If so, then better put these new functions somewhere
non-Linux-specific instead, like e.g., amd64-tdep.c.
> * amd64-linux-tdep.c (amd64_dtrace_parse_probe_argument): New function.
> (amd64_dtrace_probe_is_enabled): Likewise.
> (amd64_dtrace_enable_probe): Likewise.
> (amd64_dtrace_disable_probe): Likewise.
> (amd64_linux_init_abi): Register the
> `gdbarch_dtrace_probe_argument', `gdbarch_dtrace_enable_probe',
> `gdbarch_dtrace_disable_probe' and `gdbarch_dtrace_probe_is_enabled'.
Register the ... _hooks_?
Thanks,
Pedro Alves