免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1644 | 回复: 6
打印 上一主题 下一主题

redhat 9。0 gdb 问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-07-10 05:10 |只看该作者 |倒序浏览
[root@linserver mnt]# gdb hello 20422
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Attaching to program: /usr/local/sbin/hello, process 20422
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
0xffffe002 in ?? ()
(gdb) where
#0 0xffffe002 in ?? ()
#1 0x08055eb0 in main (argc=2, argv=0x0) at hello.c:1211
#2 0x42015574 in __libc_start_main () from /lib/tls/libc.so.6
(gdb)
(gdb) n
Cannot find bounds of current function



这是什么原因 ? 在编译程序时已经加上-ggdb2 了 ,
在一台rh 8 上就没问题 :

gdb hello 1157
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i586-pc-linux-gnu"...
Attaching to program: /usr/local/sbin/hello, process 1157
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
0x401b8102 in accept () from /lib/libc.so.6
(gdb) where
#0 0x401b8102 in accept () from /lib/libc.so.6
#1 0x080576c7 in main_loop () at nessusd.c:697
#2 0x080581b8 in main (argc=2, argv=0x0) at hello.c:1211
#3 0x400ff4ce in __libc_start_main () from /lib/libc.so.6

论坛徽章:
0
2 [报告]
发表于 2003-07-10 11:44 |只看该作者

redhat 9。0 gdb 问题

蓝箭 ,无双 帮偶看看哪

论坛徽章:
0
3 [报告]
发表于 2003-07-10 13:07 |只看该作者

redhat 9。0 gdb 问题

标题都写不清楚

所以刚才没有看

gdb查找调用堆栈不是很准确吧
我也有过使用where时出现??情况

你可以一步一步跟下去啊

另外以前编译先项是-g  当然还有-ggdb  没有用过-ggdb2

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
4 [报告]
发表于 2003-07-10 13:54 |只看该作者

redhat 9。0 gdb 问题

FT,我刚才回复的怎么不见了!

两个都没问题。

你where以后,就n。

这样能执行才见鬼那!


设置断点以后,在run(r),在next(n)。

论坛徽章:
0
5 [报告]
发表于 2003-07-10 14:49 |只看该作者

redhat 9。0 gdb 问题

原帖由 "蓝色键盘" 发表:
FT,我刚才回复的怎么不见了!

两个都没问题。

你where以后,就n。

这样能执行才见鬼那!


设置断点以后,在run(r),在next(n)。
   

当然可以 , 我是gdb  attach到一个运行的进程的 ,rh8 上是可以的

论坛徽章:
0
6 [报告]
发表于 2003-07-10 14:50 |只看该作者

redhat 9。0 gdb 问题

原帖由 "蓝色键盘" 发表:
FT,我刚才回复的怎么不见了!

两个都没问题。

你where以后,就n。

这样能执行才见鬼那!


设置断点以后,在run(r),在next(n)。

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
7 [报告]
发表于 2003-07-10 17:46 |只看该作者

redhat 9。0 gdb 问题

哦,如果是run的进程,那么
ps -ef|grep yourPID

gdb yourPROC yourPID


进去以后,还是设置断点,不同是的是用continue(c).
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP