Hamish <ham...@gmail.com> wrote: > 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
It is not simple for a compiler to check this as p is definitely not a string constant but only pointing to one. Jörg -- EMail:jo...@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin j...@cs.tu-berlin.de (uni) joerg.schill...@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily _______________________________________________ dtrace-discuss mailing list dtrace-discuss@opensolaris.org