Linux Debug tools
来源:互联网 发布:ant编译java项目 编辑:程序博客网 时间:2024/06/05 14:41
1. gdb --The GNU Debugger
gdb attach [pid] -- debug a running process
2. valgrind-- a suite of tools for debugging and profiling programs
Very powerful tool to debug linux program,just for x86 platform
3. strace -trace system calls and signals
In the simplest case strace runs thespecified command until it exits. It intercepts and records the system calls which are called by a process and the signalswhich are received by a process. The name of each system call, itsarguments and its return value are printed on standard error or to the file specifiedwith the -o option.
4. pstack -print a stack trace of a running process
It's often used to check the stack of hungprocess.
5. mtrace, muntrace - malloc debugging
The function mtrace() installs handlers for malloc(), realloc() and free(). The functionmuntrace() disables these handlers.
The environment variable MALLOC_TRACE defines a file where mtrace() writes itsoutput. This file must be writable to the user or mtrace()will do nothing. If the file is not empty it will be truncated.
Usage: call the two function before andafter the code you want to pay attention on.
6. dmesg -print or control the kernel ring buffer
Check the error message of all kind ofprogram, especail for third-party program.
7. binutils-- a tools set
* ld - the GNU linker.
* as - the GNU assembler.
* addr2line - Converts addresses intofilenames and line numbers.
* ar - A utility for creating, modifyingand extracting from archives.
* c+filt - Filter to demangle encoded C+symbols.
* gprof - Displays profiling information.
* nlmconv - Converts object code into anNLM.
* nm - Lists symbols from object files.
* objcopy - Copys and translates objectfiles.
* objdump - Displays information fromobject files.
* ranlib - Generates an index to thecontents of an archive.
* readelf - Displays information from anyELF format object file.
* size - Lists the section sizes of anobject or archive file.
* strings - Lists printable strings fromfiles.
* strip - Discards symbols.
* windres - A compiler for Windows resourcefiles.
8. ldd -print shared library dependencies
9. ld.so, ld-linux.so* - dynamic linker/loader
---------------------------------------------------
10.lsof -list open files
Very useful to check if fd leak.
11. netstat - Print network connections, routing tables, interfacestatistics, masquerade connections, and multicast memberships
12. iostat - Report Central Processing Unit (CPU) statisticsand input/output statistics for devices and partitions.
13. vmstat -Report virtual memory statistics
- Linux Debug tools
- Linux debug tools
- linux debug tools
- Linux Debug tools
- linux-------debug tools ---printk level
- JavaScript debug and tools
- Android Debug Tools
- windows debug tools
- debug tools:perf
- siebel tools debug配置
- gstreamer debug tools
- [Debug]GNU tools
- [django]django-debug-tools
- opengl debug tools
- django-debug-tools 使用
- Reverse Engineering and Debug Tools
- Debug Tools for xp win7
- Memory,CPU,IO Debug Tools
- 命名空间std,using namespace std (转载)
- ie6里中英文无法上下对齐
- SQL Server 2000 数据库日志太大!如何管理,清除,变小,压缩它
- DAT_copy 产生的问题
- Oracle中查找和删除重复记录方法简介
- Linux Debug tools
- spring动态代理(aop)----
- 应用驱动学习
- Android生命周期
- 房产信息网站
- SYN 攻击原理以及防范技术
- 9l0-062题库资源分享
- 返回错误信息和抛异常的优劣比较
- Class.forName