FW: function return value

David Smith dsmith@redhat.com
Wed Mar 7 18:23:00 GMT 2007


John Liang wrote:
> FchE,
> 
> The function I am interested in returns a dentry pointer. 
> Does $return have to be an integral type? 

Although a pointer is just a special case of an integral type (on most 
arches anyway), the translator won't let you do "$return->d_count" to 
access the d_count field out of the dentry pointer.  I'm not 100% 
positive it is possible, but it wouldn't hurt to file a bugzilla against it.

For now, what you'll have to create a function that accesses the 
structure for you.  Look at the _struct_timeval_u() function in 
tapset/aux_syscall.stp for an example.

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



More information about the Systemtap mailing list