首页 > 代码库 > ubuntu 调试库

ubuntu 调试库

1.安装带有调试信息的libc: sudo apt-get install libc6-dbg 2.下载libc源码     a.选定一个放置源码的目录并进入,如 /home/kent/dev-os/libc6-source     b.执行sudo apt-get source libc6, 会把源码下载到当前目录中。最后源码目录大概是:/home/kent/dev-os/libc6-source/eglibc-2.15   www.2cto.com  3.运行gdb时指定libc源码目录:gdb `find /home/kent/dev-os/libc6-source/eglibc-2.15 -type d -printf -d %p `  my_program 4.最后进入printf()函数即可. 我这里看到的第一行代码是va_list arg;