[实践OK]macbook上的ldd的替代,mac下的strace命令。

jackxiang 2019-11-26 10:10 | |
链接如下:
一)在Mac OS X查看程序使用了哪些链接库可以用otool 来代替:
otool -L /usr/bin/vim
/usr/bin/vim:
  /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
  /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)

来自:https://www.dazhuanlan.com/2019/10/10/5d9ecd060ead4/

二)
  dtruss df -h       # run and examine "df -h"

       dtruss -p 1871     # examine PID 1871

       dtruss -n tar      # examine all processes called "tar"

       dtruss -f test.sh  # run test.sh and follow children

链接:https://blog.csdn.net/sanbingyutuoniao123/article/details/73955092

实践有些问题,如下:
dtruss df -h
dtrace: system integrity protection is on, some features will not be available
dtrace: failed to initialize dtrace: DTrace requires additional privileges

作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:http://jackxiang.com/post/10354/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!

评论列表
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]