Arun Bharatam
2008-Dec-17 22:11 UTC
[dtrace-discuss] examining of DTRACE return arguments in case of pass_by_value
Hello, I am using PID provider and some of my programs have pass_by_value (in other words, when the function returns, I expect changes values to the arguments). I would like to examine those arguments via DTRACE. Can some one point me to the pages where I may be able to print not only the return value of the function but also the returned arguments, please? Thanks Aurn B. -- This message posted from opensolaris.org
James Carlson
2008-Dec-17 22:20 UTC
[dtrace-discuss] examining of DTRACE return arguments in case of pass_by_value
Arun Bharatam writes:> I am using PID provider and some of my programs have pass_by_value (in other words, when the function returns, I expect changes values to the arguments).Isn''t that the definition of "pass by reference" ... ?> I would like to examine those arguments via DTRACE. > > Can some one point me to the pages where I may be able to print not only the return value of the function but also the returned arguments, please?Use an :entry clause to save off the original argument pointers in a self-> variable, then do a copyin using that in your :return clause. -- James Carlson, Solaris Networking <james.d.carlson at sun.com> Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677