This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap 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: (PR11207) Macroprocessor discussion


Hi -

On Tue, Jul 03, 2012 at 12:17:03PM -0400, Serguei Makarov wrote:
> [...]
> Macro definitions are always local to a single file; it is
> impossible to e.g. define a macro in a tapset and then use it in a
> systemtap script that includes the tapset.

This is a problem.  One of the expected uses of this mechanism was to
let tapsets define macros for use by other scripts, such as for performing
kernel-flavoured offset_of(), container_of() type operations.


> [...] Because the result of evaluating conditionals depends on the
> target system being compiled for, while documentation is supposed to
> be largely platform-independent, conditionals cannot occur inside
> docstrings.

(This may deserve no mechanism beyond a warning.)


>     /** ... doc comments common to all ip probes ... */
>     %define make_ipprobes(probe_name, hook4_name, hook6_name) %(
>         grab_invocation_docs(probe_name, ipprotocol_name) // note that probe_name is not expanded
>         grab_definition_docs
>  [...]

This grab_* docstrings magic stuff hasn't started appealing to me yet, FWIW.


- FChE


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