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: Tapset porting to 2.6.38


On 03/14/2011 05:40 PM, Turgis, Frederic wrote:
> Very interesting patch for us.
> We did not dig that much as we were convinced that we could only dereference
> pointers. Therefore, we thought we could not do something like
> @cast(sock, "inet_sock")->sk->__sk_common->skc_daddr because in C,
> it would be pointer->sk.__sk_common.skc_addr (so no pointer as soon as
you want __sk_common).

That has confused people before.  In systemtap script language, you
always just use '->'.

If you want to see the C source code that systemtap produces for
__ip_sock_daddr(), you can do the following:

# stap -vp3 -e 'probe begin { print(__ip_sock_daddr(0)) }'

> On top of that, we had bad experience in the past with derefencing V4L2 structures
> but we finally discovered issue was more related to the use of "enum".

Hmm, I'm not aware of any issues we have with enums.  Have you got an
example?

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)


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