This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH doc/langref.tex] Add pointer typecasting information
On 09/02/2009 02:54 PM, Robb Romans wrote:
> +The following statement retrieves the parent PID from a kernel
> +task\_struct:
> +\begin{vindent}
> +\begin{verbatim}
> +@cast(pointer, "task_struct", "kernel")->parent->pid
> +\end{verbatim}
> +\end{vindent}
What most people call PID and TID are respectively ->tgid and ->pid in
the task_struct, so this should probably be parent->tgid.
> +In guru mode, the translator allows scripts to assign new values to
> +members of typecasted pointers. Typecasting is also useful in the case
> +of \texttt{void*} members whose type might be determinable at run
> +time.
The two sentences of this paragraph are separate concepts, so this feels
a little scatter-brained. They're separate paragraphs in the manpage,
and in your first draft -- are you just merging singleton paragraphs?
Perhaps this needs to be reorganized a bit.
Thanks,
Josh