随笔分类 -  valgrind

摘要:原文地址:http://dogking.chinaunix.com/space.php?uid=20196318&do=blog&id=88960ldd查看应用程序链接了哪些动态库。 ldd ./testnm列出目标文件中包含的符号信息。 nm -Du /lib/libgobject-2.0.so.0 | grep g_regex_unrefsize列出各个段的大小及总的大小。strings列出文件中的字符串。readelf读取elf文件的完整结构。objdump导出目标文件的相关信息(elf文件相关工具的源头)。gdb对文件的执行过程进行调试分析,设置断点(b)、单步执行(n 阅读全文
posted @ 2012-03-01 02:53 wangkangluo1 阅读(832) 评论(0) 推荐(0) 编辑
摘要:原文地址:http://www.cnblogs.com/napoleon_liu/articles/2001802.html调不尽的内存泄漏,用不完的ValgrindValgrind 安装1. 到www.valgrind.org下载最新版valgrind-3.2.3.tar.bz22. 解压安装包:tar –jxvf valgrind-3.2.3.tar.bz23. 解压后生成目录valgrind-3.2.34. cd valgrind-3.2.35. 运行./autogen.sh设置环境(需要标准的autoconf工具)(可选)6. ./configure;配置Valgrind,生成Make 阅读全文
posted @ 2011-07-20 09:44 wangkangluo1 阅读(18355) 评论(1) 推荐(4) 编辑
摘要:原文地址:Valgrind使用说明Valgrind是运行在Linux上一套基于仿真技术的程序调试和分析工具,是公认的最接近Purify的产品,它包含一个内核——一个软件合成的CPU,和一系列的小工具,每个工具都可以完成一项任务——调试,分析,或测试等。Valgrind可以检测内存泄漏和内存越界,还可以分析cache的使用等,灵活轻巧而又强大。一Valgrind概观Valgrind的最新版是3.2.3,该版本包含下列工具:1、memcheck:检查程序中的内存问题,如泄漏、越界、非法指针等。2、callgrind:检测程序代码覆盖,以及分析程序性能。3、cachegrind:分析CPU的cach 阅读全文
posted @ 2011-07-20 09:26 wangkangluo1 阅读(43859) 评论(0) 推荐(2) 编辑
摘要:4.3. Explanation of error messages from MemcheckDespite considerable sophistication under the hood, Memcheck can only really detect two kinds of errors: use of illegal addresses, and use of undefined values. Nevertheless, this is enough to help you discover all sorts of memory-management problems in 阅读全文
posted @ 2011-06-10 13:48 wangkangluo1 阅读(6798) 评论(0) 推荐(0) 编辑
摘要:valgrind --leak-check=full --show-reachable=yes --log-file=a.log ./shdaily.fcgi "op=search&date=2011-04-14&current=4"glib使用如下:G_SLICE=always-malloc valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=20 ./egg2Utest "ItfTest"常用命令详解:G_DEBUG=gc-fr 阅读全文
posted @ 2011-06-10 11:27 wangkangluo1 阅读(3430) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示