This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH V2 6/9] Support for DTrace USDT probes in x86_64 targets.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]