新聞中心

EEPW首頁 > 嵌入式系統(tǒng) > 設計應用 > 應用調試-----使用strace命令來跟蹤系統(tǒng)調用

應用調試-----使用strace命令來跟蹤系統(tǒng)調用

作者: 時間:2016-11-21 來源:網(wǎng)絡 收藏
使用strace命令來跟蹤系統(tǒng)調用(open/read/write):

1、壓縮文件在主光盤debug目錄下面,先解壓:
tar xjf strace-4.5.15.tar.bz2
2、進入strace-4.5.15文件,打補?。?br /> patch -p1 < ../strace-fix-arm-bad-syscall.patch
3、配置:
.configure --host=arm-linux CC=arm-linux-gcc
4、編譯:
make
5、在strace-4.5.15目錄下生成一個名為strace的可執(zhí)行程序,將其復制到開發(fā)板根文件系統(tǒng)中bin/目錄下面即可使用。

本文引用地址:http://2s4d.com/article/201611/319489.htm

6、使用例如:
strace -o log.txt ./firstdrvtest on



評論


技術專區(qū)

關閉