Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | 51CTO学院 | CSDN程序员研修院 | OSChina 博客 | 腾讯云社区 | 阿里云栖社区 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏多维度架构

第 30 章 调试工具

目录

30.1. file 命令
30.2. ftop - Tool to show progress of open files and file systems
30.3. ldd - print shared library dependencies
30.4. strace - trace system calls and signals
30.4.1. -o file -- send trace output to FILE instead of stderr
30.5. ltrace - A library call tracer
30.6. nm - list symbols from object files
30.7. strings - print the strings of printable characters in files.
30.8. hexdump
30.9. objdump - display information from object files.
30.10. readelf - Displays information about ELF files.
30.11. Valgrind

30.1. file 命令

file 命令将帮助你确定你所处理的文件类型。

		
[root@localhost ~]# file /bin/ls
/bin/ls: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=bed150f5bac8514e69b3b98eb6fd3e75d6b277c8, stripped, too many notes (256)

neo@MacBook-Pro-Neo ~ % file /bin/ls
/bin/ls: Mach-O 64-bit executable x86_64