AKA, what's wrong with the following? Isn't a string literal always a constant?
$ cat > cfretain_calayer.d
pid$target::CFRetain:entry
{
isaptr = *(uint32_t*)copyin(arg0, 4);
classnameptr = *(uint32_t*)copyin(isaptr+8, 4);
classname = copyinstr(classnameptr);
p = (classname == "CALayer" ? "CFRetain(CALayer)\n" : "");
printf(p);
}
$ sudo dtrace -p 31303 -s cfretain_calayer.d
dtrace: failed to compile script cfretain_calayer.d: line 8: printf( ) argument
#1 is incompatible with prototype:
prototype: string constant
argument: string
Also, please let me know if there's a better way to be doing this (I'm a dtrace
newbie).
Thanks,
Hamish
--
This message posted from opensolaris.org
_______________________________________________
dtrace-discuss mailing list
[email protected]