On x86 SyscallEventInfo.returnCode apparently does not sign-extend the return result of a 'close'. However, Yao says that sign extension does happen on PPC64. I think it would be preferable for this behavior to be platform independent. Also I think the sign extension approach is simpler for the end user.
Hi, Tom, Could you explain a little about "SyscallEventInfo.returnCode apparently does not sign-extend the return result of a 'close'" What do you mean "close" here? SYS_close? I think I misunderstand "sign extend" for the first time on maillist, and I will have a look about it. On PPC64, the sign of the reture value is determined by one bit in CCR,(Condation Code Register).
Yes, I mean SYS_close. The question is how to check whether a system call returned an error. My current check looks like this: && (int) syscallEventInfo.returnCode(task) < 0) ... where the explicit cast is needed to handle the lack of sign extension. I think it would be friendlier to explicitly sign-extend.
Post my patch against this bug, http://sources.redhat.com/ml/frysk/2006-q3/msg00400.html but no one review this patch. Tom, Could you have a look? If it is OK, I will check in. Thanks!