Thanks again for the help Chad,

> >
> > memcached*::command-get
> > / (signed int) arg3 != -1 /
> > {
> >  printf("get %s, FOUND KEY\n",
> stringof(copyin(arg1, arg2)));
> > }
> 
> It doesn't look like you're copying in a null
> character, which seems
> likely if arg2 == 5 for "setopt".  You're doing the
> copyin() the
> second time around to a buffer that's not been
> zeroed, and stringof()
> is just looking for the first null character it finds
> in that buffer.
> It finds it after the original (if longer) string.


I guess I'd assumed that the %s would have been treated as a clause local 
variable, but it appears that's not the case.  From what you're saying, it 
appears it's a global which I can't really reference in the way I'd used it?  
That's rather confusing... but I can deal with it.

Looking at some other examples of similar situations, it appears the best thing 
to do is create a clause local, then call stringof() on it when doing the 
printf, then zeroing it out before the next call.  Does that sound like the 
right approach?

Thanks again,

- Matt
-- 
This message posted from opensolaris.org
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to