TUI模式下的GDB:如何处理stderr与ui的交互 [英] GDB in TUI mode: how to deal with stderr's interaction with the ui

查看:102
本文介绍了TUI模式下的GDB:如何处理stderr与ui的交互的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用gdb调试以在之后刷新每一个 next 命令:

 定义钩子-下一步
刷新
结束


I am trying to use gdb to debug caffe. I prefer to use the tui mode because it allows me to see the whole source code rather than just a single line. But there is a problem: whenever the program caffe outputs something on stderr, the output distorts the tui interface. See the below snapshot for an illustration:

Is this an inherent limitation of gdb tui or is there any way to solve this problem?

解决方案

As suggested by @ks1322 you can press Ctrl-L to refresh the screen. Or define a hook in .gdbinit to refresh after every next command:

define hook-next
    refresh
end

这篇关于TUI模式下的GDB:如何处理stderr与ui的交互的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆