天天看點

順藤摸瓜的解決GDB的DEBUG中出現的小問題

1,在運作gdb的r指令時,報錯。。。。

(gdb) r

starting program: /root/tst

breakpoint 1, main () at tst.c:17

17              long result=0;

missing separate debuginfos, use: debuginfo-install glibc-2.12-1.80.el6_3.6.x86_64

2,按提示,運作debuginfo-install glibc-2.12-1.80.el6_3.6.x86_64時報錯:

debuginfo-install glibc-2.12-1.80.el6_3.6.x86_64

-bash: debuginfo-install: command not found

3,網上搜尋,找到有用的。

<a href="http://stackoverflow.com/questions/10352546/how-to-install-glibc-with-debugging-info-on-centos-5-5">http://stackoverflow.com/questions/10352546/how-to-install-glibc-with-debugging-info-on-centos-5-5</a>

<a href="http://hi.baidu.com/patrick_zhow/item/226b650d474fb43ef3eafcc8">http://hi.baidu.com/patrick_zhow/item/226b650d474fb43ef3eafcc8</a>

for this to work, you need to have the <code>debuginfo</code> repository defined.  for centos 5, put the following in <code>/etc/yum.repos.d/centos-base-debuginfo.repo</code>:

順藤摸瓜的解決GDB的DEBUG中出現的小問題
順藤摸瓜的解決GDB的DEBUG中出現的小問題

繼續閱讀