This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: ppc nd_syscall broken (was Re: manual SyS_foo management is unnecessary?)
On 06/15/2010 11:07 AM, David Smith wrote:
> The error is in the 'argnum == 8' case - there is a missing 'if'. That
> line should be:
>
> else if (argnum == 8)
> val = u_register("r10")
>
> Since there was no "if", systemtap grabbed the register you asked for,
> then always grabbed the value of r10. So, that garbage we saw was
> really the value of r10.
Nice catch! The s390 version also has this typo.
> This is easily fixed, but a bit deeper question is: could the translator
> given us a warning or error message with the original code so we could
> have easily seen this?
That's a harder problem. Perhaps we could throw a warning when an
"expr_statement*" contains just a "comparison*", but only before any
optimization transformations which might cause this synthetically.
Josh