3 ms·
I'm surprised he went to the trouble of using `DYLD_INSERT_LIBRARIES` - DTrace makes this sort of thing trivial.... something like: #!/usr/sbin/dtrace
by slashclee 14y ago
I'm surprised he went to the trouble of using `DYLD_INSERT_LIBRARIES` - DTrace makes this sort of thing trivial.... something like:
#!/usr/sbin/dtrace
pid$1:$2:free:entry
{
printf("%s: %x\n", probefunc, arg0);
}
would do the trick, I think.
- slashclee 14y agoNope, that'll just get you the addresses being freed. This, on the other hand, seems to do what I expected: dtrace -n 'pid$target::free:entry { printf("%s: %s", probefunc, copyinstr(arg0)); }' -p <pid>