I ran a dtrace script on the MacRuby samples to print all the info provided to
the method_entry probe.
The sourcefile was always either empty or "core" and the linenumber was always
0.
Do I have to execute the script in some particular way for this information to
be received?
SCRIPT:
-------------
#!/usr/sbin/dtrace -s
#pragma D option quiet
BEGIN
{
printf("Target pid: %d\n\n", $target);
}
macruby$target:::method-entry
{
printf("Class name: %s, Method name %s, Source file %s, Line number
%d\n", copyinstr(arg0), copyinstr(arg1), copyinstr(arg2), arg3);
}
COMMAND:
-------------
sudo dtrace -s call_info.d -c
../build/AnimatingViews.app/Contents/MacOS/AnimatingViews
OUTPUT:
-------------
Class name: DemoView, Method name randf:, Source file , Line number 0
Class name: DemoView, Method name rand:, Source file , Line number 0
Class name: Float, Method name to_int, Source file core, Line number 0
Class name: Class, Method name new:, Source file , Line number 0
Class name: CGPoint, Method name x, Source file , Line number 0
Class name: CGPoint, Method name y, Source file , Line number 0
Class name: Fixnum, Method name to_i, Source file , Line number 0
Thanks,
Gabriel Ayuso
_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel