免费注册 查看新帖 |

Chinaunix

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

怎样让gdb不显示kernel event等信息? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-02-22 20:16 |只看该作者 |倒序浏览
我在用gdb的时候 每走一步都显示很多程序调用的信息
如下
gdb: do_initial_child_stuff: process 1844
gdb: kernel event for pid=1844 tid=3124 code=CREATE_PROCESS_DEBUG_EVENT)
gdb: child_resume.SetThreadContext: thread 1844.0xc34
ContinueDebugEvent (cpid=1844, ctid=3124, DBG_CONTINUE);
gdb: kernel event for pid=1844 tid=3124 code=LOAD_DLL_DEBUG_EVENT)
gdb: child_resume.SetThreadContext: thread 1844.0xc34
ContinueDebugEvent (cpid=1844, ctid=3124, DBG_CONTINUE);
gdb: kernel event for pid=1844 tid=3124 code=LOAD_DLL_DEBUG_EVENT)
gdb: child_resume.SetThreadContext: thread 1844.0xc34
ContinueDebugEvent (cpid=1844, ctid=3124, DBG_CONTINUE);
gdb: kernel event for pid=1844 tid=3124 code=LOAD_DLL_DEBUG_EVENT)
gdb: child_resume.SetThreadContext: thread 1844.0xc34
ContinueDebugEvent (cpid=1844, ctid=3124, DBG_CONTINUE);
gdb: kernel event for pid=1844 tid=3124 code=EXCEPTION_DEBUG_EVENT)
gdb: child_resume.SetThreadContext: thread 1844.0xc34
ContinueDebugEvent (cpid=1844, ctid=3124, DBG_CONTINUE);
gdb: kernel event for pid=1844 tid=3124 code=EXCEPTION_DEBUG_EVENT)
Breakpoint 1, main () at //C/Debug/temp.c:28

怎样才能不显示上面的信息只保留
Breakpoint 1, main () at //C/Debug/temp.c:28

谢谢!

论坛徽章:
0
2 [报告]
发表于 2007-02-26 21:04 |只看该作者
你用的是Cygwin?

论坛徽章:
0
3 [报告]
发表于 2007-02-27 17:26 |只看该作者
启动的时候gdb  <your-program>  2>/dev/null
不过这样所有出错信息都没了

论坛徽章:
0
4 [报告]
发表于 2007-02-27 20:12 |只看该作者
我用的是mingw
gdb自带的命令中有没有可以设置的?

论坛徽章:
0
5 [报告]
发表于 2007-02-28 08:30 |只看该作者
  1. (gdb)
  2. (gdb) show debugevents
  3. Whether to display kernel events in child process is on.
  4. (gdb) set debugevents off
  5. (gdb) show debugevents
  6. Whether to display kernel events in child process is off.
  7. (gdb)
复制代码

[ 本帖最后由 雨丝风片 于 2007-2-28 08:35 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP