Accessing structure fields

Frank Ch. Eigler fche@redhat.com
Wed Sep 26 22:55:00 GMT 2007


Mike Mason <mmlnx@us.ibm.com> writes:

> I'm trying to understand why some recent changes in nfs_proc.stp were necessary.  There are numerous changes like the following:
>
> -        count = $rdata->args.count
> -        offset = $rdata->args.offset
> +        count = $rdata->args->count
> +        offset = $rdata->args->offset

These are correct.

> Is '.' supported when accessing structure fields?

No.  Only the "->" operator is used to traverse inclusion/pointer type
links.  It automagically does the right thing, though looks a bit
funny.  One reason for this is the "."  string concatenation operator.

- FChE



More information about the Systemtap mailing list