OSX上的(ldd)otool和(strace)dtruss

程序使用了哪些链接库可以用otool :

$ otool -L /usr/bin/vim
 /bin/ls:
	/usr/lib/libutil.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)

dtruss可以查看程序运行时的系统调用:

$sudo dtruss /hk/bin/adb
dtrace: system integrity protection is on, some features will not be available

SYSCALL(args) 		 = return
Android Debug Bridge version 1.0.31