本文介绍了不能用Ctrl-X A离开tui模式,也不能在tui模式下看到程序输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  • 在执行其他任何操作前按ctrl-x,ctrl-a
  • 然后使用b main设置断点

  • 然后我开始使用r运行程序

  • 至此,如果按向上箭头键,src窗口不会滚动。相反,我的命令窗口中会出现一些内容 - ^ [0A]。如果我尝试用ctrl-l刷新屏幕,则^ L出现在命令窗口中。



    我认为这不应该发生。在这种情况下,我甚至不能用c-x退出tui模式,c-a(而是会出现^ X ^ A)。难道我做错了什么?只要我在TUI界面中使用run命令,我就会意识到发生了这个问题。但是,如果我用gdb -tui启动gdb,则可以在TUI中使用run命令。

    问题B



    我无法在TUI模式下看到我的程序输出。可以看到GDB自己的输出,但不是正在调试的程序。这发生在我使用ctrl-x,ctrl-a和使用-tui命令行选项进入TUI时。

    p>

    我在网上阅读了一些TUI文章,有些人似乎只使用TUI。我猜TUI可以正常工作,只是有一套必须严格遵守的规则?

    编辑:我在ubuntu 11.04中使用gnome-terminal

    解决方案

    用-tui选项代替()


    Problem A:

    1. I start gdb in command line with "gdb test"
    2. I press ctrl-x,ctrl-a before I do anything else
    3. Then I set break point using "b main"
    4. Then I start running the program using "r"

    Till this point, if I press the Up arrow key the src window will not scroll. Instead, something will appear in my command window - "^[0A". If I try to refresh the screen with ctrl-l, "^L" is what appears in the command window.

    I don't think this is supposed to happen. Under this situation I can't even quit tui mode with c-x,c-a ("^X^A" will appear instead). Am I doing something wrong? I realize this problem occurs so long as I use the "run" command inside the TUI interface. I can, however, use the run command in TUI if I start gdb with "gdb -tui"

    Problem B

    I can't see the output of my program in TUI mode. GDB's own output can be seen, but not that of the program being debugged. This occurs both when I enter TUI using ctrl-x,ctrl-a and when using -tui command-line option.

    Is there any way to fix this?

    I've read some TUI articles on the net and some people seem to use TUI "exclusively". I suppose TUI can work properly, it's just there's a set of rules that must be carefully followed?

    EDIT: I use gnome-terminal in ubuntu 11.04

    解决方案

    Run gdb with -tui option instead (https://bbs.archlinux.org/viewtopic.php?id=112660)

    这篇关于不能用Ctrl-X A离开tui模式,也不能在tui模式下看到程序输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

    09-13 15:02