[dtrace-discuss] dtrace syscall:::return arg0 weidness on b56 ( x86)

Paul van der Zwan Paul.Vanderzwan at Sun.COM
Wed Jan 31 04:02:42 PST 2007


On 31-jan-2007, at 12:13, Michael Schuster wrote:

> Paul van der Zwan wrote:
>> On 31-jan-2007, at 11:41, Casper.Dik at Sun.COM wrote:
>>>
>>>>
>>>> At the moment I am attending course SA327 ( dtrace)
>>>> and I am doing the excercises on my macbook running  b56 on  
>>>> parallels.
>>>>
>>>> In one excercise we have to list failing system calls using
>>>> a predicate: /arg0 == -1/ and this never matches on my system.
>>>> When I change the test into / arg0 == 429496729 / it matches.
>>>> On a Acer Ferrari running S10u3 the test for -1 works.
>>>>
>>>> Any idea if this is a bug in b56 or what it might be otherwise ??
>>>
>>> Are both running 64 bit kernels or is this 32 vs 64 bit?
>>>
>> 32 bit, and I think I found the problem and answer in the mail  
>> archives..
>> You have to cat the arg0 on syscall:::return to int. On 64 bit it  
>> does not
>> matter on 32 bit it definitely does...
>> I'll have to file a bug on the training material as all their  
>> samples and
>> answers are missing the cast.
>
> I don't know ... I looked at random at the manpages for several  
> system calls, they all return a signed value. I think the dtrace  
> framework is intelligent enough to realise that, and type arg0  
> accordingly. On my b55 machine, running 32bit, /arg0 == -1/ works  
> quite OK, so I don't think it's a bug in the training material.
> I haven't got a 32bit machine running NV b56, so I cannot test the  
> behaviour there, but IMO if this has changed, it's not a bug in the  
> training material.


Here is an older mail thread I found which explains the issue.
If that thread is correct it looks like a bug in the training  
material to me :
http://www.opensolaris.org/jive/thread.jspa?messageID=47997&#47997

Regards
	Paul



More information about the dtrace-discuss mailing list